X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=error.c;h=196e4a900aa987009d5182fc63acf1dd7e6c7c89;hp=300a07e9daabcb3851381ea568e0fe5fa91701ba;hb=60f204cb9e3905100da0d89f14bb40db764acd9e;hpb=b10167d55798ea184f97fafda075255c0852f3b6 diff --git a/error.c b/error.c index 300a07e..196e4a9 100644 --- a/error.c +++ b/error.c @@ -1,9 +1,9 @@ // // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System // ERROR.C - Error Handling -// Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2017 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) {