Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7266
Modified Files: Tag: desiredata s_main.c Log Message: better error handling
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.7.4.17.2.22.2.3 retrieving revision 1.7.4.17.2.22.2.4 diff -C2 -d -r1.7.4.17.2.22.2.3 -r1.7.4.17.2.22.2.4 *** s_main.c 30 Nov 2006 18:11:40 -0000 1.7.4.17.2.22.2.3 --- s_main.c 1 Dec 2006 17:52:51 -0000 1.7.4.17.2.22.2.4 *************** *** 499,503 **** int i; while ((argc > 0) && **argv == '-') { ! if (ARG("-r",2) && sscanf(argv[1], "%d", &sys_main_srate) >= 1) { NEXT(2); } --- 499,504 ---- int i; while ((argc > 0) && **argv == '-') { ! if (ARG("-r",2)) { ! if (sscanf(argv[1], "%d", &sys_main_srate)<1) goto usage; NEXT(2); } *************** *** 523,527 **** } if (ARG("-blocksize",2)) {sys_setblocksize(atoi(argv[1])); NEXT(2);} ! if (ARG("-dacblocksize",2) && sscanf(argv[1], "%d", &sys_main_dacblocksize) >= 1) {NEXT(2);} if (ARG("-sleepgrain",2)) {sys_sleepgrain = 1000 * atof(argv[1]); NEXT(2);}
--- 524,531 ---- } if (ARG("-blocksize",2)) {sys_setblocksize(atoi(argv[1])); NEXT(2);} ! if (ARG("-dacblocksize",2)) { ! if (sscanf(argv[1], "%d", &sys_main_dacblocksize)<1) goto usage; ! NEXT(2); ! } if (ARG("-sleepgrain",2)) {sys_sleepgrain = 1000 * atof(argv[1]); NEXT(2);}
*************** *** 663,670 **** if (ARG("-verbose",1)) {sys_verbose++; NEXT(1);} if (ARG("-version",1)) {sys_version = 1; NEXT(1);} ! if (ARG("-d",2) && sscanf(argv[1], "%d", &sys_debuglevel) >= 1) {NEXT(2);} if (ARG("-noloadbang",1)) {sys_noloadbang = 1; NEXT(1);} if (ARG("-nogui",1)) {sys_printtostderr = sys_nogui = 1; NEXT(1);} ! if (ARG("-guiport",2) && sscanf(argv[1], "%d", &sys_guisetportnumber) >= 1) {NEXT(2);} if (ARG("-stderr",1)) {sys_printtostderr = 1; NEXT(1);} if (ARG("-guicmd",2)) {sys_guicmd = argv[1]; NEXT(2);} --- 667,680 ---- if (ARG("-verbose",1)) {sys_verbose++; NEXT(1);} if (ARG("-version",1)) {sys_version = 1; NEXT(1);} ! if (ARG("-d",2)) { ! if (sscanf(argv[1], "%d", &sys_debuglevel)<1) goto usage; ! NEXT(2); ! } if (ARG("-noloadbang",1)) {sys_noloadbang = 1; NEXT(1);} if (ARG("-nogui",1)) {sys_printtostderr = sys_nogui = 1; NEXT(1);} ! if (ARG("-guiport",2)) { ! if (sscanf(argv[1], "%d", &sys_guisetportnumber)<1) goto usage; ! NEXT(2); ! } if (ARG("-stderr",1)) {sys_printtostderr = 1; NEXT(1);} if (ARG("-guicmd",2)) {sys_guicmd = argv[1]; NEXT(2);}