diff --git a/src/snc/parse.c b/src/snc/parse.c index 4265ac0984379fbc059563c93f544f0e4ae39a08..c3374c2a6c5848e18ffa12767c5e23a1f1b7365a 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 66076b8664226b50c5770efe8c90b3fc2933a8b8..208f22fcdbbf3c23bca96eb64ff4c34fc4da6bd2 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) {