Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Duncan White
C-datadec
Commits
1e9417e3
Commit
1e9417e3
authored
Apr 07, 1992
by
dcw
Browse files
realised was necessary to put all the pointer type declns at the top;
required a few changes to impln_declns
parent
eab25d89
Changes
1
Hide whitespace changes
Inline
Side-by-side
m2decs.c
View file @
1e9417e3
...
...
@@ -231,10 +231,11 @@ static void defn_onetype( d ) decln d;
/* ----------------------- Implementation module ------------------------- */
static
void
impln_declns
(
globals
,
modulename
,
d
)
char
*
globals
,
*
modulename
;
declnlist
d
;
static
void
impln_declns
(
globals
,
modulename
,
d
ecs
)
char
*
globals
,
*
modulename
;
declnlist
d
ecs
;
{
FILE
*
implnfile
;
char
tempname
[
256
];
declnlist
d
;
sprintf
(
tempname
,
"%s.mod"
,
modulename
);
implnfile
=
fopen
(
tempname
,
"w"
);
...
...
@@ -267,14 +268,24 @@ static void impln_declns( globals, modulename, d ) char *globals, *modulename; d
nl
();
}
for
(
;
d
!=
NULL
;
d
=
d
->
next
)
line
(
"(* Pointer type declarations *)"
);
line
(
"TYPE"
);
indent
();
for
(
d
=
decs
;
d
!=
NULL
;
d
=
d
->
next
)
{
impln_onetype
(
d
);
if
(
d
->
Struct
)
{
line
(
"%s
\t
= POINTER TO %sRec;"
,
d
->
name
,
d
->
name
);
nl
();
}
}
if
(
print
)
outdent
();
for
(
d
=
decs
;
d
!=
NULL
;
d
=
d
->
next
)
{
write_bool
(
);
impln_onetype
(
d
);
}
write_bool
();
line
(
"BEGIN"
);
line
(
"END %s."
,
modulename
);
...
...
@@ -294,9 +305,6 @@ static void impln_onetype( d ) decln d;
{
line
(
"TYPE"
);
indent
();
line
(
"%s
\t
= POINTER TO %sRec;"
,
d
->
name
,
d
->
name
);
nl
();
line
(
"%sRec = RECORD"
,
d
->
name
);
indent
();
...
...
@@ -337,10 +345,7 @@ static void impln_onetype( d ) decln d;
}
}
if
(
print
)
{
printproc_body
(
d
);
}
printproc_body
(
d
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment