diff options
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/maprules.c')
-rw-r--r-- | nx-X11/programs/Xserver/xkb/maprules.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/nx-X11/programs/Xserver/xkb/maprules.c b/nx-X11/programs/Xserver/xkb/maprules.c index de52aa4b5..c64e1f796 100644 --- a/nx-X11/programs/Xserver/xkb/maprules.c +++ b/nx-X11/programs/Xserver/xkb/maprules.c @@ -26,8 +26,6 @@ #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> -#elif defined(HAVE_CONFIG_H) -#include <config.h> #endif #include <stdio.h> @@ -38,7 +36,6 @@ #define XOS_USE_NO_LOCKING #include <nx-X11/Xos_r.h> - #include <nx-X11/Xproto.h> #include <nx-X11/X.h> #include <nx-X11/Xos.h> @@ -51,7 +48,6 @@ #include "xkbstr.h" #include <xkbsrv.h> - #ifdef DEBUG #define PR_DEBUG(s) fprintf(stderr,s) #define PR_DEBUG1(s,a) fprintf(stderr,s,a) @@ -62,6 +58,12 @@ #define PR_DEBUG2(s,a,b) #endif +#ifdef NEED_STRCASECMP +extern int _XkbStrCaseCmp(char *s1, char *s2); +#else +#define _XkbStrCaseCmp strcasecmp +#endif + /***====================================================================***/ #define DFLT_LINE_SIZE 128 @@ -1086,13 +1088,13 @@ int len,headingtype,extra_ndx = 0; for ( ; GetInputLine(file,&line,False); line.num_line= 0) { if (line.line[0]=='!') { tok = strtok(&(line.line[1]), " \t"); - if (!_XkbStrCaseCmp(tok,"model")) + if (_XkbStrCaseCmp(tok,"model") == 0) headingtype = HEAD_MODEL; - else if (!_XkbStrCaseCmp(tok,"layout")) + else if (_XkbStrCaseCmp(tok,"layout") == 0) headingtype = HEAD_LAYOUT; - else if (!_XkbStrCaseCmp(tok,"variant")) + else if (_XkbStrCaseCmp(tok,"variant") == 0) headingtype = HEAD_VARIANT; - else if (!_XkbStrCaseCmp(tok,"option")) + else if (_XkbStrCaseCmp(tok,"option") == 0) headingtype = HEAD_OPTION; else { int i; @@ -1324,4 +1326,3 @@ XkbRF_GroupPtr group; _XkbFree(rules); return; } - |