Skip to content

Commit

Permalink
Process EXTERNALGUI. Add -e flag for this.
Browse files Browse the repository at this point in the history
  • Loading branch information
jphartmann committed Dec 7, 2015
1 parent b9f93a0 commit 4599ce3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

static char shortopts[] =

"hf:r:db:vt::"
"ehf:r:db:vt::"
#if defined(ENABLE_BUILTIN_SYMBOLS)
"s:"
#endif
Expand All @@ -51,6 +51,7 @@ static struct option longopts[] =
{ "daemon", no_argument, NULL, 'd' },
{ "herclogo", required_argument, NULL, 'b' },
{ "verbose", no_argument, NULL, 'v' },
{ "externalgui", no_argument, NULL, 'e' },

#if defined(ENABLE_BUILTIN_SYMBOLS)
{ "defsym", required_argument, NULL, 's' },
Expand Down Expand Up @@ -88,6 +89,8 @@ static struct cfgandrcfile cfgorrc[ cfgorrccount ] =
{ NULL, "HERCULES_RC", "hercules.rc", "Recovery", },
};

static int e_gui; /* EXTERNALGUI parm */

#if defined(OPTION_DYNAMIC_LOAD)
#define MAX_DLL_TO_LOAD 50
static char *dll_load[MAX_DLL_TO_LOAD]; /* Pointers to modnames */
Expand Down Expand Up @@ -387,9 +390,6 @@ DLL_EXPORT int impl(int argc, char *argv[])
TID rctid; /* RC file thread identifier */
TID logcbtid; /* RC file thread identifier */
int rc;
#if defined(EXTERNALGUI)
int e_gui = FALSE; /* EXTERNALGUI parm */
#endif

/* Seed the pseudo-random number generator */
srand( time(NULL) );
Expand Down Expand Up @@ -671,7 +671,7 @@ int e_gui = FALSE; /* EXTERNALGUI parm */
the logger facility for handling by virtue of stdout/stderr
being redirected to the logger facility.
*/
if (!sysblk.daemon_mode) logger_init();
if (!sysblk.daemon_mode || e_gui) logger_init();

/*
Setup the initial codepage
Expand Down Expand Up @@ -1173,6 +1173,9 @@ int c = 0; /* Next option flag */
case 'd':
sysblk.daemon_mode = 1;
break;
case 'e':
e_gui = 1;
break;

case 't':
sysblk.scrtest = 1;
Expand Down

0 comments on commit 4599ce3

Please sign in to comment.