support parms.h
pass argv[0]
This commit is contained in:
@@ -292,6 +292,11 @@ add_end_dot(char arg[])
|
||||
return arg;
|
||||
}
|
||||
|
||||
static int
|
||||
dump_runtime_variables(void)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* proccess command line arguments: valid switches are: -b boot -s
|
||||
* stack area size (K) -h heap area size -a aux stack size -e
|
||||
@@ -336,8 +341,13 @@ parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
|
||||
ssize = &(iap->NumberWorkers);
|
||||
goto GetSize;
|
||||
case 'd':
|
||||
if (!strcmp("dump-runtime-variables",p))
|
||||
return dump_runtime_variables();
|
||||
ssize = &(iap->DelayedReleaseLoad);
|
||||
goto GetSize;
|
||||
#else
|
||||
if (!strcmp("dump-runtime-variables",p))
|
||||
return dump_runtime_variables();
|
||||
#endif /* ENV_COPY || ACOW || SBA */
|
||||
#ifdef USE_SOCKET
|
||||
case 'c': /* running as client */
|
||||
@@ -746,14 +756,15 @@ init_standard_system(int argc, char *argv[], YAP_init_args *iap)
|
||||
iap->ErrorNo = 0;
|
||||
iap->ErrorCause = NULL;
|
||||
iap->QuietMode = FALSE;
|
||||
iap->Argv0 = argv[0];
|
||||
|
||||
BootMode = parse_yap_arguments(argc,argv,iap);
|
||||
|
||||
if (BootMode == YAP_FULL_BOOT_FROM_PROLOG) {
|
||||
#if HAVE_STRNCAT
|
||||
strncpy(boot_file, PL_SRC_DIR, 256);
|
||||
strncpy(boot_file, YAP_PL_SRCDIR, 256);
|
||||
#else
|
||||
strcpy(boot_file, PL_SRC_DIR);
|
||||
strcpy(boot_file, YAP_PL_SRCDIR);
|
||||
#endif
|
||||
#if HAVE_STRNCAT
|
||||
strncat(boot_file, BootFile, 255);
|
||||
@@ -805,9 +816,9 @@ exec_top_level(int BootMode, YAP_init_args *iap)
|
||||
YAP_Term goal, as[2];
|
||||
|
||||
#if HAVE_STRNCAT
|
||||
strncpy(init_file, PL_SRC_DIR, 256);
|
||||
strncpy(init_file, YAP_PL_SRCDIR, 256);
|
||||
#else
|
||||
strcpy(init_file, PL_SRC_DIR);
|
||||
strcpy(init_file, YAP_PL_SRCDIR);
|
||||
#endif
|
||||
#if HAVE_STRNCAT
|
||||
strncat(init_file, InitFile, 255);
|
||||
|
||||
Reference in New Issue
Block a user