X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/blobdiff_plain/6b91cb54fc7dec367c57b4d9e97f2a086b809ea6..b3651f38b79671793118de32512a8c0806cfdab5:/csrc/pf_main.c 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"));