/* "errors" : Warnings, errors and fatal errors */
/* (with error throwback code for RISC OS machines) */
/* */
-/* Part of Inform 6.40 */
+/* Part of Inform 6.41 */
/* copyright (c) Graham Nelson 1993 - 2022 */
/* */
/* Inform is free software: you can redistribute it and/or modify */
/* Survivable diagnostics: */
/* compilation errors style 1 */
/* warnings style 2 */
-/* linkage errors style 3 */
+/* linkage errors style 3 (no longer used) */
/* compiler errors style 4 (these should never happen and */
/* indicate a bug in Inform) */
/* ------------------------------------------------------------------------- */
-int no_errors, no_warnings, no_suppressed_warnings, no_link_errors,
- no_compiler_errors;
+int no_errors, no_warnings, no_suppressed_warnings, no_compiler_errors;
char *forerrors_buff;
int forerrors_pointer;
switch(style)
{ case 1: printf("Error: "); no_errors++; break;
case 2: printf("Warning: "); no_warnings++; break;
- case 3: printf("Error: [linking '%s'] ", current_module_filename);
- no_link_errors++; no_errors++; break;
+ case 3: printf("Error: [linking] "); no_errors++; break;
case 4: printf("*** Compiler error: ");
no_compiler_errors++; break;
}
message(2,error_message_buff);
}
-/* ------------------------------------------------------------------------- */
-/* Style 3: Link error message routines */
-/* ------------------------------------------------------------------------- */
-
-extern void link_error(char *s)
-{ if (no_errors==MAX_ERRORS) fatalerror("Too many errors: giving up");
- message(3,s);
-}
-
-extern void link_error_named(char *s1, char *s2)
-{ snprintf(error_message_buff, ERROR_BUFLEN,"%s \"%s\"",s1,s2);
- ellipsize_error_message_buff();
- link_error(error_message_buff);
-}
-
/* ------------------------------------------------------------------------- */
/* Style 4: Compiler error message routines */
/* ------------------------------------------------------------------------- */
extern void print_sorry_message(void)
{ printf(
"***********************************************************************\n\
-* 'Compiler errors' should never occur if Inform is working properly. *\n\
-* Check to see if there is a more recent version available, from which\n\
-* the problem may have been removed. If not, please report this fault\n\
-* and if at all possible, please include your source code, as faults\n\
-* such as these are rare and often difficult to reproduce. Sorry.\n\
+* 'Compiler errors' should never occur if Inform is working properly. *\n\
+* Check to see if there is a more recent version available, from which *\n\
+* the problem may have been removed. If not, please report this fault *\n\
+* and if at all possible, please include your source code, as faults *\n\
+* such as these are rare and often difficult to reproduce. Sorry. *\n\
***********************************************************************\n");
}
extern int compiler_error(char *s)
-{ if (no_link_errors > 0) return FALSE;
+{
if (no_errors > 0) return FALSE;
if (no_compiler_errors==MAX_ERRORS)
fatalerror("Too many compiler errors: giving up");
}
extern int compiler_error_named(char *s1, char *s2)
-{ if (no_link_errors > 0) return FALSE;
+{
if (no_errors > 0) return FALSE;
snprintf(error_message_buff, ERROR_BUFLEN, "%s \"%s\"",s1,s2);
ellipsize_error_message_buff();