Skip to content

Commit

Permalink
Add support for $(VERSION) in hercules.cnf
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-J-Jansen committed Mar 14, 2016
1 parent ee6382b commit b4759dd
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions bldcfg.c
Expand Up @@ -150,13 +150,13 @@ void delayed_exit (int exit_code)
{
/* Delay exiting is to give the system
* time to display the error message. */
fflush(stderr);
fflush(stdout);
fflush(stderr);
fflush(stdout);
usleep(100000);
// hdl_shut();
do_shutdown();
fflush(stderr);
fflush(stdout);
fflush(stderr);
fflush(stdout);
usleep(100000);
exit(exit_code);
}
Expand Down Expand Up @@ -567,6 +567,11 @@ char *buf1; /* Pointer to resolved buffer*/
set_symbol("CCUU","$(CCUU)");
set_symbol("ccuu","$(ccuu)");

/* VERISION will be set here, earlier than in @PJJ */
/* console.c in order to make it usable in the @PJJ */
/* hercules configuration file. @PJJ */
set_symbol("VERSION", VERSION);

buf1=resolve_symbol_string(buf);

if(buf1!=NULL)
Expand All @@ -579,6 +584,11 @@ char *buf1; /* Pointer to resolved buffer*/
delayed_exit(1);
}
strcpy(buf,buf1);

/* Free buf1 as explicitly stated to be needed in @PJJ */
/* resolve_symbol_string. @PJJ */
free(buf1);

}
#endif /*defined(OPTION_CONFIG_SYMBOLS)*/

Expand Down Expand Up @@ -794,7 +804,7 @@ char pathname[MAX_PATH]; /* file path in host format */
#if defined(_FEATURE_ASN_AND_LX_REUSE)
sysblk.asnandlxreuse = 0; /* ASN And LX Reuse is defaulted to DISABLE */
#endif

#ifdef PANEL_REFRESH_RATE
sysblk.panrate = PANEL_REFRESH_RATE_SLOW;
#endif
Expand Down Expand Up @@ -889,8 +899,8 @@ char pathname[MAX_PATH]; /* file path in host format */
#if defined( OPTION_ENHANCED_CONFIG_INCLUDE )
if (strcasecmp (keyword, "ignore") == 0)
{
if (strcasecmp (operand, "include_errors") == 0)
{
if (strcasecmp (operand, "include_errors") == 0)
{
logmsg( _("HHCCF081I %s Will ignore include errors .\n"),
fname);
inc_ignore_errors = 1 ;
Expand All @@ -901,7 +911,7 @@ char pathname[MAX_PATH]; /* file path in host format */

/* Check for include statement */
if (strcasecmp (keyword, "include") == 0)
{
{
if (++inc_level >= MAX_INC_LEVEL)
{
logmsg(_( "HHCCF082S Error in %s line %d: "
Expand All @@ -917,13 +927,13 @@ char pathname[MAX_PATH]; /* file path in host format */
if (inc_fp[inc_level] == NULL)
{
inc_level--;
if ( inc_ignore_errors == 1 )
if ( inc_ignore_errors == 1 )
{
logmsg(_("HHCCF084W %s Open error ignored file %s: %s\n"),
fname, operand, strerror(errno));
continue ;
}
else
else
{
logmsg(_("HHCCF085S %s Open error file %s: %s\n"),
fname, operand, strerror(errno));
Expand Down Expand Up @@ -1706,13 +1716,13 @@ char pathname[MAX_PATH]; /* file path in host format */
if (inc_fp[inc_level] == NULL)
{
inc_level--;
if ( inc_ignore_errors == 1 )
if ( inc_ignore_errors == 1 )
{
logmsg(_("HHCCF084W %s Open error ignored file %s: %s\n"),
fname, operand, strerror(errno));
continue ;
}
else
else
{
logmsg(_("HHCCF085E %s Open error file %s: %s\n"),
fname, operand, strerror(errno));
Expand Down

0 comments on commit b4759dd

Please sign in to comment.