Skip to content
Snippets Groups Projects
Commit 97fc3cbe authored by benjamin.franksen's avatar benjamin.franksen
Browse files

renamed var_list, var_tail -> global_var_list, global_var_tail

parent f0763902
No related branches found
No related tags found
No related merge requests found
...@@ -58,8 +58,8 @@ Expr *entry_code_list; /* Start of entry code list */ ...@@ -58,8 +58,8 @@ Expr *entry_code_list; /* Start of entry code list */
Expr *exit_code_list; /* Start of exit code list */ Expr *exit_code_list; /* Start of exit code list */
Var *var_list = NULL; /* start of variable list */ Var *global_var_list = NULL; /* start of global variable list */
Var *var_tail = NULL; /* tail of variable list */ Var *global_var_tail = NULL; /* tail of global variable list */
Chan *chan_list = NULL; /* start of DB channel list */ Chan *chan_list = NULL; /* start of DB channel list */
Chan *chan_tail = NULL; /* tail of DB channel list */ Chan *chan_tail = NULL; /* tail of DB channel list */
...@@ -688,11 +688,11 @@ void global_c_stmt( ...@@ -688,11 +688,11 @@ void global_c_stmt(
/* Add a variable to the variable linked list */ /* Add a variable to the variable linked list */
void addVar(Var *vp) void addVar(Var *vp)
{ {
if (var_list == NULL) if (global_var_list == NULL)
var_list = vp; global_var_list = vp;
else else
var_tail->next = vp; global_var_tail->next = vp;
var_tail = vp; global_var_tail = vp;
vp->next = NULL; vp->next = NULL;
} }
...@@ -702,7 +702,7 @@ Var *findVar(char *name) ...@@ -702,7 +702,7 @@ Var *findVar(char *name)
{ {
Var *vp; 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) if (strcmp(vp->name, name) == 0)
{ {
......
...@@ -316,7 +316,7 @@ Expr *sp; /* beginning of state list */ ...@@ -316,7 +316,7 @@ Expr *sp; /* beginning of state list */
/* Generate a C variable declaration for each variable declared in SNL */ /* Generate a C variable declaration for each variable declared in SNL */
void gen_var_decl() void gen_var_decl()
{ {
extern Var *var_list; extern Var *global_var_list;
Var *vp; Var *vp;
char *vstr; char *vstr;
int nv; int nv;
...@@ -327,7 +327,7 @@ void gen_var_decl() ...@@ -327,7 +327,7 @@ void gen_var_decl()
/* Convert internal type to `C' type */ /* Convert internal type to `C' type */
if (reent_opt) if (reent_opt)
printf("struct UserVar {\n"); 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) switch (vp->type)
{ {
...@@ -480,12 +480,12 @@ int db_chan_count() ...@@ -480,12 +480,12 @@ int db_chan_count()
*/ */
int db_queue_count() int db_queue_count()
{ {
extern Var *var_list; extern Var *global_var_list;
int nqueue; int nqueue;
Var *vp; Var *vp;
nqueue = 0; 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) if (vp->type != V_EVFLAG && vp->queued)
{ {
...@@ -504,7 +504,7 @@ int db_queue_count() ...@@ -504,7 +504,7 @@ int db_queue_count()
*/ */
void assign_ef_bits() void assign_ef_bits()
{ {
extern Var *var_list; extern Var *global_var_list;
extern Chan *chan_list; extern Chan *chan_list;
Var *vp; Var *vp;
Chan *cp; Chan *cp;
...@@ -514,7 +514,7 @@ void assign_ef_bits() ...@@ -514,7 +514,7 @@ void assign_ef_bits()
/* Assign event flag numbers (starting at 1) */ /* Assign event flag numbers (starting at 1) */
printf("\n/* Event flags */\n"); printf("\n/* Event flags */\n");
num_events = 0; 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) if (vp->type == V_EVFLAG)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment