diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-21 10:41:36 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-06-22 11:30:54 +0200 |
commit | 4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177 (patch) | |
tree | 4947d6dbb0a62f8a4802c4aaa4712db7ec6577dd /nx-X11/programs/Xserver/xkb/xkmread.c | |
parent | 56dcc8a4b6a9ed3b7f55e0eeaeff9bc14737cdd5 (diff) | |
download | nx-libs-4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177.tar.gz nx-libs-4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177.tar.bz2 nx-libs-4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177.zip |
XKB: Remove a bunch of mad ifdefs
commit 534fc5140b039a8c98ab715d0a6740d513b41209
Author: Daniel Stone <daniel@fooishbar.org>
Date: Sun Feb 3 23:30:22 2008 +1100
XKB: Remove a bunch of mad ifdefs
We have SEEK_SET and size_t, seriously. Also use DebugF instead of
ifdef DEBUG, and ditch a couple of random bits that were never used.
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/xkmread.c')
-rw-r--r-- | nx-X11/programs/Xserver/xkb/xkmread.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkmread.c b/nx-X11/programs/Xserver/xkb/xkmread.c index 4871f3a35..c8b2a4591 100644 --- a/nx-X11/programs/Xserver/xkb/xkmread.c +++ b/nx-X11/programs/Xserver/xkb/xkmread.c @@ -50,10 +50,6 @@ XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) return MakeAtom(str,strlen(str),!only_if_exists); } -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - /***====================================================================***/ static XPointer @@ -547,10 +543,8 @@ FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms) register unsigned i; for (i=0;i<xkb->map->num_types;i++) { if (xkb->map->types[i].name==name) { -#ifdef DEBUG if (xkb->map->types[i].num_levels!=width) - fprintf(stderr,"Group width mismatch between key and type\n"); -#endif + DebugF("Group width mismatch between key and type\n"); return &xkb->map->types[i]; } } @@ -1072,10 +1066,8 @@ unsigned i,size_toc; ignored_result = fread(file_info,SIZEOF(xkmFileInfo),1,file); size_toc= file_info->num_toc; if (size_toc>max_toc) { -#ifdef DEBUG - fprintf(stderr,"Warning! Too many TOC entries; last %d ignored\n", + DebugF("Warning! Too many TOC entries; last %d ignored\n", size_toc-max_toc); -#endif size_toc= max_toc; } for (i=0;i<size_toc;i++) { @@ -1215,11 +1207,7 @@ unsigned which= need|want; if (result->xkb==NULL) result->xkb= XkbAllocKeyboard(); for (i=0;i<fileInfo.num_toc;i++) { -#ifdef SEEK_SET fseek(file,toc[i].offset,SEEK_SET); -#else - fseek(file,toc[i].offset,0); -#endif tmp= fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file); nRead= tmp*SIZEOF(xkmSectionInfo); if ((tmpTOC.type!=toc[i].type)||(tmpTOC.format!=toc[i].format)|| |