/* This program, when compiled with the midifile(3) library, will */ /* print only the text messages in a standard MIDI file. */ #include #include #include "midifile.h" FILE *F; mygetc() { return(getc(F)); } mytext(type,leng,msg) char *msg; { char *p; char *ep = msg + leng; for ( p=msg; p 1 ) F = fopen(argv[1],"r"); else F = stdin; Mf_getc = mygetc; Mf_text = mytext; midifile(); exit(0); }