From 163853f5bc158f9eb9a2f3695a23cc42c05c8f3c Mon Sep 17 00:00:00 2001 From: William Lupton Date: Thu, 1 Oct 1998 21:29:13 +0000 Subject: [PATCH] supported setting initial value on declaration (NB, will give compilation error if using recursive option) --- src/sequencer/phase2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sequencer/phase2.c b/src/sequencer/phase2.c index fda9467a2..35597b6ab 100644 --- a/src/sequencer/phase2.c +++ b/src/sequencer/phase2.c @@ -17,6 +17,7 @@ 01mar94,ajk Changed algorithm for assigning event bits. 13jan98,wfl Supported E_COMMA token (for compound expressions). 09mar98,wfl Avoided compilation warnings under Tornado +01oct98,wfl Supported setting initial value on declaration. ***************************************************************************/ /*#define DEBUG 1*/ @@ -315,6 +316,9 @@ gen_var_decl() if (vp->type == V_STRING) printf("[MAX_STRING_SIZE]"); + if (vp->value != NULL) + printf(" = %s", vp->value); + printf(";\n"); } if (reent_opt)