|
From: Jerome F. <kin...@us...> - 2009-07-25 00:47:41
|
Update of /cvsroot/munt/mt32emu_smf2wav/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15534/src Modified Files: mt32emu-smf2wav.cpp Log Message: - Now documents and requires a minimum buffer size of 4 bytes. Index: mt32emu-smf2wav.cpp =================================================================== RCS file: /cvsroot/munt/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mt32emu-smf2wav.cpp 12 Jul 2009 15:04:51 -0000 1.6 --- mt32emu-smf2wav.cpp 25 Jul 2009 00:47:32 -0000 1.7 *************** *** 290,294 **** fprintf(stdout, "\nusage: %s [arguments] <SMF MIDI file>\n\n", cmd); fprintf(stdout, "Arguments:\n"); ! fprintf(stdout, " -b Buffer size (in bytes) (default: %d)\n", DEFAULT_BUFFER_SIZE); fprintf(stdout, " -f Force overwrite of output file if already present\n"); fprintf(stdout, " -h Show this help and exit\n"); --- 290,294 ---- fprintf(stdout, "\nusage: %s [arguments] <SMF MIDI file>\n\n", cmd); fprintf(stdout, "Arguments:\n"); ! fprintf(stdout, " -b Buffer size (in bytes) (minimum: 4, default: %d)\n", DEFAULT_BUFFER_SIZE); fprintf(stdout, " -f Force overwrite of output file if already present\n"); fprintf(stdout, " -h Show this help and exit\n"); *************** *** 313,316 **** --- 313,320 ---- case 'b': bufferSize = atoi(optarg); + if (bufferSize < 4) { + printUsage(cmd); + return 0; + } break; case 'f': |