summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-10-20 01:01:37 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-10-28 20:28:56 -0700
commit7544a9eb35d5850ae2e68d8cdab50f25ce7cd5d9 (patch)
treecbd9d1920342feb8bfa6ca2f8b19c40c8b87f140
parenta945540e6eea9b9303c8f611412ecb58129180e7 (diff)
unifdef -UXKB_IN_SERVER
Xserver has its own copy of this code now, so we don't need to keep an unused copy in libxkbfile too. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ran Benita <ran234@gmail.com>
-rw-r--r--include/X11/extensions/XKBfile.h2
-rw-r--r--include/X11/extensions/XKBrules.h2
-rw-r--r--src/XKBfileInt.h2
-rw-r--r--src/maprules.c19
-rw-r--r--src/xkbconfig.c20
-rw-r--r--src/xkbmisc.c16
-rw-r--r--src/xkbout.c17
-rw-r--r--src/xkbtext.c24
-rw-r--r--src/xkmread.c22
9 files changed, 0 insertions, 124 deletions
diff --git a/include/X11/extensions/XKBfile.h b/include/X11/extensions/XKBfile.h
index 0d2f52b..a59b16a 100644
--- a/include/X11/extensions/XKBfile.h
+++ b/include/X11/extensions/XKBfile.h
@@ -233,14 +233,12 @@ extern Bool XkbLookupGroupAndLevel(
/***====================================================================***/
-#ifndef XKB_IN_SERVER
extern Bool XkbLookupCanonicalRGBColor(
char * /* def */,
XColor * /* color */
);
-#endif
/***====================================================================***/
diff --git a/include/X11/extensions/XKBrules.h b/include/X11/extensions/XKBrules.h
index 2832e67..4736056 100644
--- a/include/X11/extensions/XKBrules.h
+++ b/include/X11/extensions/XKBrules.h
@@ -178,7 +178,6 @@ extern void XkbRF_Free(
#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES"
#define _XKB_RF_NAMES_PROP_MAXLEN 1024
-#ifndef XKB_IN_SERVER
extern Bool XkbRF_GetNamesProp(
Display * /* dpy */,
@@ -192,7 +191,6 @@ extern Bool XkbRF_SetNamesProp(
XkbRF_VarDefsPtr /* var_defs */
);
-#endif
_XFUNCPROTOEND
diff --git a/src/XKBfileInt.h b/src/XKBfileInt.h
index dbaf825..c5f5145 100644
--- a/src/XKBfileInt.h
+++ b/src/XKBfileInt.h
@@ -39,7 +39,6 @@
{ _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); }
#endif
-#ifndef XKB_IN_SERVER
#define _XkbAlloc(s) malloc((s))
#define _XkbCalloc(n,s) calloc((n),(s))
@@ -59,7 +58,6 @@
#endif
#endif
-#endif
_XFUNCPROTOBEGIN
diff --git a/src/maprules.c b/src/maprules.c
index 49f4695..f0c39b3 100644
--- a/src/maprules.c
+++ b/src/maprules.c
@@ -38,7 +38,6 @@
#define XOS_USE_NO_LOCKING
#include <X11/Xos_r.h>
-#ifndef XKB_IN_SERVER
#include <X11/Xproto.h>
#include <X11/Xlib.h>
@@ -52,22 +51,6 @@
#include "XKBfileInt.h"
#include "XKBrules.h"
-#else
-
-#include <X11/Xproto.h>
-#include <X11/X.h>
-#include <X11/Xos.h>
-#include <X11/Xfuncs.h>
-#include <X11/Xatom.h>
-#include <X11/keysym.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "dix.h"
-#include <X11/extensions/XKBstr.h>
-#define XKBSRV_NEED_FILE_FUNCS
-#include <X11/extensions/XKBsrv.h>
-
-#endif
#ifdef DEBUG
#define PR_DEBUG(s) fprintf(stderr,s)
@@ -1411,7 +1394,6 @@ XkbRF_Free(XkbRF_RulesPtr rules, Bool freeRules)
return;
}
-#ifndef XKB_IN_SERVER
Bool
XkbRF_GetNamesProp(Display * dpy, char **rf_rtrn, XkbRF_VarDefsPtr vd_rtrn)
@@ -1541,4 +1523,3 @@ XkbRF_SetNamesProp(Display *dpy, char *rules_file, XkbRF_VarDefsPtr var_defs)
return True;
}
-#endif
diff --git a/src/xkbconfig.c b/src/xkbconfig.c
index 706286f..a62512d 100644
--- a/src/xkbconfig.c
+++ b/src/xkbconfig.c
@@ -38,7 +38,6 @@
#include <X11/Xfuncs.h>
-#ifndef XKB_IN_SERVER
#include <X11/Xos.h>
#include <X11/Xlib.h>
@@ -46,17 +45,6 @@
#include <X11/XKBlib.h>
#include "XKBfileInt.h"
-#else
-
-#include <X11/X.h>
-#include <X11/keysym.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "dix.h"
-#define XKBSRV_NEED_FILE_FUNCS
-#include <X11/extensions/XKBsrv.h>
-#endif
#include <X11/extensions/XKBconfig.h>
@@ -1353,18 +1341,10 @@ XkbCFReportError(FILE *file, char *name, int error, int line)
msg = "unknown error on line %d";
break;
}
-#ifndef XKB_IN_SERVER
fprintf(file, msg, line);
if (name)
fprintf(file, " of %s\n", name);
else
fprintf(file, "\n");
-#else
- ErrorF(msg, line);
- if (name)
- ErrorF(" of %s\n", name);
- else
- ErrorF("\n");
-#endif
return;
}
diff --git a/src/xkbmisc.c b/src/xkbmisc.c
index 1cd42e6..2f9b532 100644
--- a/src/xkbmisc.c
+++ b/src/xkbmisc.c
@@ -37,7 +37,6 @@
#include <X11/Xos.h>
#include <X11/Xfuncs.h>
-#ifndef XKB_IN_SERVER
#include <X11/Xlib.h>
#include <X11/keysym.h>
@@ -46,21 +45,6 @@
#include "XKMformat.h"
#include "XKBfileInt.h"
-#else
-
-#include <X11/X.h>
-#include <X11/keysym.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "dix.h"
-#include <X11/extensions/XKBstr.h>
-#define XKBSRV_NEED_FILE_FUNCS 1
-#include <X11/extensions/XKBsrv.h>
-#include <X11/extensions/XKBgeom.h>
-#include "xkb.h"
-
-#endif
unsigned
_XkbKSCheckCase(KeySym ks)
diff --git a/src/xkbout.c b/src/xkbout.c
index f9863e8..57f5adf 100644
--- a/src/xkbout.c
+++ b/src/xkbout.c
@@ -35,7 +35,6 @@
#include <stdlib.h>
#include <X11/Xfuncs.h>
-#ifndef XKB_IN_SERVER
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
@@ -44,22 +43,6 @@
#include "XKMformat.h"
#include "XKBfileInt.h"
-#else
-
-#include <X11/X.h>
-#include <X11/keysym.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "dix.h"
-#include <X11/extensions/XKBstr.h>
-#define XKBSRV_NEED_FILE_FUNCS 1
-#include <X11/extensions/XKBsrv.h>
-
-#include <X11/extensions/XKBgeom.h>
-#include <X11/extensions/XKBfile.h>
-
-#endif
#define VMOD_HIDE_VALUE 0
#define VMOD_SHOW_VALUE 1
diff --git a/src/xkbtext.c b/src/xkbtext.c
index e25aa25..76d3dbd 100644
--- a/src/xkbtext.c
+++ b/src/xkbtext.c
@@ -36,7 +36,6 @@
#include <X11/Xos.h>
-#ifndef XKB_IN_SERVER
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
@@ -45,19 +44,6 @@
#include "XKMformat.h"
#include "XKBfileInt.h"
-#else
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "dix.h"
-#include <X11/extensions/XKBstr.h>
-#define XKBSRV_NEED_FILE_FUNCS 1
-#include <X11/extensions/XKBsrv.h>
-#include <X11/extensions/XKBgeom.h>
-
-#endif
/***====================================================================***/
@@ -372,7 +358,6 @@ XkbKeysymText(KeySym sym, unsigned format)
{
static char buf[32], *rtrn;
-#ifndef XKB_IN_SERVER
if (sym == NoSymbol)
strcpy(rtrn = buf, "NoSymbol");
else if ((rtrn = XKeysymToString(sym)) == NULL)
@@ -382,13 +367,6 @@ XkbKeysymText(KeySym sym, unsigned format)
rtrn = buf;
}
return rtrn;
-#else /* def XKB_IN_SERVER */
- if (sym == NoSymbol)
- strcpy(rtrn = buf, "NoSymbol");
- else
- sprintf(rtrn = buf, "0x%lx", (long) sym);
- return rtrn;
-#endif /* XKB_IN_SERVER */
}
char *
@@ -1487,7 +1465,6 @@ XkbIndentText(unsigned size)
return buf;
}
-#ifndef XKB_IN_SERVER
/***====================================================================***/
@@ -1573,4 +1550,3 @@ XkbLookupCanonicalRGBColor(char *def, XColor *color)
return False;
}
-#endif
diff --git a/src/xkmread.c b/src/xkmread.c
index 55a4436..7c88241 100644
--- a/src/xkmread.c
+++ b/src/xkmread.c
@@ -35,7 +35,6 @@
#include <X11/Xos.h>
#include <X11/Xfuncs.h>
-#ifndef XKB_IN_SERVER
#include <stdlib.h>
#include <X11/Xlib.h>
@@ -47,27 +46,6 @@
#include "XKMformat.h"
#include "XKBfileInt.h"
-#else
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/keysym.h>
-#include "misc.h"
-#include "inputstr.h"
-#include <X11/extensions/XKBstr.h>
-#define XKBSRV_NEED_FILE_FUNCS
-#include <X11/extensions/XKBsrv.h>
-#include <X11/extensions/XKBgeom.h>
-
-Atom
-XkbInternAtom(Display * dpy, char *str, Bool only_if_exists)
-{
- if (str == NULL)
- return None;
- return MakeAtom(str, strlen(str), !only_if_exists);
-}
-
-#endif
#ifndef SEEK_SET
#define SEEK_SET 0