Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15236
Modified Files: Tag: devel_0_38 s_main.c Log Message: introducing -no-prefs flag
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.7.4.7 retrieving revision 1.7.4.8 diff -C2 -d -r1.7.4.7 -r1.7.4.8 *** s_main.c 14 Jan 2005 18:34:14 -0000 1.7.4.7 --- s_main.c 16 Jan 2005 17:14:38 -0000 1.7.4.8 *************** *** 269,272 **** --- 269,274 ---- int sys_main(int argc, char **argv) { + int defeat_presets = 0, i; + /* jsarlo { */ sys_externalschedlib = 0; *************** *** 278,285 **** pd_init(); /* start the message system */ sys_findprogdir(argv[0]); /* set sys_progname, guipath */ ! sys_loadpreferences(); /* load default settings */ #ifndef MSW ! sys_rcfile(); /* parse the startup file */ #endif if (sys_argparse(argc-1, argv+1)) /* parse cmd line */ return (1); --- 280,300 ---- pd_init(); /* start the message system */ sys_findprogdir(argv[0]); /* set sys_progname, guipath */ ! ! /* tb: command line flag to defeat preset loading { */ ! for (i = 0; i != argc; ++i) ! { ! if (!strcmp(argv[i],"-no-prefs")) ! defeat_presets = 1; ! } ! ! if (!defeat_presets) ! { ! sys_loadpreferences(); /* load default settings */ #ifndef MSW ! sys_rcfile(); /* parse the startup file */ #endif + } + /* } tb */ + if (sys_argparse(argc-1, argv+1)) /* parse cmd line */ return (1); *************** *** 782,785 **** --- 797,806 ---- argv += 2; } + /* tb: skip flag, we already parsed it */ + else if (!strcmp(*argv, "-no-prefs")) + { + argc -= 1; + argv += 1; + } /* } tb */ else if (!strcmp(*argv, "-verbose"))