option, rather than silently ignoring the remaining characters
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@37
e59a4935-1847-0410-ae03-
e826735625c1
helpstring += "-h : help\n";
for(int i=1; i < argc;i++) {
- if(argv[i][0] == '-')
+ if(argv[i][0] == '-') {
switch(argv[i][1]) {
case 'a' :
BEEV::optimize = false;
return -1;
break;
}
- else {
+ if(argv[i][2]) {
+ fprintf(stderr, "Multiple character options are not allowed.\n");
+ fprintf(stderr, "(-ab is not an abbreviation for -a -b)\n");
+ fprintf(stderr,usage,prog);
+ cout << helpstring;
+ return -1;
+ }
+ } else {
infile = argv[i];
yyin = fopen(infile,"r");
if(yyin == NULL) {