X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=error.c;h=83a6f372f73e869e6e3a9abc2ec9c12ffe0c16a9;hp=300a07e9daabcb3851381ea568e0fe5fa91701ba;hb=d0c28c349ddfb8393568037f68bddbe8979ce0df;hpb=b10167d55798ea184f97fafda075255c0852f3b6 diff --git a/error.c b/error.c index 300a07e..83a6f37 100644 --- a/error.c +++ b/error.c @@ -3,7 +3,7 @@ // ERROR.C - Error Handling // Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 -// Source Utilised with the Kind Permission of Landon Dyer +// Source utilised with the kind permission of Landon Dyer // #include "error.h" @@ -22,15 +22,20 @@ static long unused; // For supressing 'write' warnings // int at_eol(void) { + char msg[256]; + if (*tok != EOL) - error("syntax error"); + { + sprintf(msg, "syntax error. expected EOL, found $%X ('%c')", *tok, *tok); + error(msg); + } return 0; } // -// Cannot Create a File +// Cannot create a file // void cantcreat(const char * fn) { @@ -40,7 +45,7 @@ void cantcreat(const char * fn) // -// Setup for Error Message +// Setup for error message // o Create error listing file (if necessary) // o Set current filename // @@ -70,7 +75,7 @@ void err_setup(void) // -// Display Error Message +// Display error message // int error(const char * s) {