diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-17 19:03:48 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-17 19:03:48 +0000 |
commit | ae4c01f83c60e931983c74d6285c6a22e3c33034 (patch) | |
tree | 8e4ea351343b9404a9724600e98d417794c14c4b /xkbscan.c | |
parent | 262961d88faf67f69f4630acb8234a4f2c5a6e80 (diff) |
merge XFree86 4.3.0.1 to -CURRENT
Diffstat (limited to 'xkbscan.c')
-rw-r--r-- | xkbscan.c | 47 |
1 files changed, 8 insertions, 39 deletions
@@ -24,6 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/programs/xkbcomp/xkbscan.c,v 3.11 2002/06/05 00:00:38 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -34,8 +35,9 @@ #include "tokens.h" #define DEBUG_VAR scanDebug #include "utils.h" +#include "parseutils.h" -FILE *yyin = stdin; +FILE *yyin = NULL; static char scanFileBuf[1024]; char * scanFile= scanFileBuf; @@ -57,12 +59,7 @@ static char buf[BUFSIZE]; extern unsigned debugFlags; static char * -#if NeedFunctionPrototypes tokText(int tok) -#else -tokText(tok) - int tok; -#endif { static char buf[32]; @@ -147,13 +144,7 @@ static char buf[32]; #endif int -#if NeedFunctionPrototypes setScanState(char *file,int line) -#else -setScanState(file,line) - char * file; - int line; -#endif { if (file!=NULL) strncpy(scanFile,file,1024); @@ -162,12 +153,8 @@ setScanState(file,line) return 1; } -int -#if NeedFunctionPrototypes +static int yyGetString(void) -#else -yyGetString() -#endif { int ch; @@ -228,12 +215,8 @@ int ch; return ERROR_TOK; } -int -#if NeedFunctionPrototypes +static int yyGetKeyName(void) -#else -yyGetKeyName() -#endif { int ch; @@ -346,16 +329,11 @@ struct _Keyword { }; int numKeywords = sizeof(keywords)/sizeof(struct _Keyword); -int -#if NeedFunctionPrototypes +static int yyGetIdent(int first) -#else -yyGetIdent(first) - int first; -#endif { int ch,i,found; -int rtrn= IDENT; +int rtrn = IDENT; buf[0] = first; nInBuf = 1; while ( ((ch=getc(yyin))!=EOF) && (isalnum(ch)||(ch=='_')) ) { @@ -387,13 +365,8 @@ int rtrn= IDENT; return rtrn; } -int -#if NeedFunctionPrototypes +static int yyGetNumber(int ch) -#else -yyGetNumber(ch) - int ch; -#endif { int isFloat= 0; @@ -427,11 +400,7 @@ int isFloat= 0; } int -#if NeedFunctionPrototypes yylex(void) -#else -yylex() -#endif { int ch; int rtrn; |