diff options
author | dawes <dawes> | 2000-12-05 16:38:19 +0000 |
---|---|---|
committer | dawes <dawes> | 2000-12-05 16:38:19 +0000 |
commit | de862f7f2c68c12cbfdb72a72c4ea6e97c968f90 (patch) | |
tree | dd8e73c0ad0f1ad5a9929f858bd69b975751ec5c /xc/lib/Xft/xftlex.l | |
parent | 978cb1e87ff7bfba913e89cc87b302be078c7348 (diff) |
Import of XFree86 4.0.1gX_4_0_1h
Diffstat (limited to 'xc/lib/Xft/xftlex.l')
-rw-r--r-- | xc/lib/Xft/xftlex.l | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/xc/lib/Xft/xftlex.l b/xc/lib/Xft/xftlex.l index 6c4641653..839ea04c0 100644 --- a/xc/lib/Xft/xftlex.l +++ b/xc/lib/Xft/xftlex.l @@ -1,6 +1,6 @@ %{ /* - * $XFree86: xc/lib/Xft/xftlex.l,v 1.1 2000/11/29 08:39:23 keithp Exp $ + * $XFree86: xc/lib/Xft/xftlex.l,v 1.2 2000/11/30 23:30:00 dawes Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -25,10 +25,29 @@ #include <string.h> #include "xftint.h" + #include "xftgram.h" int XftConfigLineno; + +static void _XftConfigSkipComment (void); + +static void _XftConfigSkipLine (void); + +static int _XftConfigPopInput (void); + +#define XFT_CONFIG_IN_DEEP 20 +FILE *XftConfigInStack[XFT_CONFIG_IN_DEEP]; +FILE **XftConfigInpt = XftConfigInStack + XFT_CONFIG_IN_DEEP; +FILE *XftConfigInput; +int XftConfigLinenos[XFT_CONFIG_IN_DEEP]; +int *XftConfigLinenopt = XftConfigLinenos + XFT_CONFIG_IN_DEEP; +char *XftConfigFile = ""; +char *XftConfigFileNames[XFT_CONFIG_IN_DEEP]; +char **XftConfigFileNamePt = XftConfigFileNames + XFT_CONFIG_IN_DEEP; +int XftConfigFiledeep = 0; + #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ @@ -69,30 +88,10 @@ static void unput (char c) { if (c == '\n') XftConfigLineno--; - ungetc (XftConfigInput, c); + ungetc (c, XftConfigInput); } #endif -#define XFT_CONFIG_IN_DEEP 20 -FILE *XftConfigInStack[XFT_CONFIG_IN_DEEP]; -FILE **XftConfigInpt = XftConfigInStack + XFT_CONFIG_IN_DEEP; -FILE *XftConfigInput; -int XftConfigLinenos[XFT_CONFIG_IN_DEEP]; -int *XftConfigLinenopt = XftConfigLinenos + XFT_CONFIG_IN_DEEP; -char *XftConfigFile = ""; -char *XftConfigFileNames[XFT_CONFIG_IN_DEEP]; -char **XftConfigFileNamePt = XftConfigFileNames + XFT_CONFIG_IN_DEEP; -int XftConfigFiledeep = 0; - -static void -_XftConfigSkipComment (void); - -static void -_XftConfigSkipLine (void); - -static int -_XftConfigPopInput (void); - %} %% "/\052" _XftConfigSkipComment(); @@ -126,21 +125,21 @@ all return ALL; "?" return QUEST; \"([^\n\"]|\\\")*\" { yytext[yyleng - 1] = '\0'; - XftConfiglval.sval = yytext+1; + yylval.sval = yytext+1; return STRING; } [0-9]+ { - XftConfiglval.ival = strtol (yytext, 0, 10); + yylval.ival = strtol (yytext, 0, 10); return INTEGER; } (([0-9]+((\.[0-9]*(\{[0-9]+\})?)?))|(\.[0-9]+)|(\.[0-9]*\{[0-9]+\}))(([Ee][-+]?[0-9]+)?) { - XftConfiglval.dval = strtod (yytext, 0); + yylval.dval = strtod (yytext, 0); return DOUBLE; } [a-zA-Z][0-9a-zA-Z_]* { - if (XftNameConstant (yytext, &XftConfiglval.ival)) + if (XftNameConstant (yytext, &yylval.ival)) return INTEGER; - XftConfiglval.sval = yytext; + yylval.sval = yytext; return NAME; } . ; |