Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
df508764
Commit
df508764
authored
Dec 19, 2008
by
John van Groningen
Browse files
add ExitEnv_valid
parent
7a682800
Changes
2
Hide whitespace changes
Inline
Side-by-side
backendC/CleanCompilerSources/comsupport.c
View file @
df508764
...
...
@@ -44,6 +44,7 @@ unsigned CurrentLine;
Symbol
CurrentSymbol
;
Bool
CompilerError
;
int
ExitEnv_valid
=
0
;
jmp_buf
ExitEnv
;
char
*
OutName
=
(
char
*
)
NIL
;
...
...
@@ -334,10 +335,10 @@ void FatalCompError (char *mod, char *proc, char *mess)
}
}
# endif
exit
(
1
);
#else
longjmp
(
ExitEnv
,
1
);
if
(
!
ExitEnv_valid
)
exit
(
1
);
#endif
longjmp
(
ExitEnv
,
1
);
}
void
PrintSymbol
(
Symbol
symbol
,
File
file
)
...
...
@@ -653,6 +654,10 @@ void ExitCompiler (void)
OutName
=
(
char
*
)
NIL
;
}
#ifdef CLEAN2
extern
struct
clean_string_128
{
size_t
length
;
char
chars
[
128
];
}
clean_error_string
;
#endif
#ifdef _DEBUG_
void
ErrorInCompiler
(
char
*
mod
,
char
*
proc
,
char
*
msg
)
...
...
@@ -663,6 +668,12 @@ void ErrorInCompiler (char *mod, char *proc, char *msg)
FPrintF
(
StdError
,
"Error in compiler: Module %s, Function %s,
\"
%s
\"\n
"
,
mod
,
proc
,
msg
);
#ifdef CLEAN2
if
(
CurrentModule
!=
NULL
)
sprintf
(
clean_error_string
.
chars
,
"Error in compiler while compiling %s.icl: Module %s, Function %s,
\"
%s
\"\n
"
,
CurrentModule
,
mod
,
proc
,
msg
);
else
sprintf
(
clean_error_string
.
chars
,
"Error in compiler: Module %s, Function %s,
\"
%s
\"\n
"
,
mod
,
proc
,
msg
);
clean_error_string
.
length
=
strlen
(
clean_error_string
.
chars
);
# ifdef _MAC_
{
FILE
*
f
;
...
...
@@ -676,8 +687,10 @@ void ErrorInCompiler (char *mod, char *proc, char *msg)
fclose
(
f
);
}
}
# endif
exit
(
1
);
# endif
if
(
ExitEnv_valid
)
longjmp
(
ExitEnv
,
1
);
#endif
}
...
...
backendC/CleanCompilerSources/comsupport.h
View file @
df508764
...
...
@@ -30,6 +30,7 @@ extern char *OutName, *InName;
extern
unsigned
CurrentLine
;
extern
int
ExitEnv_valid
;
extern
File
OpenedFile
;
extern
jmp_buf
ExitEnv
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment