X-Git-Url: https://jxself.org/git/?p=inform.git;a=blobdiff_plain;f=src%2Ferrors.c;h=08dd87efa21a698074499f4fe492b907a668e59e;hp=c1e62412873f35669fdde5852bfb38fd56ceef0e;hb=c881aa3386c00d7021ffabf2f66275d6c110c1c1;hpb=8760c1ba6442153afe76bcac742e086f90c59fe8 diff --git a/src/errors.c b/src/errors.c index c1e6241..08dd87e 100644 --- a/src/errors.c +++ b/src/errors.c @@ -3,7 +3,7 @@ /* (with error throwback code for RISC OS machines) */ /* */ /* Part of Inform 6.35 */ -/* copyright (c) Graham Nelson 1993 - 2020 */ +/* copyright (c) Graham Nelson 1993 - 2021 */ /* */ /* Inform is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ @@ -93,6 +93,10 @@ static void print_preamble(void) static char *location_text(brief_location report_line) { + int j; + char *p; + int len; + /* Convert the location to a brief string. (Some error messages need to report a secondary location.) This uses the static buffer other_pos_buff. */ @@ -104,9 +108,6 @@ static char *location_text(brief_location report_line) errpos.main_flag = 0; errpos.orig_source = NULL; export_brief_location(report_line, &errpos); - - int j; - char *p; j = errpos.file_number; if (j <= 0 || j > total_files) p = errpos.source; @@ -114,7 +115,7 @@ static char *location_text(brief_location report_line) if (!p) p = ""; - int len = 0; + len = 0; if (!(errpos.main_flag)) { snprintf(other_pos_buff+len, ERROR_BUFLEN-len,