[Python-checkins] python/nondist/sandbox/audiotest audiotest.c,1.4,1.5

gward@users.sourceforge.net gward@users.sourceforge.net
2003年6月02日 18:13:51 -0700


Update of /cvsroot/python/python/nondist/sandbox/audiotest
In directory sc8-pr-cvs1:/tmp/cvs-serv15814
Modified Files:
	audiotest.c 
Log Message:
Fix parse_args() to catch unknown options and call usage_error().
Index: audiotest.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/audiotest/audiotest.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** audiotest.c	3 Jun 2003 01:11:34 -0000	1.4
--- audiotest.c	3 Jun 2003 01:13:49 -0000	1.5
***************
*** 89,95 ****
 {
 fprintf(stderr, usage);
! fputc('\n', stderr);
! fprintf(stderr, error);
! fputc('\n', stderr);
 exit(1);
 }
--- 89,97 ----
 {
 fprintf(stderr, usage);
! if (error != NULL) {
! fputc('\n', stderr);
! fprintf(stderr, error);
! fputc('\n', stderr);
! }
 exit(1);
 }
***************
*** 512,515 ****
--- 514,519 ----
 sample->sign = 0;
 break;
+ default:
+ usage_error(usage, NULL);
 }
 }

AltStyle によって変換されたページ (->オリジナル) /