X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=error.c;h=664aecbbaadb5ae2e0371a2504c86b6bd392d470;hp=9b5460b850e8f35846b6997e8f0a8f5bc82ebca6;hb=ace0b549a94110b69ec61442f825fb421b79799a;hpb=9153334781cd2e23750f4dc002e847606c07a1f0 diff --git a/error.c b/error.c index 9b5460b..664aecb 100644 --- a/error.c +++ b/error.c @@ -1,7 +1,7 @@ // // RMAC - Reboot's Macro Assembler for all Atari computers // ERROR.C - Error Handling -// Copyright (C) 199x Landon Dyer, 2011-2018 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2011-2020 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 // Source utilised with the kind permission of Landon Dyer // @@ -11,18 +11,21 @@ #include "listing.h" #include "token.h" +// Exported variables int errcnt; // Error count char * err_fname; // Name of error message file +// Internal variables static long unused; // For supressing 'write' warnings // // Report error if not at EOL +// // N.B.: Since this should *never* happen, we can feel free to add whatever // diagnostics that will help in tracking down a problem to this function. // -int at_eol(void) +int ErrorIfNotAtEOL(void) { if (*tok != EOL) { @@ -40,9 +43,9 @@ int at_eol(void) // // Cannot create a file // -void cantcreat(const char * fn) +void CantCreateFile(const char * fn) { - printf("cannot create: '%s'\n", fn); + printf("Cannot create file: '%s'\n", fn); exit(1); } @@ -66,7 +69,7 @@ void err_setup(void) err_fname = NULL; if ((err_fd = open(fnbuf, _OPEN_FLAGS, _PERM_MODE)) < 0) - cantcreat(fnbuf); + CantCreateFile(fnbuf); err_flag = 1; }