more SWI compatibility fixes:

make -f option test if there is an argument and if so use it.
This commit is contained in:
Vitor Santos Costa 2008-08-24 00:30:25 +01:00
parent e0f108ee55
commit 92f99fce25

View File

@ -221,7 +221,7 @@ print_usage(void)
fprintf(stderr,"\n[ Valid switches for command line arguments: ]\n"); fprintf(stderr,"\n[ Valid switches for command line arguments: ]\n");
fprintf(stderr," -? Shows this screen\n"); fprintf(stderr," -? Shows this screen\n");
fprintf(stderr," -b Boot file \n"); fprintf(stderr," -b Boot file \n");
fprintf(stderr," -f Do not consult startup prolog files\n"); fprintf(stderr," -f initialization file or \"none\"\n");
fprintf(stderr," -g Run Goal Before Top-Level \n"); fprintf(stderr," -g Run Goal Before Top-Level \n");
fprintf(stderr," -z Run Goal Before Top-Level \n"); fprintf(stderr," -z Run Goal Before Top-Level \n");
fprintf(stderr," -q start with informational messages off\n"); fprintf(stderr," -q start with informational messages off\n");
@ -357,6 +357,16 @@ parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
break; break;
#endif /* EMACS */ #endif /* EMACS */
case 'f': case 'f':
if (argc && argv[1][0] != '-') {
argc--;
argv++;
if (!strcmp(*argv,"none")) {
iap->FastBoot = TRUE;
} else {
iap->YapPrologRCFile = *argv;
}
break;
}
iap->FastBoot = TRUE; iap->FastBoot = TRUE;
break; break;
#ifdef MYDDAS_MYSQL #ifdef MYDDAS_MYSQL
@ -414,6 +424,7 @@ parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
p++; p++;
ssize = &(iap->MaxTableSpaceSize); ssize = &(iap->MaxTableSpaceSize);
} }
#endif /* TABLING */
if (*++p == '\0') if (*++p == '\0')
{ {
if (argc > 1) if (argc > 1)
@ -452,8 +463,6 @@ parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
} }
} }
break; break;
#endif /* TABLING */
goto GetSize;
case 'h': case 'h':
case 'H': case 'H':
ssize = &(iap->HeapSize); ssize = &(iap->HeapSize);