X-Git-Url: https://jxself.org/git/?p=inform.git;a=blobdiff_plain;f=src%2Ferrors.c;fp=src%2Ferrors.c;h=a71447e9b3aa5757abd087ea4b897113ca2df58f;hp=09efcd28fcb56f85ff5b101f138338adc82da31f;hb=ee3b3a0cb830792c0569230872a0af20eab8bb7b;hpb=8e63120c630c94c598d4e2d6ba823dac59bce8fa diff --git a/src/errors.c b/src/errors.c index 09efcd2..a71447e 100644 --- a/src/errors.c +++ b/src/errors.c @@ -2,7 +2,7 @@ /* "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 */ @@ -226,13 +226,12 @@ extern void memory_out_error(int32 size, int32 howmany, char *name) /* 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; @@ -245,8 +244,7 @@ static void message(int style, char *s) 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; } @@ -477,21 +475,6 @@ extern void obsolete_warning(char *s1) 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 */ /* ------------------------------------------------------------------------- */ @@ -499,16 +482,16 @@ extern void link_error_named(char *s1, char *s2) 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"); @@ -517,7 +500,7 @@ extern int compiler_error(char *s) } 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();