Patch 2 "dmime: Read through a MIDI file." defines "enum meta_event_type" but doesn't uses it nor any of the MIDI_META_* constants.
Later on in read_midi_event() meta_event_type is used a BYTE variable. C allows that as those are different name spaces but that's confusing.
While at it: Is there a way to name those magic constants in read_midi_event()? Maybe for the status values?