Skip to content

Commit

Permalink
Revert errx() due to Microsoft being silly
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerb9 committed Jul 15, 2024
1 parent 66c450f commit cf2b2cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions m100-tokenize.lex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

#include <ctype.h> /* For toupper() */
#include <err.h> /* For errx() */

%option prefix="tokenize"
%option case-insensitive
Expand All @@ -30,7 +29,10 @@
%%

^[[:space:]]*[0-9]+[ ]? {
if (ftell(yyout) >= 0x8000) errx(1, "Program too large to fit in 32K RAM");
if (ftell(yyout) >= 0x8000) {
fprintf(stderr, "Program too large to fit in 32K RAM");
exit(1);
}
ptr[nlines++] = ftell(yyout); /* Cache the location of the current line */
yyput('*'); yyput('*'); /* Dummy placeholder pointer to next line.*/
uint16_t linenum=atoi(yytext); /* BASIC line number. */
Expand Down

0 comments on commit cf2b2cc

Please sign in to comment.