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
a79313c2
Commit
a79313c2
authored
Nov 02, 1993
by
dcw
Browse files
fixed bug to do with handling of stuff after @@ when there's
no EXPORT or GLOBAL section - unitialized variable being used!
parent
2fc0bb95
Changes
2
Hide whitespace changes
Inline
Side-by-side
decs.c
View file @
a79313c2
...
...
@@ -112,10 +112,11 @@ static void h_declns( base, exports, init, d ) char *base, *exports; BOOL init;
line
(
"#define FALSE 0
\n
"
);
line
(
"#define NEW(t) ((t)malloc(sizeof(struct t)))
\n\n
"
);
exportptr
=
exports
;
if
(
*
exports
!=
'\0'
)
{
line
(
"/* Contents of EXPORT section */"
);
for
(
exportptr
=
exports
;
*
exportptr
;
exportptr
++
)
for
(
;
*
exportptr
;
exportptr
++
)
{
if
(
*
exportptr
==
'@'
&&
exportptr
[
1
]
==
'@'
&&
exportptr
[
2
]
==
'\n'
)
...
...
@@ -170,10 +171,11 @@ static void c_declns( base, globals, begin, d ) char *base, *globals, *begin; de
line
(
"#include <malloc.h>"
);
line
(
"#include
\"
%s.h
\"\n\n
"
,
base
);
globalptr
=
globals
;
if
(
*
globals
!=
'\0'
)
{
line
(
"/* Contents of GLOBAL section */"
);
for
(
globalptr
=
globals
;
*
globalptr
;
globalptr
++
)
for
(
;
*
globalptr
;
globalptr
++
)
{
if
(
*
globalptr
==
'@'
&&
globalptr
[
1
]
==
'@'
&&
globalptr
[
2
]
==
'\n'
)
...
...
m2decs.c
View file @
a79313c2
...
...
@@ -136,12 +136,13 @@ static void defn_declns( exports, modulename, decs ) char *exports, *modulename;
nl
();
nl
();
exportptr
=
exports
;
if
(
*
exports
!=
'\0'
)
{
int
i
;
line
(
"(* Contents of EXPORT section *)"
);
for
(
exportptr
=
exports
;
*
exportptr
;
exportptr
++
)
for
(
;
*
exportptr
;
exportptr
++
)
{
if
(
*
exportptr
==
'@'
&&
exportptr
[
1
]
==
'@'
&&
exportptr
[
2
]
==
'\n'
)
...
...
@@ -283,10 +284,11 @@ static void impln_declns( globals, begin, modulename, decs ) char *globals, *beg
nl
();
nl
();
globalptr
=
globals
;
if
(
*
globals
!=
'\0'
)
{
line
(
"(* Contents of GLOBAL section *)"
);
for
(
globalptr
=
globals
;
*
globalptr
;
globalptr
++
)
for
(
;
*
globalptr
;
globalptr
++
)
{
if
(
*
globalptr
==
'@'
&&
globalptr
[
1
]
==
'@'
&&
globalptr
[
2
]
==
'\n'
)
...
...
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