small cleanups

This commit is contained in:
Vítor Santos Costa 2016-01-31 10:21:50 +00:00
parent 5c1c9a8570
commit 4ff7bdd340

@ -19,6 +19,7 @@
#include "config.h" #include "config.h"
#include "Yap.h" #include "Yap.h"
#include "YapHeap.h" #include "YapHeap.h"
#include "YapInterface.h"
#if HAVE_UNISTD_H #if HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
@ -44,9 +45,6 @@
#include <direct.h> #include <direct.h>
#endif #endif
void YAP_SetOutputMessage(void);
int YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap);
#if (DefTrailSpace < MinTrailSpace) #if (DefTrailSpace < MinTrailSpace)
#undef DefTrailSpace #undef DefTrailSpace
#define DefTrailSpace MinTrailSpace #define DefTrailSpace MinTrailSpace
@ -66,56 +64,58 @@ int YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap);
#define DEFAULT_SCHEDULERLOOP 10 #define DEFAULT_SCHEDULERLOOP 10
#define DEFAULT_DELAYEDRELEASELOAD 3 #define DEFAULT_DELAYEDRELEASELOAD 3
static void static void print_usage(void) {
print_usage(void) fprintf(stderr, "\n[ Valid switches for command line arguments: ]\n");
{ fprintf(stderr, " -? Shows this screen\n");
fprintf(stderr,"\n[ Valid switches for command line arguments: ]\n"); fprintf(stderr, " -b Boot file \n");
fprintf(stderr," -? Shows this screen\n"); fprintf(stderr, " -dump-runtime-variables\n");
fprintf(stderr," -b Boot file \n"); fprintf(stderr, " -f initialization file or \"none\"\n");
fprintf(stderr," -dump-runtime-variables\n"); fprintf(stderr, " -g Run Goal Before Top-Level \n");
fprintf(stderr," -f initialization file or \"none\"\n"); fprintf(stderr, " -z Run Goal Before Top-Level \n");
fprintf(stderr," -g Run Goal Before Top-Level \n"); fprintf(stderr, " -q start with informational messages off\n");
fprintf(stderr," -z Run Goal Before Top-Level \n"); fprintf(stderr, " -l load Prolog file\n");
fprintf(stderr," -q start with informational messages off\n"); fprintf(stderr, " -L run Prolog file and exit\n");
fprintf(stderr," -l load Prolog file\n"); fprintf(stderr, " -p extra path for file-search-path\n");
fprintf(stderr," -L run Prolog file and exit\n"); fprintf(stderr, " -hSize Heap area in Kbytes (default: %d, minimum: %d)\n",
fprintf(stderr," -p extra path for file-search-path\n");
fprintf(stderr," -hSize Heap area in Kbytes (default: %d, minimum: %d)\n",
DefHeapSpace, MinHeapSpace); DefHeapSpace, MinHeapSpace);
fprintf(stderr," -sSize Stack area in Kbytes (default: %d, minimum: %d)\n", fprintf(stderr,
" -sSize Stack area in Kbytes (default: %d, minimum: %d)\n",
DefStackSpace, MinStackSpace); DefStackSpace, MinStackSpace);
fprintf(stderr," -tSize Trail area in Kbytes (default: %d, minimum: %d)\n", fprintf(stderr,
" -tSize Trail area in Kbytes (default: %d, minimum: %d)\n",
DefTrailSpace, MinTrailSpace); DefTrailSpace, MinTrailSpace);
fprintf(stderr," -GSize Max Area for Global Stack\n"); fprintf(stderr, " -GSize Max Area for Global Stack\n");
fprintf(stderr," -LSize Max Area for Local Stack (number must follow L)\n"); fprintf(stderr,
fprintf(stderr," -TSize Max Area for Trail (number must follow L)\n"); " -LSize Max Area for Local Stack (number must follow L)\n");
fprintf(stderr," -nosignals disable signal handling from Prolog\n"); fprintf(stderr, " -TSize Max Area for Trail (number must follow L)\n");
fprintf(stderr,"\n[Execution Modes]\n"); fprintf(stderr, " -nosignals disable signal handling from Prolog\n");
fprintf(stderr," -J0 Interpreted mode (default)\n"); fprintf(stderr, "\n[Execution Modes]\n");
fprintf(stderr," -J1 Mixed mode only for user predicates\n"); fprintf(stderr, " -J0 Interpreted mode (default)\n");
fprintf(stderr," -J2 Mixed mode for all predicates\n"); fprintf(stderr, " -J1 Mixed mode only for user predicates\n");
fprintf(stderr," -J3 Compile all user predicates\n"); fprintf(stderr, " -J2 Mixed mode for all predicates\n");
fprintf(stderr," -J4 Compile all predicates\n"); fprintf(stderr, " -J3 Compile all user predicates\n");
fprintf(stderr, " -J4 Compile all predicates\n");
#ifdef TABLING #ifdef TABLING
fprintf(stderr," -ts Maximum table space area in Mbytes (default: unlimited)\n"); fprintf(stderr,
" -ts Maximum table space area in Mbytes (default: unlimited)\n");
#endif /* TABLING */ #endif /* TABLING */
#if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) || defined(YAPOR_THREADS) #if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) || \
fprintf(stderr," -w Number of workers (default: %d)\n", defined(YAPOR_THREADS)
fprintf(stderr, " -w Number of workers (default: %d)\n",
DEFAULT_NUMBERWORKERS); DEFAULT_NUMBERWORKERS);
fprintf(stderr," -sl Loop scheduler executions before look for hiden shared work (default: %d)\n", fprintf(stderr, " -sl Loop scheduler executions before look for hiden "
"shared work (default: %d)\n",
DEFAULT_SCHEDULERLOOP); DEFAULT_SCHEDULERLOOP);
fprintf(stderr," -d Value of delayed release of load (default: %d)\n", fprintf(stderr, " -d Value of delayed release of load (default: %d)\n",
DEFAULT_DELAYEDRELEASELOAD); DEFAULT_DELAYEDRELEASELOAD);
#endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA || YAPOR_THREADS */ #endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA || YAPOR_THREADS */
/* nf: Preprocessor */ /* nf: Preprocessor */
/* fprintf(stderr," -DVar=Name Persistent definition\n"); */ /* fprintf(stderr," -DVar=Name Persistent definition\n"); */
fprintf(stderr,"\n"); fprintf(stderr, "\n");
} }
static int static int myisblank(int c) {
myisblank(int c)
{
switch (c) { switch (c) {
case ' ': case ' ':
case '\t': case '\t':
@ -127,47 +127,34 @@ myisblank(int c)
} }
} }
static char * static char *add_end_dot(char arg[]) {
add_end_dot(char arg[])
{
int sz = strlen(arg), i; int sz = strlen(arg), i;
i = sz; i = sz;
while (i && myisblank(arg[--i])); while (i && myisblank(arg[--i]))
;
if (i && arg[i] != ',') { if (i && arg[i] != ',') {
char *p = (char *)malloc(sz+2); char *p = (char *)malloc(sz + 2);
if (!p) if (!p)
return NULL; return NULL;
strncpy(p,arg,sz); strncpy(p, arg, sz);
p[sz] = '.'; p[sz] = '.';
p[sz+1] = '\0'; p[sz + 1] = '\0';
return p; return p;
} }
return arg; return arg;
} }
static int static int dump_runtime_variables(void) {
dump_runtime_variables(void) fprintf(stdout, "CC=\"%s\"\n", C_CC);
{ fprintf(stdout, "YAP_ROOTDIR=\"%s\"\n", YAP_ROOTDIR);
fprintf(stdout,"CC=\"%s\"\n",C_CC); fprintf(stdout, "YAP_LIBS=\"%s\"\n", C_LIBS);
fprintf(stdout,"YAP_ROOTDIR=\"%s\"\n",YAP_ROOTDIR); fprintf(stdout, "YAP_SHLIB_SUFFIX=\"%s\"\n", SO_EXT);
fprintf(stdout,"YAP_LIBS=\"%s\"\n",C_LIBS); fprintf(stdout, "YAP_VERSION=%s\n", YAP_NUMERIC_VERSION);
fprintf(stdout,"YAP_SHLIB_SUFFIX=\"%s\"\n",SO_EXT);
fprintf(stdout,"YAP_VERSION=%s\n",YAP_NUMERIC_VERSION);
exit(0); exit(0);
return 1; return 1;
} }
/* X_API int YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap) {
* proccess command line arguments: valid switches are: -b boot -s
* stack area size (K) -h heap area size -a aux stack size -e
* emacs_mode -m -DVar=Value reserved memory for alloc IF DEBUG -p if you
* want to check out startup IF MAC -mpw if we are using the mpw
* shell
*/
int
YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
{
char *p; char *p;
int BootMode = YAP_BOOT_FROM_SAVED_CODE; int BootMode = YAP_BOOT_FROM_SAVED_CODE;
unsigned long int *ssize; unsigned long int *ssize;
@ -204,12 +191,10 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
iap->ErrorCause = NULL; iap->ErrorCause = NULL;
iap->QuietMode = FALSE; iap->QuietMode = FALSE;
while (--argc > 0) while (--argc > 0) {
{
p = *++argv; p = *++argv;
if (*p == '-') if (*p == '-')
switch (*++p) switch (*++p) {
{
case 'b': case 'b':
BootMode = YAP_BOOT_FROM_PROLOG; BootMode = YAP_BOOT_FROM_PROLOG;
iap->YapPrologBootFile = *++argv; iap->YapPrologBootFile = *++argv;
@ -221,18 +206,19 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
case 'q': case 'q':
iap->QuietMode = TRUE; iap->QuietMode = TRUE;
break; break;
#if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) || defined(YAPOR_THREADS) #if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) || \
defined(YAPOR_THREADS)
case 'w': case 'w':
ssize = &(iap->NumberWorkers); ssize = &(iap->NumberWorkers);
goto GetSize; goto GetSize;
case 'd': case 'd':
if (!strcmp("dump-runtime-variables",p)) if (!strcmp("dump-runtime-variables", p))
return dump_runtime_variables(); return dump_runtime_variables();
ssize = &(iap->DelayedReleaseLoad); ssize = &(iap->DelayedReleaseLoad);
goto GetSize; goto GetSize;
#else #else
case 'd': case 'd':
if (!strcmp("dump-runtime-variables",p)) if (!strcmp("dump-runtime-variables", p))
return dump_runtime_variables(); return dump_runtime_variables();
#endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA || YAPOR_THREADS */ #endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA || YAPOR_THREADS */
case 'F': case 'F':
@ -245,7 +231,7 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
if (argc > 1 && argv[1][0] != '-') { if (argc > 1 && argv[1][0] != '-') {
argc--; argc--;
argv++; argv++;
if (strcmp(*argv,"none")) { if (strcmp(*argv, "none")) {
iap->YapPrologRCFile = *argv; iap->YapPrologRCFile = *argv;
} }
break; break;
@ -270,7 +256,8 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
iap->ExecutionMode = YAPC_COMPILE_ALL; iap->ExecutionMode = YAPC_COMPILE_ALL;
break; break;
default: default:
fprintf(stderr,"[ YAP unrecoverable error: unknown switch -%c%c ]\n", *p, p[1]); fprintf(stderr, "[ YAP unrecoverable error: unknown switch -%c%c ]\n",
*p, p[1]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
p++; p++;
@ -282,7 +269,8 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
case 's': case 's':
case 'S': case 'S':
ssize = &(iap->StackSize); ssize = &(iap->StackSize);
#if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) || defined(YAPOR_THREADS) #if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) || \
defined(YAPOR_THREADS)
if (p[1] == 'l') { if (p[1] == 'l') {
p++; p++;
ssize = &(iap->SchedulerLoop); ssize = &(iap->SchedulerLoop);
@ -305,13 +293,13 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
} }
#endif /* TABLING */ #endif /* TABLING */
get_trail_size: get_trail_size:
if (*++p == '\0') if (*++p == '\0') {
{
if (argc > 1) if (argc > 1)
--argc, p = *++argv; --argc, p = *++argv;
else else {
{ fprintf(stderr,
fprintf(stderr,"[ YAP unrecoverable error: missing size in flag %s ]", argv[0]); "[ YAP unrecoverable error: missing size in flag %s ]",
argv[0]);
print_usage(); print_usage();
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -320,14 +308,14 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
unsigned long int i = 0, ch; unsigned long int i = 0, ch;
while ((ch = *p++) >= '0' && ch <= '9') while ((ch = *p++) >= '0' && ch <= '9')
i = i * 10 + ch - '0'; i = i * 10 + ch - '0';
switch(ch) { switch (ch) {
case 'M': case 'M':
case 'm': case 'm':
i *= 1024; i *= 1024;
ch = *p++; ch = *p++;
break; break;
case 'g': case 'g':
i *= 1024*1024; i *= 1024 * 1024;
ch = *p++; ch = *p++;
break; break;
case 'k': case 'k':
@ -346,13 +334,13 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
case 'H': case 'H':
ssize = &(iap->HeapSize); ssize = &(iap->HeapSize);
GetSize: GetSize:
if (*++p == '\0') if (*++p == '\0') {
{
if (argc > 1) if (argc > 1)
--argc, p = *++argv; --argc, p = *++argv;
else else {
{ fprintf(stderr,
fprintf(stderr,"[ YAP unrecoverable error: missing size in flag %s ]", argv[0]); "[ YAP unrecoverable error: missing size in flag %s ]",
argv[0]);
print_usage(); print_usage();
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -361,7 +349,7 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
unsigned long int i = 0, ch; unsigned long int i = 0, ch;
while ((ch = *p++) >= '0' && ch <= '9') while ((ch = *p++) >= '0' && ch <= '9')
i = i * 10 + ch - '0'; i = i * 10 + ch - '0';
switch(ch) { switch (ch) {
case 'M': case 'M':
case 'm': case 'm':
i *= 1024; i *= 1024;
@ -369,7 +357,7 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
break; break;
case 'g': case 'g':
case 'G': case 'G':
i *= 1024*1024; i *= 1024 * 1024;
ch = *p++; ch = *p++;
break; break;
case 'k': case 'k':
@ -377,9 +365,11 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
ch = *p++; ch = *p++;
break; break;
} }
if (ch) if (ch) {
{ fprintf(
fprintf(stderr,"[ YAP unrecoverable error: illegal size specification %s ]", argv[-1]); stderr,
"[ YAP unrecoverable error: illegal size specification %s ]",
argv[-1]);
Yap_exit(1); Yap_exit(1);
} }
*ssize = i; *ssize = i;
@ -392,7 +382,7 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
while (p[1] != '\0') { while (p[1] != '\0') {
int ch = p[1]; int ch = p[1];
if (ch >= 'A' && ch <= 'Z') if (ch >= 'A' && ch <= 'Z')
ch += ('a'-'A'); ch += ('a' - 'A');
if (ch >= 'a' && ch <= 'z') if (ch >= 'a' && ch <= 'z')
GLOBAL_Option[ch - 96] = 1; GLOBAL_Option[ch - 96] = 1;
} }
@ -400,7 +390,8 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
break; break;
#endif #endif
case 'L': case 'L':
if (p[1] && p[1] >= '0' && p[1] <= '9') /* hack to emulate SWI's L local option */ if (p[1] && p[1] >= '0' &&
p[1] <= '9') /* hack to emulate SWI's L local option */
{ {
ssize = &(iap->MaxStackSize); ssize = &(iap->MaxStackSize);
goto GetSize; goto GetSize;
@ -410,9 +401,10 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
case 'l': case 'l':
p++; p++;
if (!*++argv) { if (!*++argv) {
fprintf(stderr,"%% YAP unrecoverable error: missing load file name\n"); fprintf(stderr,
"%% YAP unrecoverable error: missing load file name\n");
exit(1); exit(1);
} else if (!strcmp("--",*argv)) { } else if (!strcmp("--", *argv)) {
/* shell script, the next entry should be the file itself */ /* shell script, the next entry should be the file itself */
iap->YapPrologRCFile = argv[1]; iap->YapPrologRCFile = argv[1];
argc = 1; argc = 1;
@ -443,7 +435,8 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
else { else {
argc--; argc--;
if (argc == 0) { if (argc == 0) {
fprintf(stderr," [ YAP unrecoverable error: missing initialization goal for option 'g' ]\n"); fprintf(stderr, " [ YAP unrecoverable error: missing "
"initialization goal for option 'g' ]\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
argv++; argv++;
@ -457,7 +450,9 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
else { else {
argc--; argc--;
if (argc == 0) { if (argc == 0) {
fprintf(stderr," [ YAP unrecoverable error: missing goal for option 'z' ]\n"); fprintf(
stderr,
" [ YAP unrecoverable error: missing goal for option 'z' ]\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
argv++; argv++;
@ -474,39 +469,40 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
if (!strcmp("-nosignals", p)) { if (!strcmp("-nosignals", p)) {
iap->PrologShouldHandleInterrupts = FALSE; iap->PrologShouldHandleInterrupts = FALSE;
break; break;
} else if (!strncmp("-home=",p,strlen("-home="))) { } else if (!strncmp("-home=", p, strlen("-home="))) {
GLOBAL_Home = p+strlen("-home="); GLOBAL_Home = p + strlen("-home=");
} else if (!strncmp("-cwd=",p,strlen("-cwd="))) { } else if (!strncmp("-cwd=", p, strlen("-cwd="))) {
#if __WINDOWS__ #if __WINDOWS__
if (_chdir( p+strlen("-cwd=") ) < 0) { if (_chdir(p + strlen("-cwd=")) < 0) {
#else #else
if (chdir( p+strlen("-cwd=") ) < 0) { if (chdir(p + strlen("-cwd=")) < 0) {
#endif #endif
fprintf(stderr," [ YAP unrecoverable error in setting cwd: %s ]\n", strerror(errno)); fprintf(stderr, " [ YAP unrecoverable error in setting cwd: %s ]\n",
strerror(errno));
} }
} else if (!strncmp("-stack=",p,strlen("-stack="))) { } else if (!strncmp("-stack=", p, strlen("-stack="))) {
ssize = &(iap->StackSize); ssize = &(iap->StackSize);
p+=strlen("-stack="); p += strlen("-stack=");
goto GetSize; goto GetSize;
} else if (!strncmp("-trail=",p,strlen("-trail="))) { } else if (!strncmp("-trail=", p, strlen("-trail="))) {
ssize = &(iap->TrailSize); ssize = &(iap->TrailSize);
p+=strlen("-trail="); p += strlen("-trail=");
goto GetSize; goto GetSize;
} else if (!strncmp("-heap=",p,strlen("-heap="))) { } else if (!strncmp("-heap=", p, strlen("-heap="))) {
ssize = &(iap->HeapSize); ssize = &(iap->HeapSize);
p+=strlen("-heap="); p += strlen("-heap=");
goto GetSize; goto GetSize;
} else if (!strncmp("-goal=",p,strlen("-goal="))) { } else if (!strncmp("-goal=", p, strlen("-goal="))) {
iap->YapPrologGoal = p+strlen("-goal="); iap->YapPrologGoal = p + strlen("-goal=");
} else if (!strncmp("-top-level=",p,strlen("-top-level="))) { } else if (!strncmp("-top-level=", p, strlen("-top-level="))) {
iap->YapPrologTopLevelGoal = p+strlen("-top-level="); iap->YapPrologTopLevelGoal = p + strlen("-top-level=");
} else if (!strncmp("-table=",p,strlen("-table="))) { } else if (!strncmp("-table=", p, strlen("-table="))) {
ssize = &(iap->MaxTableSpaceSize); ssize = &(iap->MaxTableSpaceSize);
p +=strlen( "-table="); p += strlen("-table=");
goto GetSize; goto GetSize;
} else if (!strncmp("-",p,strlen("-="))) { } else if (!strncmp("-", p, strlen("-="))) {
ssize = &(iap->MaxTableSpaceSize); ssize = &(iap->MaxTableSpaceSize);
p +=strlen( "-table="); p += strlen("-table=");
/* skip remaining arguments */ /* skip remaining arguments */
argc = 1; argc = 1;
} }
@ -517,7 +513,9 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
else { else {
argc--; argc--;
if (argc == 0) { if (argc == 0) {
fprintf(stderr," [ YAP unrecoverable error: missing paths for option 'p' ]\n"); fprintf(
stderr,
" [ YAP unrecoverable error: missing paths for option 'p' ]\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
argv++; argv++;
@ -525,30 +523,32 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
} }
break; break;
/* nf: Begin preprocessor code */ /* nf: Begin preprocessor code */
case 'D': case 'D': {
{
char *var, *value; char *var, *value;
++p; ++p;
var = p; var = p;
if (var == NULL || *var=='\0') if (var == NULL || *var == '\0')
break; break;
while(*p!='=' && *p!='\0') ++p; while (*p != '=' && *p != '\0')
if ( *p=='\0' ) break;
*p='\0';
++p; ++p;
value=p; if (*p == '\0')
if ( *value == '\0' ) break; break;
*p = '\0';
++p;
value = p;
if (*value == '\0')
break;
if (iap->def_c == YAP_MAX_YPP_DEFS) if (iap->def_c == YAP_MAX_YPP_DEFS)
break; break;
iap->def_var[iap->def_c]=var; iap->def_var[iap->def_c] = var;
iap->def_value[iap->def_c]=value; iap->def_value[iap->def_c] = value;
++(iap->def_c); ++(iap->def_c);
break; break;
} }
/* End preprocessor code */ /* End preprocessor code */
default: default: {
{ fprintf(stderr, "[ YAP unrecoverable error: unknown switch -%c ]\n",
fprintf(stderr,"[ YAP unrecoverable error: unknown switch -%c ]\n", *p); *p);
print_usage(); print_usage();
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -557,6 +557,6 @@ YAP_parse_yap_arguments(int argc, char *argv[], YAP_init_args *iap)
iap->SavedState = p; iap->SavedState = p;
} }
} }
//___androidlog_print(ANDROID_LOG_INFO, "YAP ", "boot mode %d", BootMode); //___androidlog_print(ANDROID_LOG_INFO, "YAP ", "boot mode %d", BootMode);
return BootMode; return BootMode;
} }