Use CARD32 instead of Atom, move geom headers in
[platform/upstream/libxkbcommon.git] / src / xkbcomp / xkbparse.y
index 68e261f..ae37f7a 100644 (file)
@@ -97,7 +97,6 @@
 #include "xkbmisc.h"
 #include <X11/Xlib.h>
 #include <X11/keysym.h>
-#include <X11/extensions/XKBgeomcommon.h>
 #include <stdlib.h>
 
 unsigned int parseDebug;
@@ -313,10 +312,10 @@ Decl              :       OptMergeMode VarDecl
                        {
                            if ($1==MergeAltForm) {
                                yyerror("cannot use 'alternate' to include other maps");
-                               $$= &IncludeCreate(scanStr,MergeDefault)->common;
+                               $$= &IncludeCreate(scanBuf,MergeDefault)->common;
                            }
                            else {
-                               $$= &IncludeCreate(scanStr,$1)->common;
+                               $$= &IncludeCreate(scanBuf,$1)->common;
                            }
                         }
                ;
@@ -376,9 +375,9 @@ InterpretDecl       :       INTERPRET InterpretMatch OBRACE
                ;
 
 InterpretMatch :       KeySym PLUS Expr        
-                       { $$= InterpCreate(XStringToKeysym($1), $3); }
+                       { $$= InterpCreate($1, $3); }
                |       KeySym                  
-                       { $$= InterpCreate(XStringToKeysym($1), NULL); }
+                       { $$= InterpCreate($1, NULL); }
                ;
 
 VarDeclList    :       VarDeclList VarDecl
@@ -723,7 +722,7 @@ KeySymList  :       KeySymList COMMA KeySym
                        { $$= CreateKeysymList($1); }
                ;
 
-KeySym         :       IDENT   { $$= scanStr; scanStr= NULL; }
+KeySym         :       IDENT   { $$= strdup(scanBuf); }
                |       SECTION { $$= strdup("section"); }
                |       Integer         
                        {
@@ -753,21 +752,21 @@ Float             :       FLOAT           { $$= scanInt; }
 Integer                :       INTEGER         { $$= scanInt; }
                ;
 
-KeyName                :       KEYNAME         { $$= scanStr; scanStr= NULL; }
+KeyName                :       KEYNAME         { $$= strdup(scanBuf); }
                ;
 
-Ident          :       IDENT   { $$= XkbcInternAtom(scanStr,False); }
+Ident          :       IDENT   { $$= XkbcInternAtom(scanBuf,False); }
                |       DEFAULT { $$= XkbcInternAtom("default",False); }
                ;
 
-String         :       STRING  { $$= XkbcInternAtom(scanStr,False); }
+String         :       STRING  { $$= XkbcInternAtom(scanBuf,False); }
                ;
 
 OptMapName     :       MapName { $$= $1; }
                |               { $$= NULL; }
                ;
 
-MapName                :       STRING  { $$= scanStr; scanStr= NULL; }
+MapName                :       STRING  { $$= strdup(scanBuf); }
                ;
 %%
 void
@@ -776,8 +775,8 @@ yyerror(const char *s)
     if (warningLevel>0) {
        (void)fprintf(stderr,"%s: line %d of %s\n",s,lineNum,
                                        (scanFile?scanFile:"(unknown)"));
-       if ((scanStr)&&(warningLevel>3))
-           (void)fprintf(stderr,"last scanned symbol is: %s\n",scanStr);
+       if ((warningLevel>3))
+           (void)fprintf(stderr,"last scanned symbol is: %s\n",scanBuf);
     }
     return;
 }