From 22e912f7338ee41bd0f84f4330f4e8bc0c7501d9 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Mon, 17 Nov 2003 19:03:47 +0000 Subject: merge XFree86 4.3.0.1 to -CURRENT --- src/lex.l | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/lex.l') diff --git a/src/lex.l b/src/lex.l index 1886f4b..93f3bd7 100644 --- a/src/lex.l +++ b/src/lex.l @@ -59,20 +59,20 @@ in this Software without prior written authorization from The Open Group. * 12-Nov-87 Thomas E. LaStrange File created * ***********************************************************************/ +/* $XFree86: xc/programs/twm/lex.l,v 3.14 2001/12/14 20:01:08 dawes Exp $ */ /* #include */ /* lex already includes stdio.h */ +#include "twm.h" #include "gram.h" +#include "list.h" #include "parse.h" -extern char *ProgramName; -extern int ParseError; #ifdef FLEX_SCANNER int yylineno; #undef YY_INPUT #define YY_INPUT(buf,result,size) ((result) = doinput((buf),(size))) -doinput (buf, size) -char *buf; +int doinput (char *buf, int size) { int c; @@ -85,6 +85,7 @@ char *buf; buf[0] = c; return (1); } +#define YY_NO_UNPUT #endif %} @@ -102,7 +103,7 @@ number [0-9]+ "-" { return MINUS; } "|" { return OR; } -[a-zA-Z\.]+ { int token = parse_keyword (yytext, +[a-zA-Z\.]+ { int token = parse_keyword ((char *)yytext, &yylval.num); if (token == ERRORTOKEN) { twmrc_error_prefix(); @@ -122,7 +123,7 @@ number [0-9]+ return (NUMBER); } \#[^\n]*\n {;} -[\n\t ] {;} +[\r\n\t ] {;} . { twmrc_error_prefix(); fprintf (stderr, @@ -132,7 +133,7 @@ number [0-9]+ } %% #ifndef yywrap -yywrap() { return(1);} +int yywrap() { return(1);} #endif #undef unput -- cgit v1.2.3