Commit da96634b authored by John van Groningen's avatar John van Groningen
Browse files

add ExitEnv_valid

parent df508764
...@@ -3269,6 +3269,8 @@ AddExtension (char *name) ...@@ -3269,6 +3269,8 @@ AddExtension (char *name)
File rules_file; File rules_file;
#endif #endif
struct clean_string_128 { size_t length; char chars[128]; } clean_error_string;
int int
BEGenerateCode (CleanString outputFile) BEGenerateCode (CleanString outputFile)
{ {
...@@ -3276,9 +3278,18 @@ BEGenerateCode (CleanString outputFile) ...@@ -3276,9 +3278,18 @@ BEGenerateCode (CleanString outputFile)
ImpRule rule; ImpRule rule;
Bool hadExtension; Bool hadExtension;
clean_error_string.length=0;
if (CompilerError) if (CompilerError)
return False; return False;
if (setjmp (ExitEnv)!=0){
ExitEnv_valid=0;
return False;
}
ExitEnv_valid=1;
// RemoveSpecialArrayFunctionsFromSymbolList (&gBEState.be_icl.beicl_module->im_symbols); // RemoveSpecialArrayFunctionsFromSymbolList (&gBEState.be_icl.beicl_module->im_symbols);
/* +++ hack */ /* +++ hack */
...@@ -3324,9 +3335,16 @@ BEGenerateCode (CleanString outputFile) ...@@ -3324,9 +3335,16 @@ BEGenerateCode (CleanString outputFile)
fclose (rules_file); fclose (rules_file);
#endif #endif
ExitEnv_valid=0;
return (!CompilerError); return (!CompilerError);
} /* BEGenerateCode */ } /* BEGenerateCode */
CleanString BEGetError (void)
{
return (CleanString)&clean_error_string;
}
void void
BEExportType (int isDictionary, int typeIndex) BEExportType (int isDictionary, int typeIndex)
{ {
...@@ -3690,6 +3708,8 @@ BEInit (int argc) ...@@ -3690,6 +3708,8 @@ BEInit (int argc)
{ {
Assert (!gBEState.be_initialised); Assert (!gBEState.be_initialised);
ExitEnv_valid=0;
CurrentPhase = "Back End"; CurrentPhase = "Back End";
CurrentModule = "<unknown module>"; CurrentModule = "<unknown module>";
CurrentExt = ""; CurrentExt = "";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment