From 97fc3cbe8152fc6b3f8bcf6987265dafc5b7811c Mon Sep 17 00:00:00 2001 From: "benjamin.franksen" <benjamin.franksen@bessy.de> Date: Mon, 1 Mar 2010 19:38:37 +0000 Subject: [PATCH] renamed var_list, var_tail -> global_var_list, global_var_tail --- src/snc/parse.c | 14 +++++++------- src/snc/phase2.c | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/snc/parse.c b/src/snc/parse.c index 4265ac09..c3374c2a 100644 --- a/src/snc/parse.c +++ b/src/snc/parse.c @@ -58,8 +58,8 @@ Expr *entry_code_list; /* Start of entry code list */ Expr *exit_code_list; /* Start of exit code list */ -Var *var_list = NULL; /* start of variable list */ -Var *var_tail = NULL; /* tail of variable list */ +Var *global_var_list = NULL; /* start of global variable list */ +Var *global_var_tail = NULL; /* tail of global variable list */ Chan *chan_list = NULL; /* start of DB channel list */ Chan *chan_tail = NULL; /* tail of DB channel list */ @@ -688,11 +688,11 @@ void global_c_stmt( /* Add a variable to the variable linked list */ void addVar(Var *vp) { - if (var_list == NULL) - var_list = vp; + if (global_var_list == NULL) + global_var_list = vp; else - var_tail->next = vp; - var_tail = vp; + global_var_tail->next = vp; + global_var_tail = vp; vp->next = NULL; } @@ -702,7 +702,7 @@ Var *findVar(char *name) { Var *vp; - for (vp = var_list; vp != NULL; vp = vp->next) + for (vp = global_var_list; vp != NULL; vp = vp->next) { if (strcmp(vp->name, name) == 0) { diff --git a/src/snc/phase2.c b/src/snc/phase2.c index 66076b86..208f22fc 100644 --- a/src/snc/phase2.c +++ b/src/snc/phase2.c @@ -316,7 +316,7 @@ Expr *sp; /* beginning of state list */ /* Generate a C variable declaration for each variable declared in SNL */ void gen_var_decl() { - extern Var *var_list; + extern Var *global_var_list; Var *vp; char *vstr; int nv; @@ -327,7 +327,7 @@ void gen_var_decl() /* Convert internal type to `C' type */ if (reent_opt) printf("struct UserVar {\n"); - for (nv=0, vp = var_list; vp != NULL; nv++, vp = vp->next) + for (nv=0, vp = global_var_list; vp != NULL; nv++, vp = vp->next) { switch (vp->type) { @@ -480,12 +480,12 @@ int db_chan_count() */ int db_queue_count() { - extern Var *var_list; + extern Var *global_var_list; int nqueue; Var *vp; nqueue = 0; - for (vp = var_list; vp != NULL; vp = vp->next) + for (vp = global_var_list; vp != NULL; vp = vp->next) { if (vp->type != V_EVFLAG && vp->queued) { @@ -504,7 +504,7 @@ int db_queue_count() */ void assign_ef_bits() { - extern Var *var_list; + extern Var *global_var_list; extern Chan *chan_list; Var *vp; Chan *cp; @@ -514,7 +514,7 @@ void assign_ef_bits() /* Assign event flag numbers (starting at 1) */ printf("\n/* Event flags */\n"); num_events = 0; - for (vp = var_list; vp != NULL; vp = vp->next) + for (vp = global_var_list; vp != NULL; vp = vp->next) { if (vp->type == V_EVFLAG) { -- GitLab