X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=error.c;h=fa4ceb54a7ee8c64346f70ffaa53660eb2090df3;hp=e17dcc7cd1c832600c24e43f4dfb57b1228ddd38;hb=44301fed8a6d94673afa3aae3a8a0a76aebac6f7;hpb=2cc3049ac981e8485698b7592397bd66ddb5d9d0 diff --git a/error.c b/error.c index e17dcc7..fa4ceb5 100644 --- a/error.c +++ b/error.c @@ -47,7 +47,9 @@ void err_setup(void) { char fnbuf[FNSIZ]; - setfnum(cfileno); +// This seems like it's unnecessary, as token.c seems to take care of this all by itself. +// Can restore if it's really needed. If not, into the bit bucket it goes. :-) +// setfnum(cfileno); if (err_fname != NULL) { @@ -79,7 +81,7 @@ int error(const char * s) if (listing > 0) ship_ln(s); - sprintf(buf, "%s%d: Error: %s%s", curfname, curlineno, s, nl); + sprintf(buf, "%s %d: Error: %s%s", curfname, curlineno, s, nl); length = strlen(buf); if (err_flag) @@ -93,6 +95,7 @@ int error(const char * s) return ERROR; } + int errors(char * s, char * s1) { char buf[EBUFSIZ]; @@ -104,7 +107,7 @@ int errors(char * s, char * s1) if (listing > 0) ship_ln(buf); - sprintf(buf1, "%s%d: Error: %s%s", curfname, curlineno, buf, nl); + sprintf(buf1, "%s %d: Error: %s%s", curfname, curlineno, buf, nl); if (err_flag) write(err_fd, buf1, (LONG)strlen(buf1)); @@ -117,6 +120,7 @@ int errors(char * s, char * s1) return ERROR; } + int warn(char * s) { char buf[EBUFSIZ]; @@ -126,7 +130,7 @@ int warn(char * s) if (listing > 0) ship_ln(s); - sprintf(buf, "%s%d: Warning: %s%s", curfname, curlineno, s, nl); + sprintf(buf, "%s %d: Warning: %s%s", curfname, curlineno, s, nl); if (err_flag) write(err_fd, buf, (LONG)strlen(buf)); @@ -138,6 +142,7 @@ int warn(char * s) return OK; } + int warns(char * s, char * s1) { char buf[EBUFSIZ]; @@ -149,7 +154,7 @@ int warns(char * s, char * s1) if (listing > 0) ship_ln(s); - sprintf(buf1, "%s%d: Warning: %s%s", curfname, curlineno, buf, nl); + sprintf(buf1, "%s %d: Warning: %s%s", curfname, curlineno, buf, nl); if (err_flag) write(err_fd, buf1, (LONG)strlen(buf1)); @@ -161,6 +166,7 @@ int warns(char * s, char * s1) return OK; } + int warni(char * s, unsigned i) { char buf[EBUFSIZ]; @@ -172,7 +178,7 @@ int warni(char * s, unsigned i) if (listing > 0) ship_ln(buf); - sprintf(buf1, "%s%d: Warning: %s%s", curfname, curlineno, buf, nl); + sprintf(buf1, "%s %d: Warning: %s%s", curfname, curlineno, buf, nl); if (err_flag) write(err_fd, buf1, (LONG)strlen(buf1)); @@ -184,6 +190,7 @@ int warni(char * s, unsigned i) return OK; } + int fatal(char * s) { char buf[EBUFSIZ]; @@ -193,7 +200,7 @@ int fatal(char * s) if (listing > 0) ship_ln(s); - sprintf(buf, "%s%d: Fatal: %s%s", curfname, curlineno, s, nl); + sprintf(buf, "%s %d: Fatal: %s%s", curfname, curlineno, s, nl); if (err_flag) write(err_fd, buf, (LONG)strlen(buf)); @@ -203,12 +210,13 @@ int fatal(char * s) exit(1); } + int interror(int n) { char buf[EBUFSIZ]; err_setup(); - sprintf(buf, "%s%d: Internal Error Number %d%s", curfname, curlineno, n, nl); + sprintf(buf, "%s %d: Internal Error Number %d%s", curfname, curlineno, n, nl); if (listing > 0) ship_ln(buf);