Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sequencer-2-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
epics-modules
sequencer-2-2
Commits
97fc3cbe
Commit
97fc3cbe
authored
15 years ago
by
benjamin.franksen
Browse files
Options
Downloads
Patches
Plain Diff
renamed var_list, var_tail -> global_var_list, global_var_tail
parent
f0763902
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/snc/parse.c
+7
-7
7 additions, 7 deletions
src/snc/parse.c
src/snc/phase2.c
+6
-6
6 additions, 6 deletions
src/snc/phase2.c
with
13 additions
and
13 deletions
src/snc/parse.c
+
7
−
7
View file @
97fc3cbe
...
@@ -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
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/snc/phase2.c
+
6
−
6
View file @
97fc3cbe
...
@@ -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
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment