Humorous Help of the Day
Wednesday, August 1st, 2007 at 12:54 am
| 1,515 views
| trackback url
I was trying to play a .mid file from a webpage (thanks to Firefox not being able to handle that correctly, sigh), and stumbled upon xplaymidi.
$ xplaymidi Playmidi 2.4 Copyright (C) 1994-1997 Nathan I. Laredo, AWE32 by Takashi Iwai This is free software with ABSOLUTELY NO WARRANTY. For details please see the file COPYING. usage: xplaymidi [-options] file1 [file2 ...] type 'xplaymidi --help' for more details
Oh, I’ll try to find out what options it supports:
$ xplaymidi --help Playmidi 2.4 Copyright (C) 1994-1997 Nathan I. Laredo, AWE32 by Takashi Iwai This is free software with ABSOLUTELY NO WARRANTY. For details please see the file COPYING. usage: xplaymidi [-options] file1 [file2 ...] type 'xplaymidi --help' for more details
Well that was mighty useful.
A simple one-line patch fixes all:
--- playmidi-2.4.old/playmidi.c 2007-08-01 10:08:04.000000000 -0400
+++ playmidi-2.4.new/playmidi.c 2007-08-01 10:04:45.000000000 -0400
@@ -481,7 +481,7 @@
if (error || optind >= argc) {
printf( "usage: %s [-options] file1 [file2 ...]\n", argv[0]);
- if (error >= 0)
+ if (error == 0)
printf ("type '%s --help' for more details\n", argv[0]);
else
printf( " -v verbosity (additive)\n"
