X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=csrc%2Fpf_main.c;fp=csrc%2Fpf_main.c;h=a779560987e7431fa5f966e0b048cf85d8fb8b48;hb=b3651f38b79671793118de32512a8c0806cfdab5;hp=9d8568d8c9b67abdaab3a4b803c63451bb1d6c8a;hpb=6b91cb54fc7dec367c57b4d9e97f2a086b809ea6;p=debian%2Fpforth diff --git a/csrc/pf_main.c b/csrc/pf_main.c index 9d8568d..a779560 100644 --- a/csrc/pf_main.c +++ b/csrc/pf_main.c @@ -90,13 +90,25 @@ int main( int argc, char **argv ) IfInit = TRUE; DicName = NULL; break; + case 'q': pfSetQuiet( TRUE ); break; + case 'd': if( *s != '\0' ) DicName = s; - else DicName = PF_DEFAULT_DICTIONARY; + // Allow space after -d (Thanks Aleksej Saushev) + // Make sure there is another argument. + else if( (i+1) < argc ) + { + DicName = argv[++i]; + } + if (DicName == NULL || *DicName == '\0') + { + DicName = PF_DEFAULT_DICTIONARY; + } break; + default: ERR(("Unrecognized option!\n")); ERR(("pforth {-i} {-q} {-dfilename.dic} {sourcefilename}\n"));