diff options
author | Stephen Davies <sdavies@sdc.com.au> | 2014-10-04 11:43:36 +0930 |
---|---|---|
committer | Stephen Davies <sdavies@sdc.com.au> | 2014-10-04 11:43:36 +0930 |
commit | abff9b12506c0b8d971a7b6c9b08ada126d67e0d (patch) | |
tree | 4ad49711124e85991aaf701ca30d2e8d3f399cdc | |
parent | 4959339c8a962b54bf33fd9e3d9f46b3f1c3c29e (diff) | |
download | egawk-abff9b12506c0b8d971a7b6c9b08ada126d67e0d.tar.gz egawk-abff9b12506c0b8d971a7b6c9b08ada126d67e0d.tar.bz2 egawk-abff9b12506c0b8d971a7b6c9b08ada126d67e0d.zip |
Rename function and program variables
-rw-r--r-- | awkgram.y | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -148,8 +148,8 @@ static INSTRUCTION *ip_endfile; static INSTRUCTION *ip_beginfile; static INSTRUCTION *comment = NULL; -static INSTRUCTION *comment0 = NULL; -static INSTRUCTION *commentf = NULL; +static INSTRUCTION *program_comment = NULL; +static INSTRUCTION *function_comment = NULL; static bool func_first = true; @@ -426,7 +426,7 @@ function_prologue split_comment(); /* save any other pre-function comment as function comment */ if (comment != NULL) { - commentf = comment; + function_comment = comment; comment = NULL; } func_first = false; @@ -2321,8 +2321,8 @@ mk_program() if (begin_block != NULL) cp = list_merge(begin_block, cp); - if (comment0 != NULL) { - (void) list_prepend(cp, comment0); + if (program_comment != NULL) { + (void) list_prepend(cp, program_comment); } if (comment != NULL) { (void) list_append(cp, comment); @@ -3056,14 +3056,14 @@ split_comment(void) /* have at least two comments so split at last blank line (\n\n) */ while (l >= 0) { if (p[l] == '\n' && p[l+1] == '\n') { - commentf = comment; - n = commentf->memory; - commentf->memory = make_str_node(p + l + 2, n->stlen - l - 2, 0); + function_comment = comment; + n = function_comment->memory; + function_comment->memory = make_str_node(p + l + 2, n->stlen - l - 2, 0); /* create program comment */ - comment0 = bcalloc(Op_comment, 1, sourceline); - comment0->source_file = comment->source_file; + program_comment = bcalloc(Op_comment, 1, sourceline); + program_comment->source_file = comment->source_file; p[l + 2] = 0; - comment0->memory = make_str_node(p, l + 2, 0); + program_comment->memory = make_str_node(p, l + 2, 0); comment = NULL; freenode(n); break; @@ -4412,10 +4412,10 @@ mk_function(INSTRUCTION *fi, INSTRUCTION *def) /* add any pre-function comment to start of action for profile.c */ - if (commentf != NULL) { - commentf->source_line = 0; - (void) list_prepend(def, commentf); - commentf = NULL; + if (function_comment != NULL) { + function_comment->source_line = 0; + (void) list_prepend(def, function_comment); + function_comment = NULL; } /* add an implicit return at end; |