From: nethack.rankin Date: Sun, 13 Jan 2002 04:16:04 +0000 (+0000) Subject: update lex output X-Git-Tag: MOVE2GIT~3491 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbcf7106212ba83f335f3c22dd25e1432857b69d;p=nethack update lex output --- diff --git a/sys/share/dgn_lex.c b/sys/share/dgn_lex.c index 19c81118c..897ca17db 100644 --- a/sys/share/dgn_lex.c +++ b/sys/share/dgn_lex.c @@ -481,33 +481,6 @@ void FDECL(init_yyout, (FILE *)); extern YYSTYPE yylval; int line_number = 1; -/* - * This is a hack required by Michael Hamel to get things - * working on the Mac. - */ -#if defined(applec) && !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER) -#undef input -#undef unput -#define unput(c) { yytchar = (c); if (yytchar == 10) yylineno--; *yysptr++ = yytchar; } -# ifndef YYNEWLINE -# define YYNEWLINE 10 -# endif - -char -input() /* Under MPW \n is chr(13)! Compensate for this. */ -{ - if (yysptr > yysbuf) return(*--yysptr); - else { - yytchar = getc(yyin); - if (yytchar == '\n') { - yylineno++; - return(YYNEWLINE); - } - if (yytchar == EOF) return(0); - else return(yytchar); - } -} -#endif /* applec && !FLEX_SCANNER && !FLEXHACK_SCANNER */ /* Macros after this point can all be overridden by user definitions in diff --git a/sys/share/lev_lex.c b/sys/share/lev_lex.c index b2d15b029..24da7a264 100644 --- a/sys/share/lev_lex.c +++ b/sys/share/lev_lex.c @@ -750,34 +750,6 @@ int line_number = 1, colon_line_number = 1; static char map[4096]; static int map_cnt = 0; -/* - * This is a hack required by Michael Hamel to get things - * working on the Mac. - */ -#if defined(applec) && !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER) -#undef input -#undef unput -#define unput(c) { yytchar = (c); if (yytchar == 10) yylineno--; *yysptr++ = yytchar; } -# ifndef YYNEWLINE -# define YYNEWLINE 10 -# endif - -char -input() /* Under MPW \n is chr(13)! Compensate for this. */ -{ - if (yysptr > yysbuf) return(*--yysptr); - else { - yytchar = getc(yyin); - if (yytchar == '\n') { - yylineno++; - return(YYNEWLINE); - } - if (yytchar == EOF) return(0); - else return(yytchar); - } -} -#endif /* applec && !FLEX_SCANNER && !FLEXHACK_SCANNER */ - #define MAPC 1