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)
File rules_file;
#endif
struct clean_string_128 { size_t length; char chars[128]; } clean_error_string;
int
BEGenerateCode (CleanString outputFile)
{
......@@ -3276,9 +3278,18 @@ BEGenerateCode (CleanString outputFile)
ImpRule rule;
Bool hadExtension;
clean_error_string.length=0;
if (CompilerError)
return False;
if (setjmp (ExitEnv)!=0){
ExitEnv_valid=0;
return False;
}
ExitEnv_valid=1;
// RemoveSpecialArrayFunctionsFromSymbolList (&gBEState.be_icl.beicl_module->im_symbols);
/* +++ hack */
......@@ -3324,9 +3335,16 @@ BEGenerateCode (CleanString outputFile)
fclose (rules_file);
#endif
ExitEnv_valid=0;
return (!CompilerError);
} /* BEGenerateCode */
CleanString BEGetError (void)
{
return (CleanString)&clean_error_string;
}
void
BEExportType (int isDictionary, int typeIndex)
{
......@@ -3690,6 +3708,8 @@ BEInit (int argc)
{
Assert (!gBEState.be_initialised);
ExitEnv_valid=0;
CurrentPhase = "Back End";
CurrentModule = "<unknown module>";
CurrentExt = "";
......
Markdown is supported
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