Commit 9808c66e authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Lift xkb to XORG-1.2.0 state

parent 2db51914
......@@ -155,7 +155,7 @@ extern Status XkbGetControls(
#define XKB_CONFIG_FILE_X2GO "/etc/x2go/x2goagent.keyboard"
#endif
#ifndef XKB_DFLT_RULES_FILE
#define XKB_DFLT_RULES_FILE "xfree86"
#define XKB_DFLT_RULES_FILE "base"
#endif
#ifndef XKB_ALTS_RULES_FILE
#define XKB_ALTS_RULES_FILE "xorg"
......
......@@ -83,9 +83,9 @@ typedef void (*XkbFileAddOnFunc)(
#define _XkbErrXReqFailure 25
#define _XkbErrBadImplementation 26
extern char * _XkbErrMessages[];
extern const char * _XkbErrMessages[];
extern unsigned _XkbErrCode;
extern char * _XkbErrLocation;
extern const char * _XkbErrLocation;
extern unsigned _XkbErrData;
/***====================================================================***/
......@@ -233,8 +233,10 @@ extern Bool XkbLookupGroupAndLevel(
/***====================================================================***/
/***====================================================================***/
extern char * XkbAtomGetString(
Display * /* dpy */,
Atom /* atm */
);
extern Atom XkbInternAtom(
Display * /* dpy */,
......
......@@ -267,7 +267,8 @@ extern int XkbEventBase;
extern int XkbDisableLockActions;
extern char * XkbBaseDirectory;
extern char * XkbBinDirectory;
extern char * XkbInitialMap;
extern int _XkbClientMajor;
extern int _XkbClientMinor;
extern unsigned int XkbXIUnsupported;
extern Bool noXkbExtension;
......
......@@ -26,13 +26,13 @@ XKB_DDXDEFS = XkbServerDefines
ddxList.o ddxDevBtn.o ddxPrivate.o
SRCS = xkb.c xkbUtils.c xkbEvents.c xkbAccessX.c xkbSwap.c \
xkbLEDs.c xkbInit.c xkbActions.c xkbPrKeyEv.c \
xkmread.c xkbfmisc.c xkberrs.c maprules.c \
XKBMisc.c XKBMAlloc.c XKBAlloc.c XKBGAlloc.c \
xkmread.c xkbtext.c xkbfmisc.c xkberrs.c maprules.c \
XKBMisc.c XKBMAlloc.c XKBAlloc.c XKBGAlloc.c xkbout.c \
$(XKBXI_SRCS) $(DDX_SRCS)
OBJS = xkb.o xkbUtils.o xkbEvents.o xkbAccessX.o xkbSwap.o \
xkbLEDs.o xkbInit.o xkbActions.o xkbPrKeyEv.o \
xkmread.o xkbfmisc.o xkberrs.o maprules.o \
XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o \
xkmread.o xkbtext.o xkbfmisc.o xkberrs.o maprules.o \
XKBMisc.o XKBMAlloc.o XKBAlloc.o XKBGAlloc.o xkbout.o \
$(XKBXI_OBJS) $(DDX_OBJS)
INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \
-I$(SERVERSRC)/mi $(XF86INCLUDES) \
......
......@@ -366,8 +366,11 @@ unsigned changed,tmp;
unsigned int new_vmodmask;
changed|= XkbKeyActionsMask;
pActs= XkbResizeKeyActions(xkb,key,nSyms);
if (!pActs)
if (!pActs) {
if (nSyms > IBUF_SIZE)
free(interps);
return False;
}
new_vmodmask= 0;
for (n=0;n<nSyms;n++) {
if (interps[n]) {
......@@ -470,7 +473,7 @@ register int i;
int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups];
if ((!xkb) || (!XkbKeycodeInRange(xkb,key)) || (!xkb->map) ||
(!xkb->map->types)||((groups&XkbAllGroupsMask)==0)||
(!xkb->map->types)||(!newTypesIn)||((groups&XkbAllGroupsMask)==0)||
(nGroups>XkbNumKbdGroups)) {
return BadMatch;
}
......
......@@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
/*#define FALLING_TONE 1*/
/*#define RISING_TONE 1*/
#define FALLING_TONE 10
......
......@@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <dix-config.h>
#endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
......@@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "scrnintstr.h"
#include "windowstr.h"
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
int
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
......
......@@ -164,8 +164,6 @@ char tmpname[PATH_MAX];
if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) {
buf = Xprintf("%s/%s.dir",XkbBaseDirectory,componentDirs[what]);
in= fopen(buf,"r");
free (buf);
buf = NULL;
}
if (!in) {
haveDir= False;
......@@ -181,8 +179,6 @@ char tmpname[PATH_MAX];
if ((list->pattern[what][0]=='*')&&(list->pattern[what][1]=='\0')) {
buf = Xprintf("%s.dir",componentDirs[what]);
in= fopen(buf,"r");
free (buf);
buf = NULL;
}
if (!in) {
haveDir= False;
......@@ -219,6 +215,13 @@ char tmpname[PATH_MAX];
return BadImplementation;
}
list->nFound[what]= 0;
if (buf) {
free(buf);
buf = NULL;
}
buf = malloc(PATH_MAX * sizeof(char));
if (!buf)
return BadAlloc;
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
unsigned flags;
register unsigned int i;
......@@ -263,7 +266,7 @@ char tmpname[PATH_MAX];
#ifndef WIN32
if (haveDir)
fclose(in);
else if ((rval=pclose(in))!=0) {
else if ((rval=Pclose(in))!=0) {
if (xkbDebugFlags)
ErrorF("xkbcomp returned exit code %d\n",rval);
}
......
......@@ -565,7 +565,6 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
char *xkbbasedir = XkbBaseDirectory;
char *xkbbindir = XkbBinDirectory;
#endif
cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"",
xkbbindir,
((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)),
......
......@@ -3,11 +3,6 @@
#include <dix-config.h>
#endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h>
#include "windowstr.h"
#include <xkbsrv.h>
......
......@@ -28,10 +28,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <dix-config.h>
#endif
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
......@@ -40,7 +36,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "scrnintstr.h"
#include "windowstr.h"
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
int
XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act)
......
......@@ -58,12 +58,6 @@
#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
......@@ -1088,20 +1082,20 @@ 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") == 0)
if (strcasecmp(tok,"model") == 0)
headingtype = HEAD_MODEL;
else if (_XkbStrCaseCmp(tok,"layout") == 0)
else if (strcasecmp(tok,"layout") == 0)
headingtype = HEAD_LAYOUT;
else if (_XkbStrCaseCmp(tok,"variant") == 0)
else if (strcasecmp(tok,"variant") == 0)
headingtype = HEAD_VARIANT;
else if (_XkbStrCaseCmp(tok,"option") == 0)
else if (strcasecmp(tok,"option") == 0)
headingtype = HEAD_OPTION;
else {
int i;
headingtype = HEAD_EXTRA;
extra_ndx= -1;
for (i=0;(i<rules->num_extra)&&(extra_ndx<0);i++) {
if (!_XkbStrCaseCmp(tok,rules->extra_names[i]))
if (!strcasecmp(tok,rules->extra_names[i]))
extra_ndx= i;
}
if (extra_ndx<0) {
......
......@@ -47,13 +47,6 @@ static int XkbKeyboardErrorCode;
CARD32 xkbDebugFlags = 0;
static CARD32 xkbDebugCtrls = 0;
#ifndef XKB_SRV_UNSUPPORTED_XI_FEATURES
#define XKB_SRV_UNSUPPORTED_XI_FEATURES XkbXI_KeyboardsMask
#endif
unsigned XkbXIUnsupported= XKB_SRV_UNSUPPORTED_XI_FEATURES;
static RESTYPE RT_XKBCLIENT;
/***====================================================================***/
......@@ -168,11 +161,6 @@ ProcXkbUseExtension(ClientPtr client)
}
else supported = 1;
#ifdef XKB_SWAPPING_BUSTED
if (client->swapped)
supported= 0;
#endif
if ((supported) && (!(client->xkbClientFlags&_XkbClientInitialized))) {
client->xkbClientFlags= _XkbClientInitialized;
client->vMajor= stuff->wantedMajor;
......@@ -2891,7 +2879,6 @@ ProcXkbGetNamedIndicator(ClientPtr client)
register int i = 0;
XkbSrvLedInfoPtr sli;
XkbIndicatorMapPtr map = NULL;
Bool supported;
REQUEST(xkbGetNamedIndicatorReq);
REQUEST_SIZE_MATCH(xkbGetNamedIndicatorReq);
......@@ -2906,15 +2893,6 @@ ProcXkbGetNamedIndicator(ClientPtr client)
if (!sli)
return BadAlloc;
supported= True;
if (XkbXIUnsupported&XkbXI_IndicatorsMask) {
if ((dev!=(DeviceIntPtr)LookupKeyboardDevice())||
((sli->flags&XkbSLI_IsDefault)==0)) {
supported= False;
}
}
if (supported) {
i= 0;
map= NULL;
if ((sli->names)&&(sli->maps)) {
......@@ -2925,14 +2903,13 @@ ProcXkbGetNamedIndicator(ClientPtr client)
}
}
}
}
rep.type= X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.deviceID = dev->id;
rep.indicator= stuff->indicator;
if ((map!=NULL)&&(supported)) {
if (map!=NULL) {
rep.found= True;
rep.on= ((sli->effectiveState&(1<<i))!=0);
rep.realIndicator= ((sli->physIndicators&(1<<i))!=0);
......@@ -2960,7 +2937,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
rep.realMods= 0;
rep.virtualMods= 0;
rep.ctrls= 0;
rep.supported= supported;
rep.supported= True;
}
if ( client->swapped ) {
swapl(&rep.length);
......@@ -2971,21 +2948,6 @@ ProcXkbGetNamedIndicator(ClientPtr client)
}
WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), &rep);
if (!supported) {
xkbExtensionDeviceNotify edev;
bzero(&edev,sizeof(xkbExtensionDeviceNotify));
edev.reason= XkbXI_UnsupportedFeatureMask;
edev.ledClass= stuff->ledClass;
edev.ledID= stuff->ledID;
edev.ledsDefined= sli->namesPresent|sli->mapsPresent;
edev.ledState= sli->effectiveState;
edev.firstBtn= 0;
edev.nBtns= 0;
edev.unsupported= XkbXIUnsupported&XkbXI_IndicatorsMask;
edev.supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
XkbSendExtensionDeviceNotify(dev,client,&edev);
}
return client->noClientException;
}
......@@ -3020,24 +2982,6 @@ ProcXkbSetNamedIndicator(ClientPtr client)
if (!sli)
return BadAlloc;
if (XkbXIUnsupported&XkbXI_IndicatorsMask) {
if ((dev!=(DeviceIntPtr)LookupKeyboardDevice())||
((sli->flags&XkbSLI_IsDefault)==0)) {
bzero(&ed,sizeof(xkbExtensionDeviceNotify));
ed.reason= XkbXI_UnsupportedFeatureMask;
ed.ledClass= stuff->ledClass;
ed.ledID= stuff->ledID;
ed.ledsDefined= sli->namesPresent|sli->mapsPresent;
ed.ledState= sli->effectiveState;
ed.firstBtn= 0;
ed.nBtns= 0;
ed.unsupported= XkbXIUnsupported&XkbXI_IndicatorsMask;
ed.supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
XkbSendExtensionDeviceNotify(dev,client,&ed);
return client->noClientException;
}
}
statec= mapc= namec= 0;
map= NULL;
if (sli->names && sli->maps) {
......@@ -3052,7 +2996,8 @@ ProcXkbSetNamedIndicator(ClientPtr client)
if (!stuff->createMap)
return client->noClientException;
for (led=0,map=NULL;(led<XkbNumIndicators)&&(map==NULL);led++) {
if ((sli->names[led]==None)&&(!XkbIM_InUse(&sli->maps[led]))) {
if ((sli->names)&&(sli->maps)&&(sli->names[led]==None)&&
(!XkbIM_InUse(&sli->maps[led]))) {
map= &sli->maps[led];
sli->names[led]= stuff->indicator;
break;
......@@ -3261,6 +3206,7 @@ char * desc;
start = desc = (char *)malloc(length);
if ( !start )
return BadAlloc;
if (xkb->names) {
if (which&XkbKeycodesNameMask) {
*((CARD32 *)desc)= xkb->names->keycodes;
if (client->swapped) {
......@@ -3316,7 +3262,7 @@ char * desc;
}
desc= (char *)atm;
}
if (which&XkbKTLevelNamesMask) {
if (which&XkbKTLevelNamesMask && xkb->map) {
XkbKeyTypePtr type = xkb->map->types;
register CARD32 *atm;
for (i=0;i<rep->nTypes;i++,type++) {
......@@ -3373,6 +3319,8 @@ char * desc;
}
desc+= rep->nRadioGroups*4;
}
}
if ((desc-start)!=(length)) {
ErrorF("BOGUS LENGTH in write names, expected %d, got %ld\n",
length, (unsigned long)(desc-start));
......@@ -5610,7 +5558,7 @@ char * str;
wanted&= ~XkbXI_ButtonActionsMask;
if ((!dev->kbdfeed)&&(!dev->leds))
wanted&= ~XkbXI_IndicatorsMask;
wanted&= ~XkbXIUnsupported;
wanted&= ~XkbXI_KeyboardsMask;
nameLen= XkbSizeCountedString(dev->name);
rep.type = X_Reply;
......@@ -5618,8 +5566,8 @@ char * str;
rep.sequenceNumber = client->sequence;
rep.length = nameLen/4;
rep.present = wanted;
rep.supported = XkbXI_AllDeviceFeaturesMask&(~XkbXIUnsupported);
rep.unsupported = XkbXIUnsupported;
rep.supported = XkbXI_AllDeviceFeaturesMask&(~XkbXI_KeyboardsMask);
rep.unsupported = XkbXI_KeyboardsMask;
rep.firstBtnWanted = rep.nBtnsWanted = 0;
rep.firstBtnRtrn = rep.nBtnsRtrn = 0;
if (dev->button)
......
......@@ -996,7 +996,6 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi,
return 1;
}
#ifdef XFree86Server
static int
_XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
XkbFilterPtr filter,
......@@ -1018,7 +1017,6 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
}
return 1;
}
#endif
#ifdef XINPUT
......@@ -1248,12 +1246,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
sendEvent= _XkbFilterDeviceBtn(xkbi,filter,key,&act);
break;
#endif
#ifdef XFree86Server
case XkbSA_XFree86Private:
filter = _XkbNextFreeFilter();
sendEvent= _XkbFilterXF86Private(xkbi,filter,key,&act);
break;
#endif
}
}
}
......
......@@ -207,6 +207,10 @@ int i;
CARD32 changedControls;
changedControls= 0;
if (!kbd || !kbd->kbdfeed)
return 0;
if (old->enabled_ctrls!=new->enabled_ctrls)
changedControls|= XkbControlsEnabledMask;
if ((old->repeat_delay!=new->repeat_delay)||
......
......@@ -54,13 +54,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1)
#if defined(ultrix) || defined(__alpha) || defined(__alpha__)
#define LED_COMPOSE 2
#define LED_CAPS 3
#define LED_SCROLL 4
#define LED_NUM 5
#define PHYS_LEDS 0x1f
#else
#ifdef sun
#define LED_NUM 1
#define LED_SCROLL 2
......@@ -73,7 +66,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define LED_SCROLL 3
#define PHYS_LEDS 0x07
#endif
#endif
#define MAX_TOC 16
typedef struct _SrvXkmInfo {
......
......@@ -745,13 +745,13 @@ xkbExtensionDeviceNotify my_ed;
changes->names.changed_indicators|= changed_names;
}
ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXIUnsupported));
ed->reason|= (XkbXI_IndicatorNamesMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorNamesMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
ed->unsupported= XkbXI_KeyboardsMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
if (changes!=&my_changes) changes= NULL;
if (ed!=&my_ed) ed= NULL;
......@@ -823,13 +823,13 @@ xkbExtensionDeviceNotify my_ed;
XkbCheckIndicatorMaps(dev,sli,changed_maps);
ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXIUnsupported));
ed->reason|= (XkbXI_IndicatorMapsMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorMapsMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorMapsMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
XkbUpdateLedAutoState(dev,sli,changed_maps,ed,changes,cause);
......@@ -904,13 +904,13 @@ Bool kb_changed;
if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault))
changes->indicators.state_changes|= affected;
if (affected) {
ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXIUnsupported));
ed->reason|= (XkbXI_IndicatorStateMask&(~XkbXI_KeyboardsMask));
ed->ledClass= sli->class;
ed->ledID= sli->id;
ed->ledsDefined= sli->namesPresent|sli->mapsPresent;
ed->ledState= sli->effectiveState;
ed->unsupported|= XkbXIUnsupported&XkbXI_IndicatorStateMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXIUnsupported);
ed->unsupported|= XkbXI_KeyboardsMask&XkbXI_IndicatorStateMask;
ed->supported= XkbXI_AllFeaturesMask&(~XkbXI_KeyboardsMask);
}
if (kb_changed) {
......
......@@ -149,11 +149,7 @@ unsigned ndx;
break;
default:
ErrorF("unknown key behavior 0x%04x\n",behavior.type);
#if defined(MetroLink)
return;
#else
break;
#endif
}
}
XkbHandleActions(keybd,keybd,xE,count);
......
......@@ -711,11 +711,11 @@ unsigned char grp;
grp= state->locked_group;
if (grp>=ctrls->num_groups)
state->locked_group= XkbAdjustGroup(grp,ctrls);
state->locked_group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
grp= state->locked_group+state->base_group+state->latched_group;
if (grp>=ctrls->num_groups)
state->group= XkbAdjustGroup(grp,ctrls);
state->group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
else state->group= grp;
XkbComputeCompatState(xkbi);
return;
......
......@@ -152,89 +152,6 @@ int count,nRead=0;
return nRead;
}
unsigned
_XkbKSCheckCase(KeySym ks)
{
unsigned set,rtrn;
set= (ks & (~0xff)) >> 8;
rtrn= 0;
switch (set) {
case 0: /* latin 1 */
if (((ks>=XK_A)&&(ks<=XK_Z))||
((ks>=XK_Agrave)&&(ks<=XK_THORN)&&(ks!=XK_multiply))) {
rtrn|= _XkbKSUpper;
}
if (((ks>=XK_a)&&(ks<=XK_z))||
((ks>=XK_agrave)&&(ks<=XK_ydiaeresis))) {
rtrn|= _XkbKSLower;
}
break;
case 1: /* latin 2 */
if (((ks>=XK_Aogonek)&&(ks<=XK_Zabovedot)&&(ks!=XK_breve))||
((ks>=XK_Racute)&&(ks<=XK_Tcedilla))) {
rtrn|= _XkbKSUpper;
}
if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_caron))||
((ks>=XK_racute)&&(ks<=XK_tcedilla))) {
rtrn|= _XkbKSLower;
}
break;
case 2: /* latin 3 */
if (((ks>=XK_Hstroke)&&(ks<=XK_Jcircumflex))||
((ks>=XK_Cabovedot)&&(ks<=XK_Scircumflex))) {
rtrn|= _XkbKSUpper;
}
if (((ks>=XK_hstroke)&&(ks<=XK_jcircumflex))||
((ks>=XK_cabovedot)&&(ks<=XK_scircumflex))) {
rtrn|= _XkbKSLower;
}
break;
case 3: /* latin 4 */
if (((ks>=XK_Rcedilla)&&(ks<=XK_Tslash))||
(ks==XK_ENG)||
((ks>=XK_Amacron)&&(ks<=XK_Umacron))) {
rtrn|= _XkbKSUpper;
}
if (((ks>=XK_rcedilla)&&(ks<=XK_tslash))||
(ks==XK_eng)||
((ks>=XK_amacron)&&(ks<=XK_umacron))) {
rtrn|= _XkbKSLower;
}
break;
case 18: /* latin 8 */
if ((ks==XK_Babovedot)||
((ks>=XK_Dabovedot)&&(ks<=XK_Wacute))||
((ks>=XK_Ygrave)&&(ks<=XK_Fabovedot))||
(ks==XK_Mabovedot)||
(ks==XK_Pabovedot)||
(ks==XK_Sabovedot)||
(ks==XK_Wdiaeresis)||
((ks>=XK_Wcircumflex)&&(ks<=XK_Ycircumflex))) {
rtrn|= _XkbKSUpper;
}
if ((ks==XK_babovedot)||
(ks==XK_dabovedot)||
(ks==XK_fabovedot)||
(ks==XK_mabovedot)||
((ks>=XK_wgrave)&&(ks<=XK_wacute))||
(ks==XK_ygrave)||
((ks>=XK_wdiaeresis)&&(ks<=XK_ycircumflex))) {
rtrn|= _XkbKSLower;
}
break;
case 19: /* latin 9 */
if ((ks==XK_OE)||(ks==XK_Ydiaeresis)) {
rtrn|= _XkbKSUpper;
}
if (ks==XK_oe) {
rtrn|= _XkbKSLower;
}
break;
}
return rtrn;
}
/***====================================================================***/
static int
......@@ -1226,10 +1143,14 @@ int nRead;
*loaded_rtrn|= XkmGeometryMask;
break;
default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
nRead= 0;
break;
}
if (nRead!=tmpTOC.size) {
_XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
nRead-tmpTOC.size);
return 0;
}
return (nRead>=0);
......@@ -1264,6 +1185,8 @@ char name[100];
return Xstrdup(name);
break;
default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
break;
}
return NULL;
......@@ -1329,6 +1252,8 @@ unsigned which= need|want;
tmp= ReadXkmGeometry(file,result);
break;
default:
_XkbLibError(_XkbErrBadImplementation,
XkbConfigText(tmpTOC.type,XkbMessage),0);
tmp= 0;
break;
}
......@@ -1338,7 +1263,8 @@ unsigned which= need|want;
result->defined|= (1<<toc[i].type);
}
if (nRead!=tmpTOC.size) {
return 0;
_XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage),
nRead-tmpTOC.size);
}
}
return which;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment