aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xkb/maprules.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-09-26 21:32:05 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-06 21:16:17 +0200
commit7c5d836c2d672a2eb84c3570d88a0d439140083d (patch)
treee319211818c860e34bb57927d4d303e273675ea5 /nx-X11/programs/Xserver/xkb/maprules.c
parent2fdb1add03d6e5cff06ee5d9eb4aa89b3736c66c (diff)
downloadnx-libs-7c5d836c2d672a2eb84c3570d88a0d439140083d.tar.gz
nx-libs-7c5d836c2d672a2eb84c3570d88a0d439140083d.tar.bz2
nx-libs-7c5d836c2d672a2eb84c3570d88a0d439140083d.zip
xserver: remove define XKB_IN_SERVER
it is no longer needed because the code here is only used in the server.
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/maprules.c')
-rw-r--r--nx-X11/programs/Xserver/xkb/maprules.c144
1 files changed, 0 insertions, 144 deletions
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