aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/dix/devices.c1
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c1
-rw-r--r--nx-X11/programs/Xserver/include/xkbrules.h15
-rw-r--r--nx-X11/programs/Xserver/xkb/Imakefile2
-rw-r--r--nx-X11/programs/Xserver/xkb/XKBAlloc.c11
-rw-r--r--nx-X11/programs/Xserver/xkb/XKBGAlloc.c10
-rw-r--r--nx-X11/programs/Xserver/xkb/XKBMAlloc.c10
-rw-r--r--nx-X11/programs/Xserver/xkb/XKBMisc.c10
-rw-r--r--nx-X11/programs/Xserver/xkb/maprules.c144
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbDflts.h5
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbconfig.c16
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbfmisc.c11
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbout.c11
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbtext.c110
-rw-r--r--nx-X11/programs/Xserver/xkb/xkmread.c14
15 files changed, 1 insertions, 370 deletions
diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c
index 1c4e71f23..53ba83bed 100644
--- a/nx-X11/programs/Xserver/dix/devices.c
+++ b/nx-X11/programs/Xserver/dix/devices.c
@@ -61,7 +61,6 @@ SOFTWARE.
#include "cursorstr.h"
#include "dixstruct.h"
#include "site.h"
-#define XKB_IN_SERVER
#ifdef XKB
#include <xkbsrv.h>
#endif
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index 87d753612..aa647b063 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -109,7 +109,6 @@ int ProcInitialConnection();
#include <nx-X11/extensions/security.h>
#endif
#ifdef XKB
-#define XKB_IN_SERVER
#include "inputstr.h"
#include <xkbsrv.h>
#endif
diff --git a/nx-X11/programs/Xserver/include/xkbrules.h b/nx-X11/programs/Xserver/include/xkbrules.h
index 59d11cd88..021e1021f 100644
--- a/nx-X11/programs/Xserver/include/xkbrules.h
+++ b/nx-X11/programs/Xserver/include/xkbrules.h
@@ -178,21 +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 */,
- char ** /* rules_file_rtrn */,
- XkbRF_VarDefsPtr /* var_defs_rtrn */
-);
-
-extern Bool XkbRF_SetNamesProp(
- Display * /* dpy */,
- char * /* rules_file */,
- XkbRF_VarDefsPtr /* var_defs */
-);
-
-#endif
_XFUNCPROTOEND
diff --git a/nx-X11/programs/Xserver/xkb/Imakefile b/nx-X11/programs/Xserver/xkb/Imakefile
index 6d57cda09..4b5280f80 100644
--- a/nx-X11/programs/Xserver/xkb/Imakefile
+++ b/nx-X11/programs/Xserver/xkb/Imakefile
@@ -55,7 +55,7 @@ XF86INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC)
`pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
-DEFINES = -DXKB_IN_SERVER $(EXTRA_ALLOC_DEFINES) $(XKB_DDXDEFS) $(NX_DEFINES)
+DEFINES = $(EXTRA_ALLOC_DEFINES) $(XKB_DDXDEFS) $(NX_DEFINES)
XKB_DEFINES = -DXKB_BASE_DIRECTORY=\"$(LIBDIR)/xkb\" $(XKB_DISABLE)
NormalLibraryObjectRule()
diff --git a/nx-X11/programs/Xserver/xkb/XKBAlloc.c b/nx-X11/programs/Xserver/xkb/XKBAlloc.c
index db2f2d01e..bc0206f8e 100644
--- a/nx-X11/programs/Xserver/xkb/XKBAlloc.c
+++ b/nx-X11/programs/Xserver/xkb/XKBAlloc.c
@@ -30,16 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#endif
-#ifndef XKB_IN_SERVER
-
-#include <stdio.h>
-#include "Xlibint.h"
-#include "XKBlibint.h"
-#include "xkbgeom.h"
-#include <nx-X11/extensions/XKBproto.h>
-#include "XKBlibint.h"
-
-#else
#include <stdio.h>
#include <nx-X11/X.h>
@@ -49,7 +39,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h>
#include "xkbgeom.h"
-#endif /* XKB_IN_SERVER */
/***===================================================================***/
diff --git a/nx-X11/programs/Xserver/xkb/XKBGAlloc.c b/nx-X11/programs/Xserver/xkb/XKBGAlloc.c
index ec5242d9f..50e598280 100644
--- a/nx-X11/programs/Xserver/xkb/XKBGAlloc.c
+++ b/nx-X11/programs/Xserver/xkb/XKBGAlloc.c
@@ -30,15 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#endif
-#ifndef XKB_IN_SERVER
-
-#include <stdio.h>
-#include "Xlibint.h"
-#include "XKBlibint.h"
-#include "xkbgeom.h"
-#include <nx-X11/extensions/XKBproto.h>
-
-#else
#include <stdio.h>
#include <nx-X11/X.h>
@@ -48,7 +39,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h>
#include "xkbgeom.h"
-#endif /* XKB_IN_SERVER */
#ifdef X_NOT_POSIX
#define Size_t unsigned int
diff --git a/nx-X11/programs/Xserver/xkb/XKBMAlloc.c b/nx-X11/programs/Xserver/xkb/XKBMAlloc.c
index b23fede70..ded43e983 100644
--- a/nx-X11/programs/Xserver/xkb/XKBMAlloc.c
+++ b/nx-X11/programs/Xserver/xkb/XKBMAlloc.c
@@ -30,15 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#endif
-#ifndef XKB_IN_SERVER
-
-#include <stdio.h>
-#include "Xlibint.h"
-#include <nx-X11/extensions/XKBproto.h>
-#include <nx-X11/keysym.h>
-#include "XKBlibint.h"
-
-#else
#include <stdio.h>
#include <nx-X11/X.h>
@@ -49,7 +40,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
-#endif /* XKB_IN_SERVER */
/***====================================================================***/
diff --git a/nx-X11/programs/Xserver/xkb/XKBMisc.c b/nx-X11/programs/Xserver/xkb/XKBMisc.c
index f3e107f1d..1366c49d1 100644
--- a/nx-X11/programs/Xserver/xkb/XKBMisc.c
+++ b/nx-X11/programs/Xserver/xkb/XKBMisc.c
@@ -30,15 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#endif
-#ifndef XKB_IN_SERVER
-
-#include <stdio.h>
-#include "Xlibint.h"
-#include <nx-X11/extensions/XKBproto.h>
-#include <nx-X11/keysym.h>
-#include "XKBlibint.h"
-
-#else
#include <stdio.h>
#include <nx-X11/X.h>
@@ -49,7 +40,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
-#endif /* XKB_IN_SERVER */
/***====================================================================***/
diff --git a/nx-X11/programs/Xserver/xkb/maprules.c b/nx-X11/programs/Xserver/xkb/maprules.c
index 14febfcac..4db4f0083 100644
--- a/nx-X11/programs/Xserver/xkb/maprules.c
+++ b/nx-X11/programs/Xserver/xkb/maprules.c
@@ -38,21 +38,6 @@
#define XOS_USE_NO_LOCKING
#include <nx-X11/Xos_r.h>
-#ifndef XKB_IN_SERVER
-
-#include <nx-X11/Xproto.h>
-#include <nx-X11/Xlib.h>
-#include <nx-X11/Xos.h>
-#include <nx-X11/Xfuncs.h>
-#include <nx-X11/Xatom.h>
-#include <nx-X11/keysym.h>
-#include <nx-X11/XKBlib.h>
-#include "xkbgeom.h"
-#include "XKMformat.h"
-#include "XKBfileInt.h"
-#include "XKBrules.h"
-
-#else
#include <nx-X11/Xproto.h>
#include <nx-X11/X.h>
@@ -67,7 +52,6 @@
#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
-#endif
#ifdef DEBUG
#define PR_DEBUG(s) fprintf(stderr,s)
@@ -1349,131 +1333,3 @@ XkbRF_GroupPtr group;
return;
}
-#ifndef XKB_IN_SERVER
-
-Bool
-XkbRF_GetNamesProp(Display *dpy,char **rf_rtrn,XkbRF_VarDefsPtr vd_rtrn)
-{
-Atom rules_atom,actual_type;
-int fmt;
-unsigned long nitems,bytes_after;
-char *data,*out;
-Status rtrn;
-
- rules_atom= XInternAtom(dpy,_XKB_RF_NAMES_PROP_ATOM,True);
- if (rules_atom==None) /* property cannot exist */
- return False;
- rtrn= XGetWindowProperty(dpy,DefaultRootWindow(dpy),rules_atom,
- 0L,_XKB_RF_NAMES_PROP_MAXLEN,False,
- XA_STRING,&actual_type,
- &fmt,&nitems,&bytes_after,
- (unsigned char **)&data);
- if (rtrn!=Success)
- return False;
- if (rf_rtrn)
- *rf_rtrn= NULL;
- (void)bzero((char *)vd_rtrn,sizeof(XkbRF_VarDefsRec));
- if ((bytes_after>0)||(actual_type!=XA_STRING)||(fmt!=8)) {
- if (data) XFree(data);
- return (fmt==0?True:False);
- }
-
- out= data;
- if (out && (*out) && rf_rtrn)
- *rf_rtrn= _XkbDupString(out);
- out+=strlen(out)+1;
-
- if ((out-data)<nitems) {
- if (*out)
- vd_rtrn->model= _XkbDupString(out);
- out+=strlen(out)+1;
- }
-
- if ((out-data)<nitems) {
- if (*out)
- vd_rtrn->layout= _XkbDupString(out);
- out+=strlen(out)+1;
- }
-
- if ((out-data)<nitems) {
- if (*out)
- vd_rtrn->variant= _XkbDupString(out);
- out+=strlen(out)+1;
- }
-
-
- if ((out-data)<nitems) {
- if (*out)
- vd_rtrn->options= _XkbDupString(out);
- out+=strlen(out)+1;
- }
- XFree(data);
- return True;
-}
-
-Bool
-XkbRF_SetNamesProp(Display *dpy,char *rules_file,XkbRF_VarDefsPtr var_defs)
-{
-int len,out;
-Atom name;
-char * pval;
-
- len= (rules_file?strlen(rules_file):0);
- len+= (var_defs->model?strlen(var_defs->model):0);
- len+= (var_defs->layout?strlen(var_defs->layout):0);
- len+= (var_defs->variant?strlen(var_defs->variant):0);
- len+= (var_defs->options?strlen(var_defs->options):0);
- if (len<1)
- return True;
-
- len+= 5; /* trailing NULs */
-
- name= XInternAtom(dpy,_XKB_RF_NAMES_PROP_ATOM,False);
- if (name==None) { /* should never happen */
- _XkbLibError(_XkbErrXReqFailure,"XkbRF_SetNamesProp",X_InternAtom);
- return False;
- }
- pval= (char *)_XkbAlloc(len);
- if (!pval) {
- _XkbLibError(_XkbErrBadAlloc,"XkbRF_SetNamesProp",len);
- return False;
- }
- out= 0;
- if (rules_file) {
- strcpy(&pval[out],rules_file);
- out+= strlen(rules_file);
- }
- pval[out++]= '\0';
- if (var_defs->model) {
- strcpy(&pval[out],var_defs->model);
- out+= strlen(var_defs->model);
- }
- pval[out++]= '\0';
- if (var_defs->layout) {
- strcpy(&pval[out],var_defs->layout);
- out+= strlen(var_defs->layout);
- }
- pval[out++]= '\0';
- if (var_defs->variant) {
- strcpy(&pval[out],var_defs->variant);
- out+= strlen(var_defs->variant);
- }
- pval[out++]= '\0';
- if (var_defs->options) {
- strcpy(&pval[out],var_defs->options);
- out+= strlen(var_defs->options);
- }
- pval[out++]= '\0';
- if (out!=len) {
- _XkbLibError(_XkbErrBadLength,"XkbRF_SetNamesProp",out);
- _XkbFree(pval);
- return False;
- }
-
- XChangeProperty(dpy,DefaultRootWindow(dpy),name,XA_STRING,8,PropModeReplace,
- (unsigned char *)pval,len);
- _XkbFree(pval);
- return True;
-}
-
-#endif
diff --git a/nx-X11/programs/Xserver/xkb/xkbDflts.h b/nx-X11/programs/Xserver/xkb/xkbDflts.h
index 9c99a4c70..c3c28524b 100644
--- a/nx-X11/programs/Xserver/xkb/xkbDflts.h
+++ b/nx-X11/programs/Xserver/xkb/xkbDflts.h
@@ -7,13 +7,8 @@
#ifndef DEFAULT_H
#define DEFAULT_H 1
-#ifndef XKB_IN_SERVER
-#define GET_ATOM(d,s) XInternAtom(d,s,0)
-#define DPYTYPE Display *
-#else
#define GET_ATOM(d,s) MakeAtom(s,strlen(s),1)
#define DPYTYPE char *
-#endif
#define NUM_KEYS 1
#define vmod_NumLock 0
diff --git a/nx-X11/programs/Xserver/xkb/xkbconfig.c b/nx-X11/programs/Xserver/xkb/xkbconfig.c
index 525a65ce8..b795dddb2 100644
--- a/nx-X11/programs/Xserver/xkb/xkbconfig.c
+++ b/nx-X11/programs/Xserver/xkb/xkbconfig.c
@@ -38,15 +38,6 @@
#include <nx-X11/Xfuncs.h>
-#ifndef XKB_IN_SERVER
-
-#include <nx-X11/Xos.h>
-#include <nx-X11/Xlib.h>
-#include <nx-X11/keysym.h>
-#include <nx-X11/XKBlib.h>
-#include "XKBfileInt.h"
-
-#else
#include <nx-X11/X.h>
#include <nx-X11/keysym.h>
@@ -56,7 +47,6 @@
#include "dix.h"
#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
-#endif
#include <nx-X11/extensions/XKBconfig.h>
@@ -1339,14 +1329,8 @@ char * msg;
default:
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/nx-X11/programs/Xserver/xkb/xkbfmisc.c b/nx-X11/programs/Xserver/xkb/xkbfmisc.c
index 6cea648c0..47a2dca21 100644
--- a/nx-X11/programs/Xserver/xkb/xkbfmisc.c
+++ b/nx-X11/programs/Xserver/xkb/xkbfmisc.c
@@ -37,16 +37,6 @@
#include <nx-X11/Xos.h>
#include <nx-X11/Xfuncs.h>
-#ifndef XKB_IN_SERVER
-
-#include <nx-X11/Xlib.h>
-#include <nx-X11/keysym.h>
-#include <nx-X11/XKBlib.h>
-#include "xkbgeom.h"
-#include "XKMformat.h"
-#include "XKBfileInt.h"
-
-#else
#include <nx-X11/X.h>
#include <nx-X11/keysym.h>
@@ -60,7 +50,6 @@
#include "xkbgeom.h"
#include "xkb.h"
-#endif
unsigned
_XkbKSCheckCase(KeySym ks)
diff --git a/nx-X11/programs/Xserver/xkb/xkbout.c b/nx-X11/programs/Xserver/xkb/xkbout.c
index f6df6755b..baad325c1 100644
--- a/nx-X11/programs/Xserver/xkb/xkbout.c
+++ b/nx-X11/programs/Xserver/xkb/xkbout.c
@@ -35,16 +35,6 @@
#include <stdlib.h>
#include <nx-X11/Xfuncs.h>
-#ifndef XKB_IN_SERVER
-
-#include <nx-X11/Xlib.h>
-#include <nx-X11/XKBlib.h>
-#include "xkbgeom.h"
-
-#include "XKMformat.h"
-#include "XKBfileInt.h"
-
-#else
#include <nx-X11/X.h>
#include <nx-X11/keysym.h>
@@ -59,7 +49,6 @@
#include "xkbgeom.h"
#include "xkbfile.h"
-#endif
#define VMOD_HIDE_VALUE 0
#define VMOD_SHOW_VALUE 1
diff --git a/nx-X11/programs/Xserver/xkb/xkbtext.c b/nx-X11/programs/Xserver/xkb/xkbtext.c
index b0cfc7ddc..cfb7eb865 100644
--- a/nx-X11/programs/Xserver/xkb/xkbtext.c
+++ b/nx-X11/programs/Xserver/xkb/xkbtext.c
@@ -36,16 +36,6 @@
#include <nx-X11/Xos.h>
-#ifndef XKB_IN_SERVER
-
-#include <nx-X11/Xlib.h>
-#include <nx-X11/XKBlib.h>
-#include "xkbgeom.h"
-
-#include "XKMformat.h"
-#include "XKBfileInt.h"
-
-#else
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
@@ -57,7 +47,6 @@
#include <xkbsrv.h>
#include "xkbgeom.h"
-#endif
/***====================================================================***/
@@ -348,22 +337,10 @@ 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)
- sprintf(rtrn=buf, "0x%lx", (long)sym);
- else if (format==XkbCFile) {
- sprintf(buf,"XK_%s",rtrn);
- 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 *
@@ -1348,90 +1325,3 @@ register int i;
return buf;
}
-#ifndef XKB_IN_SERVER
-
-/***====================================================================***/
-
-#define PIXEL_MAX 65535
-
-Bool
-XkbLookupCanonicalRGBColor(char *def,XColor *color)
-{
-int tmp;
-
- if (_XkbStrCaseEqual(def,"black")) {
- color->red= color->green= color->blue= 0;
- return True;
- }
- else if (_XkbStrCaseEqual(def,"white")) {
- color->red= color->green= color->blue= PIXEL_MAX;
- return True;
- }
- else if ((sscanf(def,"grey%d",&tmp)==1)||
- (sscanf(def,"gray%d",&tmp)==1)||
- (sscanf(def,"Grey%d",&tmp)==1)||
- (sscanf(def,"Gray%d",&tmp)==1)) {
- if ((tmp>0)&&(tmp<=100)) {
- tmp= (PIXEL_MAX*tmp)/100;
- color->red= color->green= color->blue= tmp;
- return True;
- }
- }
- else if ((tmp=(_XkbStrCaseEqual(def,"red")*100))||
- (sscanf(def,"red%d",&tmp)==1)) {
- if ((tmp>0)&&(tmp<=100)) {
- tmp= (PIXEL_MAX*tmp)/100;
- color->red= tmp;
- color->green= color->blue= 0;
- return True;
- }
- }
- else if ((tmp=(_XkbStrCaseEqual(def,"green")*100))||
- (sscanf(def,"green%d",&tmp)==1)) {
- if ((tmp>0)&&(tmp<=100)) {
- tmp= (PIXEL_MAX*tmp)/100;
- color->green= tmp;
- color->red= color->blue= 0;
- return True;
- }
- }
- else if ((tmp=(_XkbStrCaseEqual(def,"blue")*100))||
- (sscanf(def,"blue%d",&tmp)==1)) {
- if ((tmp>0)&&(tmp<=100)) {
- tmp= (PIXEL_MAX*tmp)/100;
- color->blue= tmp;
- color->red= color->green= 0;
- return True;
- }
- }
- else if ((tmp=(_XkbStrCaseEqual(def,"magenta")*100))||
- (sscanf(def,"magenta%d",&tmp)==1)) {
- if ((tmp>0)&&(tmp<=100)) {
- tmp= (PIXEL_MAX*tmp)/100;
- color->green= 0;
- color->red= color->blue= tmp;
- return True;
- }
- }
- else if ((tmp=(_XkbStrCaseEqual(def,"cyan")*100))||
- (sscanf(def,"cyan%d",&tmp)==1)) {
- if ((tmp>0)&&(tmp<=100)) {
- tmp= (PIXEL_MAX*tmp)/100;
- color->red= 0;
- color->green= color->blue= tmp;
- return True;
- }
- }
- else if ((tmp=(_XkbStrCaseEqual(def,"yellow")*100))||
- (sscanf(def,"yellow%d",&tmp)==1)) {
- if ((tmp>0)&&(tmp<=100)) {
- tmp= (PIXEL_MAX*tmp)/100;
- color->blue= 0;
- color->red= color->green= tmp;
- return True;
- }
- }
- return False;
-}
-
-#endif
diff --git a/nx-X11/programs/Xserver/xkb/xkmread.c b/nx-X11/programs/Xserver/xkb/xkmread.c
index 6504df301..490c67202 100644
--- a/nx-X11/programs/Xserver/xkb/xkmread.c
+++ b/nx-X11/programs/Xserver/xkb/xkmread.c
@@ -35,19 +35,6 @@
#include <nx-X11/Xos.h>
#include <nx-X11/Xfuncs.h>
-#ifndef XKB_IN_SERVER
-
-#include <stdlib.h>
-#include <nx-X11/Xlib.h>
-#include <nx-X11/keysym.h>
-
-#include <nx-X11/XKBlib.h>
-
-#include "xkbgeom.h"
-#include "XKMformat.h"
-#include "XKBfileInt.h"
-
-#else
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
@@ -67,7 +54,6 @@ XkbInternAtom(Display *dpy,char *str,Bool only_if_exists)
return MakeAtom(str,strlen(str),!only_if_exists);
}
-#endif
#ifndef SEEK_SET
#define SEEK_SET 0