summaryrefslogtreecommitdiff
path: root/src/xkb
diff options
context:
space:
mode:
Diffstat (limited to 'src/xkb')
-rw-r--r--src/xkb/XKB.c165
-rw-r--r--src/xkb/XKBAlloc.c92
-rw-r--r--src/xkb/XKBBell.c54
-rw-r--r--src/xkb/XKBBind.c186
-rw-r--r--src/xkb/XKBCompat.c31
-rw-r--r--src/xkb/XKBCtrls.c76
-rw-r--r--src/xkb/XKBCvt.c43
-rw-r--r--src/xkb/XKBExtDev.c138
-rw-r--r--src/xkb/XKBGAlloc.c365
-rw-r--r--src/xkb/XKBGeom.c119
-rw-r--r--src/xkb/XKBGetByName.c18
-rw-r--r--src/xkb/XKBGetMap.c162
-rw-r--r--src/xkb/XKBList.c27
-rw-r--r--src/xkb/XKBMAlloc.c92
-rw-r--r--src/xkb/XKBMisc.c98
-rw-r--r--src/xkb/XKBNames.c70
-rw-r--r--src/xkb/XKBRdBuf.c94
-rw-r--r--src/xkb/XKBSetGeom.c97
-rw-r--r--src/xkb/XKBSetMap.c127
-rw-r--r--src/xkb/XKBUse.c42
-rw-r--r--src/xkb/XKBleds.c80
-rw-r--r--src/xkb/XKBlibint.h72
22 files changed, 71 insertions, 2177 deletions
diff --git a/src/xkb/XKB.c b/src/xkb/XKB.c
index b407bcc..8f81695 100644
--- a/src/xkb/XKB.c
+++ b/src/xkb/XKB.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKB.c,v 1.7 2002/12/10 04:30:39 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKB.c,v 1.10 2003/11/17 22:20:09 dawes Exp $ */
#include <stdio.h>
#define NEED_REPLIES
@@ -37,23 +37,12 @@ XkbInternAtomFunc _XkbInternAtomFunc= XInternAtom;
XkbGetAtomNameFunc _XkbGetAtomNameFunc= XGetAtomName;
Bool
-#if NeedFunctionPrototypes
XkbQueryExtension( Display *dpy,
int * opcodeReturn,
int * eventBaseReturn,
int * errorBaseReturn,
int * majorReturn,
int * minorReturn)
-#else
-XkbQueryExtension(dpy,opcodeReturn,eventBaseReturn,errorBaseReturn,
- majorReturn,minorReturn)
- Display *dpy;
- int *opcodeReturn;
- int *eventBaseReturn;
- int *errorBaseReturn;
- int *majorReturn;
- int *minorReturn;
-#endif
{
if (!XkbUseExtension(dpy,majorReturn,minorReturn))
return False;
@@ -71,13 +60,7 @@ XkbQueryExtension(dpy,opcodeReturn,eventBaseReturn,errorBaseReturn,
}
Bool
-#if NeedFunctionPrototypes
XkbLibraryVersion(int *libMajorRtrn,int *libMinorRtrn)
-#else
-XkbLibraryVersion(libMajorRtrn,libMinorRtrn)
- int *libMajorRtrn;
- int *libMinorRtrn;
-#endif
{
int supported;
@@ -97,18 +80,10 @@ int supported;
}
Bool
-#if NeedFunctionPrototypes
XkbSelectEvents( Display * dpy,
unsigned int deviceSpec,
unsigned int affect,
unsigned int selectAll)
-#else
-XkbSelectEvents(dpy,deviceSpec,affect,selectAll)
- Display *dpy;
- unsigned int deviceSpec;
- unsigned int affect;
- unsigned int selectAll;
-#endif
{
register xkbSelectEventsReq *req;
XkbInfoPtr xkbi;
@@ -155,20 +130,11 @@ XkbSelectEvents(dpy,deviceSpec,affect,selectAll)
}
Bool
-#if NeedFunctionPrototypes
XkbSelectEventDetails( Display * dpy,
unsigned deviceSpec,
unsigned eventType,
unsigned long int affect,
unsigned long int details)
-#else
-XkbSelectEventDetails(dpy,deviceSpec,eventType,affect,details)
- Display *dpy;
- unsigned deviceSpec;
- unsigned eventType;
- unsigned long int affect;
- unsigned long int details;
-#endif
{
register xkbSelectEventsReq *req;
XkbInfoPtr xkbi;
@@ -256,18 +222,10 @@ XkbSelectEventDetails(dpy,deviceSpec,eventType,affect,details)
}
Bool
-#if NeedFunctionPrototypes
XkbLockModifiers( Display * dpy,
unsigned int deviceSpec,
unsigned int affect,
unsigned int values)
-#else
-XkbLockModifiers(dpy,deviceSpec,affect,values)
- Display *dpy;
- unsigned int deviceSpec;
- unsigned int affect;
- unsigned int values;
-#endif
{
register xkbLatchLockStateReq *req;
XkbInfoPtr xkbi;
@@ -295,18 +253,10 @@ XkbLockModifiers(dpy,deviceSpec,affect,values)
}
Bool
-#if NeedFunctionPrototypes
XkbLatchModifiers( Display * dpy,
unsigned int deviceSpec,
unsigned int affect,
unsigned int values)
-#else
-XkbLatchModifiers(dpy,deviceSpec,affect,values)
- Display *dpy;
- unsigned int deviceSpec;
- unsigned int affect;
- unsigned int values;
-#endif
{
register xkbLatchLockStateReq *req;
XkbInfoPtr xkbi;
@@ -336,14 +286,7 @@ XkbLatchModifiers(dpy,deviceSpec,affect,values)
}
Bool
-#if NeedFunctionPrototypes
XkbLockGroup(Display *dpy,unsigned int deviceSpec,unsigned int group)
-#else
-XkbLockGroup(dpy,deviceSpec,group)
- Display *dpy;
- unsigned int deviceSpec;
- unsigned int group;
-#endif
{
register xkbLatchLockStateReq *req;
XkbInfoPtr xkbi;
@@ -371,14 +314,7 @@ XkbLockGroup(dpy,deviceSpec,group)
}
Bool
-#if NeedFunctionPrototypes
XkbLatchGroup(Display *dpy,unsigned int deviceSpec,unsigned int group)
-#else
-XkbLatchGroup(dpy,deviceSpec,group)
- Display *dpy;
- unsigned int deviceSpec;
- unsigned int group;
-#endif
{
register xkbLatchLockStateReq *req;
XkbInfoPtr xkbi;
@@ -408,14 +344,7 @@ XkbLatchGroup(dpy,deviceSpec,group)
}
unsigned
-#if NeedFunctionPrototypes
XkbSetXlibControls(Display *dpy,unsigned affect,unsigned values)
-#else
-XkbSetXlibControls(dpy,affect,values)
- Display * dpy;
- unsigned affect;
- unsigned values;
-#endif
{
if (!dpy->xkb_info)
XkbUseExtension(dpy,NULL,NULL);
@@ -428,12 +357,7 @@ XkbSetXlibControls(dpy,affect,values)
}
unsigned
-#if NeedFunctionPrototypes
XkbGetXlibControls(Display *dpy)
-#else
-XkbGetXlibControls(dpy)
- Display * dpy;
-#endif
{
if (!dpy->xkb_info)
XkbUseExtension(dpy,NULL,NULL);
@@ -443,11 +367,7 @@ XkbGetXlibControls(dpy)
}
unsigned int
-#if NeedFunctionPrototypes
XkbXlibControlsImplemented(void)
-#else
-XkbXlibControlsImplemented()
-#endif
{
#ifdef __sgi
return XkbLC_AllControls;
@@ -457,7 +377,6 @@ XkbXlibControlsImplemented()
}
Bool
-#if NeedFunctionPrototypes
XkbSetDebuggingFlags( Display * dpy,
unsigned int mask,
unsigned int flags,
@@ -466,17 +385,6 @@ XkbSetDebuggingFlags( Display * dpy,
unsigned int ctrls,
unsigned int * rtrn_flags,
unsigned int * rtrn_ctrls)
-#else
-XkbSetDebuggingFlags(dpy,mask,flags,msg,ctrls_mask,ctrls,rtrn_flags,rtrn_ctrls)
- Display * dpy;
- unsigned int mask;
- unsigned int flags;
- char * msg;
- unsigned int ctrls_mask;
- unsigned int ctrls;
- unsigned int * rtrn_flags;
- unsigned int * rtrn_ctrls;
-#endif
{
register xkbSetDebuggingFlagsReq *req;
xkbSetDebuggingFlagsReply rep;
@@ -518,16 +426,9 @@ XkbSetDebuggingFlags(dpy,mask,flags,msg,ctrls_mask,ctrls,rtrn_flags,rtrn_ctrls)
}
Bool
-#if NeedFunctionPrototypes
XkbComputeEffectiveMap( XkbDescPtr xkb,
XkbKeyTypePtr type,
unsigned char * map_rtrn)
-#else
-XkbComputeEffectiveMap(xkb,type,map_rtrn)
- XkbDescPtr xkb;
- XkbKeyTypePtr type;
- unsigned char * map_rtrn;
-#endif
{
register int i;
unsigned tmp;
@@ -571,14 +472,7 @@ XkbKTMapEntryPtr entry = NULL;
}
Status
-#if NeedFunctionPrototypes
XkbGetState(Display *dpy,unsigned deviceSpec,XkbStatePtr rtrn)
-#else
-XkbGetState(dpy,deviceSpec,rtrn)
- Display * dpy;
- unsigned deviceSpec;
- XkbStatePtr rtrn;
-#endif
{
register xkbGetStateReq *req;
xkbGetStateReply rep;
@@ -618,14 +512,7 @@ XkbGetState(dpy,deviceSpec,rtrn)
}
Bool
-#if NeedFunctionPrototypes
XkbSetDetectableAutoRepeat(Display *dpy,Bool detectable,Bool *supported)
-#else
-XkbSetDetectableAutoRepeat(dpy,detectable,supported)
- Display * dpy;
- Bool detectable;
- Bool * supported;
-#endif
{
register xkbPerClientFlagsReq * req;
xkbPerClientFlagsReply rep;
@@ -658,13 +545,7 @@ XkbInfoPtr xkbi;
}
Bool
-#if NeedFunctionPrototypes
XkbGetDetectableAutoRepeat(Display *dpy,Bool *supported)
-#else
-XkbGetDetectableAutoRepeat(dpy,supported)
- Display * dpy;
- Bool * supported;
-#endif
{
register xkbPerClientFlagsReq * req;
xkbPerClientFlagsReply rep;
@@ -695,18 +576,10 @@ XkbInfoPtr xkbi;
}
Bool
-#if NeedFunctionPrototypes
XkbSetAutoResetControls( Display * dpy,
unsigned changes,
unsigned * auto_ctrls,
unsigned * auto_values)
-#else
-XkbSetAutoResetControls(dpy,changes,auto_ctrls,auto_values)
- Display * dpy;
- unsigned changes;
- unsigned * auto_ctrls;
- unsigned * auto_values;
-#endif
{
register xkbPerClientFlagsReq * req;
xkbPerClientFlagsReply rep;
@@ -739,16 +612,9 @@ XkbInfoPtr xkbi;
}
Bool
-#if NeedFunctionPrototypes
XkbGetAutoResetControls( Display * dpy,
unsigned * auto_ctrls,
unsigned * auto_ctrl_values)
-#else
-XkbGetAutoResetControls(dpy,auto_ctrls,auto_ctrl_values)
- Display * dpy;
- unsigned * auto_ctrls;
- unsigned * auto_ctrl_values;
-#endif
{
register xkbPerClientFlagsReq * req;
xkbPerClientFlagsReply rep;
@@ -781,16 +647,9 @@ XkbInfoPtr xkbi;
}
Bool
-#if NeedFunctionPrototypes
XkbSetPerClientControls( Display * dpy,
unsigned change,
unsigned * values)
-#else
-XkbSetPerClientControls(dpy,change,values)
- Display * dpy;
- unsigned change;
- unsigned * values;
-#endif
{
register xkbPerClientFlagsReq * req;
xkbPerClientFlagsReply rep;
@@ -822,14 +681,8 @@ unsigned value_hold = *values;
}
Bool
-#if NeedFunctionPrototypes
XkbGetPerClientControls( Display * dpy,
unsigned * ctrls)
-#else
-XkbGetPerClientControls(dpy,ctrls)
- Display * dpy;
- unsigned * ctrls;
-#endif
{
register xkbPerClientFlagsReq * req;
xkbPerClientFlagsReply rep;
@@ -863,22 +716,12 @@ XkbInfoPtr xkbi;
}
Display *
-#if NeedFunctionPrototypes
XkbOpenDisplay( char * name,
int * ev_rtrn,
int * err_rtrn,
int * major_rtrn,
int * minor_rtrn,
int * reason)
-#else
-XkbOpenDisplay(name,ev_rtrn,err_rtrn,major_rtrn,minor_rtrn,reason)
- char * name;
- int * ev_rtrn;
- int * err_rtrn;
- int * major_rtrn;
- int * minor_rtrn;
- int * reason;
-#endif
{
Display* dpy;
int major_num,minor_num;
@@ -917,13 +760,7 @@ XkbOpenDisplay(name,ev_rtrn,err_rtrn,major_rtrn,minor_rtrn,reason)
}
void
-#if NeedFunctionPrototypes
XkbSetAtomFuncs(XkbInternAtomFunc getAtom,XkbGetAtomNameFunc getName)
-#else
-XkbSetAtomFuncs(getAtom,getName)
- XkbInternAtomFunc getAtom;
- XkbGetAtomNameFunc getName;
-#endif
{
_XkbInternAtomFunc= (getAtom?getAtom:XInternAtom);
_XkbGetAtomNameFunc= (getName?getName:XGetAtomName);
diff --git a/src/xkb/XKBAlloc.c b/src/xkb/XKBAlloc.c
index c6fd855..5bc7f65 100644
--- a/src/xkb/XKBAlloc.c
+++ b/src/xkb/XKBAlloc.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBAlloc.c,v 3.5 2001/01/17 19:41:48 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBAlloc.c,v 3.6 2003/11/17 22:20:09 dawes Exp $ */
#ifndef XKB_IN_SERVER
@@ -55,14 +55,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/*ARGSUSED*/
Status
-#if NeedFunctionPrototypes
XkbAllocCompatMap(XkbDescPtr xkb,unsigned which,unsigned nSI)
-#else
-XkbAllocCompatMap(xkb,which,nSI)
- XkbDescPtr xkb;
- unsigned which;
- unsigned nSI;
-#endif
{
XkbCompatMapPtr compat;
XkbSymInterpretRec *prev_interpret;
@@ -109,14 +102,7 @@ XkbSymInterpretRec *prev_interpret;
void
-#if NeedFunctionPrototypes
XkbFreeCompatMap(XkbDescPtr xkb,unsigned which,Bool freeMap)
-#else
-XkbFreeCompatMap(xkb,which,freeMap)
- XkbDescPtr xkb;
- unsigned which;
- Bool freeMap;
-#endif
{
register XkbCompatMapPtr compat;
@@ -143,15 +129,7 @@ register XkbCompatMapPtr compat;
/***===================================================================***/
Status
-#if NeedFunctionPrototypes
XkbAllocNames(XkbDescPtr xkb,unsigned which,int nTotalRG,int nTotalAliases)
-#else
-XkbAllocNames(xkb,which,nTotalRG,nTotalAliases)
- XkbDescPtr xkb;
- unsigned which;
- int nTotalRG;
- int nTotalAliases;
-#endif
{
XkbNamesPtr names;
@@ -231,14 +209,7 @@ XkbNamesPtr names;
}
void
-#if NeedFunctionPrototypes
XkbFreeNames(XkbDescPtr xkb,unsigned which,Bool freeMap)
-#else
-XkbFreeNames(xkb,which,freeMap)
- XkbDescPtr xkb;
- unsigned which;
- Bool freeMap;
-#endif
{
XkbNamesPtr names;
@@ -287,13 +258,7 @@ XkbNamesPtr names;
/*ARGSUSED*/
Status
-#if NeedFunctionPrototypes
XkbAllocControls(XkbDescPtr xkb,unsigned which)
-#else
-XkbAllocControls(xkb,which)
- XkbDescPtr xkb;
- unsigned which;
-#endif
{
if (xkb==NULL)
return BadMatch;
@@ -308,14 +273,7 @@ XkbAllocControls(xkb,which)
/*ARGSUSED*/
void
-#if NeedFunctionPrototypes
XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap)
-#else
-XkbFreeControls(xkb,which,freeMap)
- XkbDescPtr xkb;
- unsigned which;
- Bool freeMap;
-#endif
{
if (freeMap && (xkb!=NULL) && (xkb->ctrls!=NULL)) {
_XkbFree(xkb->ctrls);
@@ -327,12 +285,7 @@ XkbFreeControls(xkb,which,freeMap)
/***===================================================================***/
Status
-#if NeedFunctionPrototypes
XkbAllocIndicatorMaps(XkbDescPtr xkb)
-#else
-XkbAllocIndicatorMaps(xkb)
- XkbDescPtr xkb;
-#endif
{
if (xkb==NULL)
return BadMatch;
@@ -345,12 +298,7 @@ XkbAllocIndicatorMaps(xkb)
}
void
-#if NeedFunctionPrototypes
XkbFreeIndicatorMaps(XkbDescPtr xkb)
-#else
-XkbFreeIndicatorMaps(xkb)
- XkbDescPtr xkb;
-#endif
{
if ((xkb!=NULL)&&(xkb->indicators!=NULL)) {
_XkbFree(xkb->indicators);
@@ -362,11 +310,7 @@ XkbFreeIndicatorMaps(xkb)
/***====================================================================***/
XkbDescRec *
-#if NeedFunctionPrototypes
XkbAllocKeyboard(void)
-#else
-XkbAllocKeyboard()
-#endif
{
XkbDescRec *xkb;
@@ -377,14 +321,7 @@ XkbDescRec *xkb;
}
void
-#if NeedFunctionPrototypes
XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll)
-#else
-XkbFreeKeyboard(xkb,which,freeAll)
- XkbDescPtr xkb;
- unsigned which;
- Bool freeAll;
-#endif
{
if (xkb==NULL)
return;
@@ -412,14 +349,7 @@ XkbFreeKeyboard(xkb,which,freeAll)
/***====================================================================***/
XkbDeviceLedInfoPtr
-#if NeedFunctionPrototypes
XkbAddDeviceLedInfo(XkbDeviceInfoPtr devi,unsigned ledClass,unsigned ledId)
-#else
-XkbAddDeviceLedInfo(devi,ledClass,ledId)
- XkbDeviceInfoPtr devi;
- unsigned ledClass;
- unsigned ledId;
-#endif
{
XkbDeviceLedInfoPtr devli;
register int i;
@@ -457,13 +387,7 @@ register int i;
}
Status
-#if NeedFunctionPrototypes
XkbResizeDeviceButtonActions(XkbDeviceInfoPtr devi,unsigned newTotal)
-#else
-XkbResizeDeviceButtonActions(devi,newTotal)
- XkbDeviceInfoPtr devi;
- unsigned newTotal;
-#endif
{
XkbAction *prev_btn_acts;
@@ -497,14 +421,7 @@ XkbResizeDeviceButtonActions(devi,newTotal)
/*ARGSUSED*/
XkbDeviceInfoPtr
-#if NeedFunctionPrototypes
XkbAllocDeviceInfo(unsigned deviceSpec,unsigned nButtons,unsigned szLeds)
-#else
-XkbAllocDeviceInfo(deviceSpec,nButtons,szLeds)
- unsigned deviceSpec;
- unsigned nButtons;
- unsigned szLeds;
-#endif
{
XkbDeviceInfoPtr devi;
@@ -543,14 +460,7 @@ XkbDeviceInfoPtr devi;
void
-#if NeedFunctionPrototypes
XkbFreeDeviceInfo(XkbDeviceInfoPtr devi,unsigned which,Bool freeDevI)
-#else
-XkbFreeDeviceInfo(devi,which,freeDevI)
- XkbDeviceInfoPtr devi;
- unsigned which;
- Bool freeDevI;
-#endif
{
if (devi) {
if (freeDevI) {
diff --git a/src/xkb/XKBBell.c b/src/xkb/XKBBell.c
index 3b6bb85..a1d4d5f 100644
--- a/src/xkb/XKBBell.c
+++ b/src/xkb/XKBBell.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/lib/X11/XKBBell.c,v 1.2 2003/11/17 22:20:09 dawes Exp $ */
#include <stdio.h>
#define NEED_REPLIES
@@ -34,7 +35,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
Bool
-#if NeedFunctionPrototypes
XkbDeviceBell( Display * dpy,
Window window,
int deviceID,
@@ -42,16 +42,6 @@ XkbDeviceBell( Display * dpy,
int bellID,
int percent,
Atom name)
-#else
-XkbDeviceBell(dpy,window,deviceID,bellClass,bellID,percent,name)
- Display *dpy;
- Window window;
- int deviceID;
- int bellClass;
- int bellID;
- int percent;
- Atom name;
-#endif
{
register xkbBellReq *req;
XkbInfoPtr xkbi;
@@ -81,20 +71,11 @@ XkbDeviceBell(dpy,window,deviceID,bellClass,bellID,percent,name)
}
Bool
-#if NeedFunctionPrototypes
XkbForceDeviceBell( Display * dpy,
int deviceID,
int bellClass,
int bellID,
int percent)
-#else
-XkbForceDeviceBell(dpy,deviceID,bellClass,bellID,percent)
- Display *dpy;
- int deviceID;
- int bellClass;
- int bellID;
- int percent;
-#endif
{
register xkbBellReq *req;
XkbInfoPtr xkbi;
@@ -124,7 +105,6 @@ XkbForceDeviceBell(dpy,deviceID,bellClass,bellID,percent)
}
Bool
-#if NeedFunctionPrototypes
XkbDeviceBellEvent( Display * dpy,
Window window,
int deviceID,
@@ -132,16 +112,6 @@ XkbDeviceBellEvent( Display * dpy,
int bellID,
int percent,
Atom name)
-#else
-XkbDeviceBellEvent(dpy,window,deviceID,bellClass,bellID,percent,name)
- Display *dpy;
- Window window;
- int deviceID;
- int bellClass;
- int bellID;
- int percent;
- Atom name;
-#endif
{
register xkbBellReq *req;
XkbInfoPtr xkbi;
@@ -171,15 +141,7 @@ XkbDeviceBellEvent(dpy,window,deviceID,bellClass,bellID,percent,name)
}
Bool
-#if NeedFunctionPrototypes
XkbBell(Display *dpy,Window window,int percent,Atom name)
-#else
-XkbBell(dpy,window,percent,name)
- Display *dpy;
- Window window;
- int percent;
- Atom name;
-#endif
{
if ((dpy->flags & XlibDisplayNoXkb) ||
(!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) {
@@ -191,13 +153,7 @@ XkbBell(dpy,window,percent,name)
}
Bool
-#if NeedFunctionPrototypes
XkbForceBell(Display *dpy,int percent)
-#else
-XkbForceBell(dpy,percent)
- Display * dpy;
- int percent;
-#endif
{
if ((dpy->flags & XlibDisplayNoXkb) ||
(!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) {
@@ -209,15 +165,7 @@ XkbForceBell(dpy,percent)
}
Bool
-#if NeedFunctionPrototypes
XkbBellEvent(Display *dpy,Window window,int percent,Atom name)
-#else
-XkbBellEvent(dpy,window,percent,name)
- Display *dpy;
- Window window;
- int percent;
- Atom name;
-#endif
{
if ((dpy->flags & XlibDisplayNoXkb) ||
(!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) {
diff --git a/src/xkb/XKBBind.c b/src/xkb/XKBBind.c
index 138331d..7ab1f2d 100644
--- a/src/xkb/XKBBind.c
+++ b/src/xkb/XKBBind.c
@@ -26,11 +26,12 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/lib/X11/XKBBind.c,v 3.15 2003/02/15 17:49:01 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBBind.c,v 3.20 2003/11/17 22:20:09 dawes Exp $ */
/* the new monsters ate the old ones */
#define NEED_EVENTS
+#include "XKBlib.h"
#include <X11/Xlibint.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
@@ -49,9 +50,7 @@ from The Open Group.
Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)
static int _XkbLoadDpy(
-#if NeedFunctionPrototypes
Display *dpy
-#endif
);
struct _XKeytrans {
@@ -65,7 +64,6 @@ struct _XKeytrans {
};
KeySym
-#if NeedFunctionPrototypes
XkbKeycodeToKeysym(Display *dpy,
#if NeedWidePrototypes
unsigned int kc,
@@ -74,13 +72,6 @@ XkbKeycodeToKeysym(Display *dpy,
#endif
int group,
int level)
-#else
-XkbKeycodeToKeysym(dpy, kc, group, level)
- Display *dpy;
- KeyCode kc;
- int group;
- int level;
-#endif
{
XkbDescRec *xkb;
@@ -109,7 +100,6 @@ XkbKeycodeToKeysym(dpy, kc, group, level)
}
KeySym
-#if NeedFunctionPrototypes
XKeycodeToKeysym(Display *dpy,
#if NeedWidePrototypes
unsigned int kc,
@@ -117,12 +107,6 @@ XKeycodeToKeysym(Display *dpy,
KeyCode kc,
#endif
int col)
-#else
-XKeycodeToKeysym(dpy, kc, col)
- Display *dpy;
- KeyCode kc;
- int col;
-#endif
{
XkbDescRec *xkb;
@@ -167,13 +151,7 @@ XKeycodeToKeysym(dpy, kc, col)
}
KeyCode
-#if NeedFunctionPrototypes
XKeysymToKeycode(Display *dpy, KeySym ks)
-#else
-XKeysymToKeycode(dpy, ks)
- Display *dpy;
- KeySym ks;
-#endif
{
register int i, j, gotOne;
@@ -198,12 +176,7 @@ XKeysymToKeycode(dpy, ks)
}
static int
-#if NeedFunctionPrototypes
_XkbComputeModmap(Display *dpy)
-#else
-_XkbComputeModmap(dpy)
- Display *dpy;
-#endif
{
register XkbDescPtr xkb;
@@ -214,13 +187,7 @@ register XkbDescPtr xkb;
}
unsigned
-#if NeedFunctionPrototypes
XkbKeysymToModifiers(Display *dpy,KeySym ks)
-#else
-XkbKeysymToModifiers(dpy,ks)
- Display *dpy;
- KeySym ks;
-#endif
{
XkbDescRec *xkb;
register int i,j;
@@ -249,13 +216,7 @@ XkbKeysymToModifiers(dpy,ks)
}
KeySym
-#if NeedFunctionPrototypes
XLookupKeysym(register XKeyEvent *event, int col)
-#else
-XLookupKeysym(event, col)
- register XKeyEvent *event;
- int col;
-#endif
{
Display *dpy = event->display;
if (_XkbUnavailable(dpy))
@@ -270,39 +231,27 @@ XLookupKeysym(event, col)
* version will continue to work in a shared library environment.
*/
int
-#if NeedFunctionPrototypes
+XkbTranslateKey( register Display * dpy,
+ KeyCode key,
+ register unsigned int mods,
+ unsigned int * mods_rtrn,
+ KeySym * keysym_rtrn);
+int
XkbTranslateKey( register Display * dpy,
KeyCode key,
register unsigned int mods,
unsigned int * mods_rtrn,
KeySym * keysym_rtrn)
-#else
-XkbTranslateKey(dpy, key, mods, mods_rtrn, keysym_rtrn)
- register Display *dpy;
- KeyCode key;
- register unsigned int mods;
- unsigned int *mods_rtrn;
- KeySym *keysym_rtrn;
-#endif
{
return XkbLookupKeySym(dpy,key,mods,mods_rtrn,keysym_rtrn);
}
Bool
-#if NeedFunctionPrototypes
XkbLookupKeySym( register Display * dpy,
KeyCode key,
register unsigned int mods,
unsigned int * mods_rtrn,
KeySym * keysym_rtrn)
-#else
-XkbLookupKeySym(dpy, key, mods, mods_rtrn, keysym_rtrn)
- register Display *dpy;
- KeyCode key;
- register unsigned int mods;
- unsigned int *mods_rtrn;
- KeySym *keysym_rtrn;
-#endif
{
if (_XkbUnavailable(dpy))
return _XTranslateKey(dpy, key, mods, mods_rtrn, keysym_rtrn);
@@ -312,20 +261,11 @@ XkbLookupKeySym(dpy, key, mods, mods_rtrn, keysym_rtrn)
}
Bool
-#if NeedFunctionPrototypes
XkbTranslateKeyCode( register XkbDescPtr xkb,
KeyCode key,
register unsigned int mods,
unsigned int * mods_rtrn,
KeySym * keysym_rtrn)
-#else
-XkbTranslateKeyCode(xkb, key, mods, mods_rtrn, keysym_rtrn)
- register XkbDescPtr xkb;
- KeyCode key;
- register unsigned int mods;
- unsigned int *mods_rtrn;
- KeySym *keysym_rtrn;
-#endif
{
XkbKeyTypeRec *type;
int col,nKeyGroups;
@@ -400,12 +340,7 @@ XkbTranslateKeyCode(xkb, key, mods, mods_rtrn, keysym_rtrn)
}
Status
-#if NeedFunctionPrototypes
XkbRefreshKeyboardMapping(register XkbMapNotifyEvent *event)
-#else
-XkbRefreshKeyboardMapping(event)
- register XkbMapNotifyEvent *event;
-#endif
{
Display *dpy = event->display;
XkbInfoPtr xkbi;
@@ -448,12 +383,7 @@ XkbRefreshKeyboardMapping(event)
}
int
-#if NeedFunctionPrototypes
XRefreshKeyboardMapping(register XMappingEvent *event)
-#else
-XRefreshKeyboardMapping(event)
- register XMappingEvent *event;
-#endif
{
XkbEvent *xkbevent = (XkbEvent *)event;
Display *dpy = event->display;
@@ -537,6 +467,7 @@ XRefreshKeyboardMapping(event)
UnlockDisplay(dpy);
}
if (event->request==MappingModifier) {
+ LockDisplay(dpy);
if (xkbi->desc->map->modmap) {
_XkbFree(xkbi->desc->map->modmap);
xkbi->desc->map->modmap= NULL;
@@ -561,12 +492,7 @@ XRefreshKeyboardMapping(event)
}
static int
-#if NeedFunctionPrototypes
_XkbLoadDpy(Display *dpy)
-#else
-_XkbLoadDpy(dpy)
- Display *dpy;
-#endif
{
XkbInfoPtr xkbi;
unsigned query,oldEvents;
@@ -603,12 +529,7 @@ _XkbLoadDpy(dpy)
}
void
-#if NeedFunctionPrototypes
_XkbReloadDpy(Display *dpy)
-#else
-_XkbReloadDpy(dpy)
- Display *dpy;
-#endif
{
XkbInfoPtr xkbi;
XkbDescRec *desc;
@@ -651,22 +572,12 @@ _XkbReloadDpy(dpy)
}
int
-#if NeedFunctionPrototypes
XkbTranslateKeySym( register Display * dpy,
register KeySym * sym_rtrn,
unsigned int mods,
char * buffer,
int nbytes,
int * extra_rtrn)
-#else
-XkbTranslateKeySym(dpy, sym_rtrn, mods, buffer, nbytes, extra_rtrn)
- register Display *dpy;
- register KeySym *sym_rtrn;
- unsigned int mods;
- char *buffer;
- int nbytes;
- int *extra_rtrn;
-#endif
{
register XkbInfoPtr xkb;
XkbKSToMBFunc cvtr;
@@ -740,34 +651,54 @@ XkbTranslateKeySym(dpy, sym_rtrn, mods, buffer, nbytes, extra_rtrn)
}
int
-#if NeedFunctionPrototypes
XLookupString ( register XKeyEvent * event,
char * buffer,
int nbytes,
KeySym * keysym,
XComposeStatus * status)
-#else
-XLookupString (event, buffer, nbytes, keysym, status)
- register XKeyEvent *event;
- char *buffer; /* buffer */
- int nbytes; /* space in buffer for characters */
- KeySym *keysym;
- XComposeStatus *status;
-#endif
{
KeySym dummy;
int rtrnLen;
unsigned int new_mods;
Display *dpy = event->display;
- XkbDescPtr xkb;
if (keysym==NULL)
keysym= &dummy;
- xkb= dpy->xkb_info->desc;
if (!XkbLookupKeySym(dpy,event->keycode,event->state, &new_mods,keysym))
return 0;
new_mods= (event->state&(~new_mods));
+ /* find the group where a symbol can be converted to control one */
+ if (new_mods&ControlMask && *keysym > 0x7F &&
+ (dpy->xkb_info->xlib_ctrls & XkbLC_ControlFallback)) {
+ XKeyEvent tmp_ev = *event;
+ KeySym tmp_keysym;
+ unsigned int tmp_new_mods;
+ if (_XkbUnavailable(dpy)) {
+ tmp_ev.state= event->state ^ dpy->mode_switch;
+ if (XkbLookupKeySym(dpy, tmp_ev.keycode, tmp_ev.state,
+ &tmp_new_mods, &tmp_keysym) &&
+ tmp_keysym != NoSymbol && tmp_keysym < 0x80 ) {
+ *keysym = tmp_keysym;
+ }
+ } else {
+ int n = XkbKeyNumGroups(dpy->xkb_info->desc, tmp_ev.keycode);
+ int i;
+ for (i = 0; i < n; i++) {
+ if (XkbGroupForCoreState(event->state) == i)
+ continue;
+ tmp_ev.state= XkbBuildCoreState(tmp_ev.state, i);
+ if (XkbLookupKeySym(dpy, tmp_ev.keycode, tmp_ev.state,
+ &tmp_new_mods, &tmp_keysym) &&
+ tmp_keysym != NoSymbol && tmp_keysym < 0x80 ) {
+ *keysym = tmp_keysym;
+ new_mods= (event->state&(~tmp_new_mods));
+ break;
+ }
+ }
+ }
+ }
+
#ifdef USE_OWN_COMPOSE
if ( status ) {
static int been_here= 0;
@@ -873,47 +804,17 @@ XLookupString (event, buffer, nbytes, keysym, status)
if (rtrnLen>0)
return rtrnLen;
- rtrnLen = XkbTranslateKeySym(dpy,keysym,new_mods,buffer,nbytes,NULL);
-
- if ((event->state&ControlMask)&&(nbytes>0)&&
- ((rtrnLen==0)||
- ((rtrnLen==1)&&((unsigned char) buffer[0]>=' ')))&&
- (dpy->xkb_info->xlib_ctrls&XkbLC_ControlFallback)) {
- XKeyEvent tmp_ev;
- tmp_ev= *event;
- if (_XkbUnavailable(dpy)) {
- if (event->state & dpy->mode_switch) {
- tmp_ev.state= event->state & ~dpy->mode_switch;
- return XLookupString (&tmp_ev, buffer, nbytes, keysym, status);
- }
- } else {
- if (XkbGroupForCoreState(event->state) != XkbGroup1Index) {
- tmp_ev.state= XkbBuildCoreState(event->state,XkbGroup1Index);
- return XLookupString (&tmp_ev, buffer, nbytes, keysym, status);
- }
- }
- }
- return rtrnLen;
+ return XkbTranslateKeySym(dpy,keysym,new_mods,buffer,nbytes,NULL);
}
int
-#if NeedFunctionPrototypes
XkbLookupKeyBinding( Display * dpy,
register KeySym sym,
unsigned int mods,
char * buffer,
int nbytes,
int * extra_rtrn)
-#else
-XkbLookupKeyBinding(dpy, sym, mods, buffer, nbytes, extra_rtrn)
- Display *dpy;
- register KeySym sym;
- unsigned int mods;
- char *buffer;
- int nbytes;
- int * extra_rtrn;
-#endif
{
register struct _XKeytrans *p;
@@ -936,12 +837,7 @@ XkbLookupKeyBinding(dpy, sym, mods, buffer, nbytes, extra_rtrn)
}
char
-#if NeedFunctionPrototypes
XkbToControl( char ch )
-#else
-XkbToControl( ch )
- char ch;
-#endif
{
register char c = ch;
diff --git a/src/xkb/XKBCompat.c b/src/xkb/XKBCompat.c
index 73c7d76..9a0b8ec 100644
--- a/src/xkb/XKBCompat.c
+++ b/src/xkb/XKBCompat.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/lib/X11/XKBCompat.c,v 3.2 2003/11/17 22:20:09 dawes Exp $ */
#include <stdio.h>
#define NEED_REPLIES
@@ -34,18 +35,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XKBlibint.h"
Status
-#if NeedFunctionPrototypes
_XkbReadGetCompatMapReply( Display * dpy,
xkbGetCompatMapReply * rep,
XkbDescPtr xkb,
int * nread_rtrn)
-#else
-_XkbReadGetCompatMapReply(dpy,rep,xkb,nread_rtrn)
- Display * dpy;
- xkbGetCompatMapReply * rep;
- XkbDescPtr xkb;
- int * nread_rtrn;
-#endif
{
register int i;
XkbReadBufferRec buf;
@@ -114,14 +107,7 @@ BAILOUT:
}
Status
-#if NeedFunctionPrototypes
XkbGetCompatMap(Display *dpy,unsigned which,XkbDescPtr xkb)
-#else
-XkbGetCompatMap(dpy,which,xkb)
- Display * dpy;
- unsigned which;
- XkbDescPtr xkb;
-#endif
{
register xkbGetCompatMapReq *req;
xkbGetCompatMapReply rep;
@@ -164,14 +150,7 @@ XkbGetCompatMap(dpy,which,xkb)
}
static Bool
-#if NeedFunctionPrototypes
_XkbWriteSetCompatMap(Display *dpy,xkbSetCompatMapReq *req,XkbDescPtr xkb)
-#else
-_XkbWriteSetCompatMap(dpy,req,xkb)
- Display * dpy;
- xkbSetCompatMapReq *req;
- XkbDescPtr xkb;
-#endif
{
CARD16 firstSI;
CARD16 nSI;
@@ -229,15 +208,7 @@ char * buf;
}
Bool
-#if NeedFunctionPrototypes
XkbSetCompatMap(Display *dpy,unsigned which,XkbDescPtr xkb,Bool updateActions)
-#else
-XkbSetCompatMap(dpy,which,xkb,updateActions)
- Display * dpy;
- unsigned which;
- XkbDescPtr xkb;
- Bool updateActions;
-#endif
{
register xkbSetCompatMapReq *req;
Status ok;
diff --git a/src/xkb/XKBCtrls.c b/src/xkb/XKBCtrls.c
index de5ce36..485adc3 100644
--- a/src/xkb/XKBCtrls.c
+++ b/src/xkb/XKBCtrls.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBCtrls.c,v 1.4 2002/12/10 04:33:48 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBCtrls.c,v 1.5 2003/11/17 22:20:09 dawes Exp $ */
#include <stdio.h>
#define NEED_REPLIES
@@ -35,14 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
static xkbSetControlsReq *
-#if NeedFunctionPrototypes
_XkbGetSetControlsReq(Display *dpy,XkbInfoPtr xkbi,unsigned int deviceSpec)
-#else
-_XkbGetSetControlsReq(dpy,xkbi,deviceSpec)
- Display * dpy;
- XkbInfoPtr xkbi;
- unsigned int deviceSpec;
-#endif
{
xkbSetControlsReq *req;
@@ -56,18 +49,10 @@ xkbSetControlsReq *req;
}
Bool
-#if NeedFunctionPrototypes
XkbSetAutoRepeatRate( Display *dpy,
unsigned int deviceSpec,
unsigned int timeout,
unsigned int interval)
-#else
-XkbSetAutoRepeatRate(dpy, deviceSpec, timeout, interval)
- Display *dpy;
- unsigned int deviceSpec;
- unsigned int timeout;
- unsigned int interval;
-#endif
{
register xkbSetControlsReq *req;
@@ -85,18 +70,10 @@ XkbSetAutoRepeatRate(dpy, deviceSpec, timeout, interval)
}
Bool
-#if NeedFunctionPrototypes
XkbGetAutoRepeatRate( Display * dpy,
unsigned int deviceSpec,
unsigned int * timeoutp,
unsigned int * intervalp)
-#else
-XkbGetAutoRepeatRate(dpy, deviceSpec, timeoutp, intervalp)
- Display *dpy;
- unsigned int deviceSpec;
- unsigned int *timeoutp;
- unsigned int *intervalp;
-#endif
{
register xkbGetControlsReq *req;
xkbGetControlsReply rep;
@@ -125,23 +102,12 @@ XkbGetAutoRepeatRate(dpy, deviceSpec, timeoutp, intervalp)
}
Bool
-#if NeedFunctionPrototypes
XkbSetServerInternalMods( Display * dpy,
unsigned deviceSpec,
unsigned affectReal,
unsigned realValues,
unsigned affectVirtual,
unsigned virtualValues)
-#else
-XkbSetServerInternalMods(dpy,deviceSpec,
- affectReal,realValues,affectVirtual,virtualValues)
- Display *dpy;
- unsigned deviceSpec;
- unsigned affectReal;
- unsigned realValues;
- unsigned affectVirtual;
- unsigned virtualValues;
-#endif
{
register xkbSetControlsReq *req;
@@ -161,23 +127,12 @@ XkbSetServerInternalMods(dpy,deviceSpec,
}
Bool
-#if NeedFunctionPrototypes
XkbSetIgnoreLockMods( Display * dpy,
unsigned int deviceSpec,
unsigned affectReal,
unsigned realValues,
unsigned affectVirtual,
unsigned virtualValues)
-#else
-XkbSetIgnoreLockMods(dpy,deviceSpec,
- affectReal,realValues,affectVirtual,virtualValues)
- Display *dpy;
- unsigned int deviceSpec;
- unsigned affectReal;
- unsigned realValues;
- unsigned affectVirtual;
- unsigned virtualValues;
-#endif
{
register xkbSetControlsReq *req;
@@ -197,18 +152,10 @@ XkbSetIgnoreLockMods(dpy,deviceSpec,
}
Bool
-#if NeedFunctionPrototypes
XkbChangeEnabledControls( Display * dpy,
unsigned deviceSpec,
unsigned affect,
unsigned values)
-#else
-XkbChangeEnabledControls(dpy,deviceSpec,affect,values)
- Display * dpy;
- unsigned deviceSpec;
- unsigned affect;
- unsigned values;
-#endif
{
register xkbSetControlsReq *req;
@@ -226,14 +173,7 @@ XkbChangeEnabledControls(dpy,deviceSpec,affect,values)
}
Status
-#if NeedFunctionPrototypes
XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb)
-#else
-XkbGetControls(dpy, which, xkb)
- Display *dpy;
- unsigned long which;
- XkbDescPtr xkb;
-#endif
{
register xkbGetControlsReq *req;
xkbGetControlsReply rep;
@@ -329,14 +269,7 @@ XkbGetControls(dpy, which, xkb)
}
Bool
-#if NeedFunctionPrototypes
XkbSetControls(Display *dpy, unsigned long which, XkbDescPtr xkb)
-#else
-XkbSetControls(dpy, which, xkb)
- Display * dpy;
- unsigned long which;
- XkbDescPtr xkb;
-#endif
{
register xkbSetControlsReq *req;
XkbControlsPtr ctrls;
@@ -408,16 +341,9 @@ XkbSetControls(dpy, which, xkb)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbNoteControlsChanges( XkbControlsChangesPtr old,
XkbControlsNotifyEvent * new,
unsigned int wanted)
-#else
-XkbNoteControlsChanges(old,new,wanted)
- XkbControlsChangesPtr old;
- XkbControlsNotifyEvent * new;
- unsigned int wanted;
-#endif
{
old->changed_ctrls|= (new->changed_ctrls&wanted);
if (new->changed_ctrls&XkbControlsEnabledMask&wanted)
diff --git a/src/xkb/XKBCvt.c b/src/xkb/XKBCvt.c
index c1a64dc..aa2af39 100644
--- a/src/xkb/XKBCvt.c
+++ b/src/xkb/XKBCvt.c
@@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.34 2002/10/08 23:31:35 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBCvt.c,v 3.35 2003/11/17 22:20:09 dawes Exp $ */
#include <stdio.h>
#include <sys/types.h>
@@ -55,15 +55,7 @@ from The Open Group.
#endif
static int
-#if NeedFunctionPrototypes
_XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn)
-#else
-_XkbHandleSpecialSym(keysym, buffer, nbytes, extra_rtrn)
- KeySym keysym;
- char *buffer;
- int nbytes;
- int * extra_rtrn;
-#endif
{
/* try to convert to Latin-1, handling ctrl */
@@ -92,20 +84,11 @@ _XkbHandleSpecialSym(keysym, buffer, nbytes, extra_rtrn)
/*ARGSUSED*/
static int
-#if NeedFunctionPrototypes
_XkbKSToKnownSet ( XPointer priv,
KeySym keysym,
char * buffer,
int nbytes,
int * extra_rtrn)
-#else
-_XkbKSToKnownSet (priv, keysym, buffer, nbytes, extra_rtrn)
- XPointer priv;
- KeySym keysym;
- char *buffer;
- int nbytes;
- int *extra_rtrn;
-#endif
{
char tbuf[8],*buf;
@@ -152,15 +135,7 @@ typedef struct _XkbToKS {
/*ARGSUSED*/
static KeySym
-#if NeedFunctionPrototypes
_XkbKnownSetToKS(XPointer priv,char *buffer,int nbytes,Status *status)
-#else
-_XkbKnownSetToKS(priv,buffer,nbytes,status)
- XPointer priv;
- char *buffer;
- int nbytes;
- Status *status;
-#endif
{
if (nbytes!=1)
return NoSymbol;
@@ -178,12 +153,7 @@ _XkbKnownSetToKS(priv,buffer,nbytes,status)
}
static KeySym
-#if NeedFunctionPrototypes
__XkbDefaultToUpper(KeySym sym)
-#else
-__XkbDefaultToUpper(sym)
- KeySym sym;
-#endif
{
KeySym lower,upper;
@@ -193,12 +163,7 @@ __XkbDefaultToUpper(sym)
#ifdef XKB_EXTEND_LOOKUP_STRING
static int
-#if NeedFunctionPrototypes
Strcmp(char *str1, char *str2)
-#else
-Strcmp(str1, str2)
- char *str1, *str2;
-#endif
{
char str[256];
char c, *s;
@@ -221,13 +186,7 @@ Strcmp(str1, str2)
#endif
int
-#if NeedFunctionPrototypes
_XkbGetConverters(char *encoding_name, XkbConverters *cvt_rtrn)
-#else
-_XkbGetConverters(encoding_name, cvt_rtrn)
- char *encoding_name;
- XkbConverters *cvt_rtrn;
-#endif
{
if ( !cvt_rtrn ) return 0;
diff --git a/src/xkb/XKBExtDev.c b/src/xkb/XKBExtDev.c
index b208199..9562c50 100644
--- a/src/xkb/XKBExtDev.c
+++ b/src/xkb/XKBExtDev.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBExtDev.c,v 3.4 2001/10/28 03:32:33 tsi Exp $ */
+/* $XFree86: xc/lib/X11/XKBExtDev.c,v 3.5 2003/11/17 22:20:09 dawes Exp $ */
#include <stdio.h>
#define NEED_REPLIES
@@ -38,16 +38,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
extern void
-#if NeedFunctionPrototypes
XkbNoteDeviceChanges( XkbDeviceChangesPtr old,
XkbExtensionDeviceNotifyEvent * new,
unsigned int wanted)
-#else
-XkbNoteDeviceChanges(old,new,wanted)
- XkbDeviceChangesPtr old;
- XkbExtensionDeviceNotifyEvent * new;
- unsigned int wanted;
-#endif
{
if ((!old)||(!new)||(!wanted)||((new->reason&wanted)==0))
return;
@@ -114,16 +107,9 @@ XkbNoteDeviceChanges(old,new,wanted)
/***====================================================================***/
static Status
-#if NeedFunctionPrototypes
_XkbReadDeviceLedInfo( XkbReadBufferPtr buf,
unsigned present,
XkbDeviceInfoPtr devi)
-#else
-_XkbReadDeviceLedInfo(buf,present,devi)
- XkbReadBufferPtr buf;
- unsigned present;
- XkbDeviceInfoPtr devi;
-#endif
{
register unsigned i,bit;
XkbDeviceLedInfoPtr devli;
@@ -179,16 +165,9 @@ xkbDeviceLedsWireDesc * wireli;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadGetDeviceInfoReply( Display * dpy,
xkbGetDeviceInfoReply * rep,
XkbDeviceInfoPtr devi)
-#else
-_XkbReadGetDeviceInfoReply(dpy,rep,devi)
- Display * dpy;
- xkbGetDeviceInfoReply * rep;
- XkbDeviceInfoPtr devi;
-#endif
{
XkbReadBufferRec buf;
XkbAction * act;
@@ -236,20 +215,11 @@ BAILOUT:
}
XkbDeviceInfoPtr
-#if NeedFunctionPrototypes
XkbGetDeviceInfo( Display * dpy,
unsigned which,
unsigned deviceSpec,
unsigned class,
unsigned id)
-#else
-XkbGetDeviceInfo(dpy,which,deviceSpec,class,id)
- Display * dpy;
- unsigned which;
- unsigned deviceSpec;
- unsigned class;
- unsigned id;
-#endif
{
register xkbGetDeviceInfoReq * req;
xkbGetDeviceInfoReply rep;
@@ -294,16 +264,9 @@ XkbGetDeviceInfo(dpy,which,deviceSpec,class,id)
}
Status
-#if NeedFunctionPrototypes
XkbGetDeviceInfoChanges( Display * dpy,
XkbDeviceInfoPtr devi,
XkbDeviceChangesPtr changes)
-#else
-XkbGetDeviceInfoChanges(dpy,devi,changes)
- Display * dpy;
- XkbDeviceInfoPtr devi;
- XkbDeviceChangesPtr changes;
-#endif
{
register xkbGetDeviceInfoReq * req;
xkbGetDeviceInfoReply rep;
@@ -361,20 +324,11 @@ XkbGetDeviceInfoChanges(dpy,devi,changes)
}
Status
-#if NeedFunctionPrototypes
XkbGetDeviceButtonActions( Display * dpy,
XkbDeviceInfoPtr devi,
Bool all,
unsigned int first,
unsigned int num)
-#else
-XkbGetDeviceButtonActions(dpy,devi,all,first,num)
- Display * dpy;
- XkbDeviceInfoPtr devi;
- Bool all;
- unsigned int first;
- unsigned int num;
-#endif
{
register xkbGetDeviceInfoReq * req;
xkbGetDeviceInfoReply rep;
@@ -411,20 +365,11 @@ XkbGetDeviceButtonActions(dpy,devi,all,first,num)
}
Status
-#if NeedFunctionPrototypes
XkbGetDeviceLedInfo( Display * dpy,
XkbDeviceInfoPtr devi,
unsigned int ledClass,
unsigned int ledId,
unsigned int which)
-#else
-XkbGetDeviceLedInfo(dpy,devi,ledClass,ledId,which)
- Display * dpy;
- XkbDeviceInfoPtr devi;
- unsigned int ledClass;
- unsigned int ledId;
- unsigned int which;
-#endif
{
register xkbGetDeviceInfoReq * req;
xkbGetDeviceInfoReply rep;
@@ -478,14 +423,7 @@ typedef struct _SetLedStuff {
} SetLedStuff;
static void
-#if NeedFunctionPrototypes
_InitLedStuff(SetLedStuff *stuff,unsigned wanted,XkbDeviceInfoPtr devi)
-#else
-_InitLedStuff(stuff,wanted,devi)
- SetLedStuff * stuff;
- unsigned wanted;
- XkbDeviceInfoPtr devi;
-#endif
{
int i;
register XkbDeviceLedInfoPtr devli;
@@ -517,12 +455,7 @@ register XkbDeviceLedInfoPtr devli;
}
static void
-#if NeedFunctionPrototypes
_FreeLedStuff(SetLedStuff *stuff)
-#else
-_FreeLedStuff(stuff)
- SetLedStuff *stuff;
-#endif
{
if ((stuff->num_info>0)&&(stuff->info!=NULL))
_XkbFree(stuff->info);
@@ -531,13 +464,7 @@ _FreeLedStuff(stuff)
}
static int
-#if NeedFunctionPrototypes
_XkbSizeLedInfo(unsigned changed,XkbDeviceLedInfoPtr devli)
-#else
-_XkbSizeLedInfo(changed,devli)
- unsigned changed;
- XkbDeviceLedInfoPtr devli;
-#endif
{
register int i,size;
register unsigned bit,namesNeeded,mapsNeeded;
@@ -560,18 +487,10 @@ register unsigned bit,namesNeeded,mapsNeeded;
}
static Bool
-#if NeedFunctionPrototypes
_SizeMatches( SetLedStuff * stuff,
XkbDeviceLedChangesPtr changes,
int * sz_rtrn,
int * nleds_rtrn)
-#else
-_SizeMatches(stuff,changes,sz_rtrn,nleds_rtrn)
- SetLedStuff * stuff;
- XkbDeviceLedChangesPtr changes;
- int * sz_rtrn;
- int * nleds_rtrn;
-#endif
{
int i,nMatch,class,id;
LedInfoStuff * linfo;
@@ -613,20 +532,11 @@ Bool match;
static Status
-#if NeedFunctionPrototypes
_XkbSetDeviceInfoSize( XkbDeviceInfoPtr devi,
XkbDeviceChangesPtr changes,
SetLedStuff * stuff,
int * sz_rtrn,
int * num_leds_rtrn)
-#else
-_XkbSetDeviceInfoSize(devi,changes,stuff,sz_rtrn,num_leds_rtrn)
- XkbDeviceInfoPtr devi;
- XkbDeviceChangesPtr changes;
- SetLedStuff * stuff;
- int * sz_rtrn;
- int * num_leds_rtrn;
-#endif
{
*sz_rtrn= 0;
if ((changes->changed&XkbXI_ButtonActionsMask)&&(changes->num_btns>0)) {
@@ -655,14 +565,7 @@ _XkbSetDeviceInfoSize(devi,changes,stuff,sz_rtrn,num_leds_rtrn)
}
static char *
-#if NeedFunctionPrototypes
_XkbWriteLedInfo(char *wire,unsigned changed,XkbDeviceLedInfoPtr devli)
-#else
-_XkbWriteLedInfo(wire,changed,devli)
- char * wire;
- unsigned changed;
- XkbDeviceLedInfoPtr devli;
-#endif
{
register int i;
register unsigned bit,namesNeeded,mapsNeeded;
@@ -719,18 +622,10 @@ xkbDeviceLedsWireDesc * lwire;
static int
-#if NeedFunctionPrototypes
_XkbWriteSetDeviceInfo( char * wire,
XkbDeviceChangesPtr changes,
SetLedStuff * stuff,
XkbDeviceInfoPtr devi)
-#else
-_XkbWriteSetDeviceInfo(wire,changes,stuff,devi)
- char * wire;
- XkbDeviceChangesPtr changes;
- SetLedStuff * stuff;
- XkbDeviceInfoPtr devi;
-#endif
{
char *start;
@@ -759,16 +654,9 @@ char *start;
}
Bool
-#if NeedFunctionPrototypes
XkbSetDeviceInfo( Display * dpy,
unsigned which,
XkbDeviceInfoPtr devi)
-#else
-XkbSetDeviceInfo(dpy,which,devi)
- Display * dpy;
- unsigned which;
- XkbDeviceInfoPtr devi;
-#endif
{
register xkbSetDeviceInfoReq *req;
Status ok = 0;
@@ -821,16 +709,9 @@ XkbSetDeviceInfo(dpy,which,devi)
}
Bool
-#if NeedFunctionPrototypes
XkbChangeDeviceInfo( Display * dpy,
XkbDeviceInfoPtr devi,
XkbDeviceChangesPtr changes)
-#else
-XkbChangeDeviceInfo(dpy,devi,changes)
- Display * dpy;
- XkbDeviceInfoPtr devi;
- XkbDeviceChangesPtr changes;
-#endif
{
register xkbSetDeviceInfoReq *req;
Status ok = 0;
@@ -876,37 +757,20 @@ XkbChangeDeviceInfo(dpy,devi,changes)
}
Bool
-#if NeedFunctionPrototypes
XkbSetDeviceLedInfo( Display * dpy,
XkbDeviceInfoPtr devi,
unsigned ledClass,
unsigned ledID,
unsigned which)
-#else
-XkbSetDeviceLedInfo(dpy,devi,ledClass,ledID,which)
- Display * dpy;
- XkbDeviceInfoPtr devi;
- unsigned ledClass;
- unsigned ledID;
- unsigned which;
-#endif
{
return False;
}
Bool
-#if NeedFunctionPrototypes
XkbSetDeviceButtonActions( Display * dpy,
XkbDeviceInfoPtr devi,
unsigned int first,
unsigned int nBtns)
-#else
-XkbSetDeviceButtonActions(dpy,devi,first,nBtns)
- Display * dpy;
- XkbDeviceInfoPtr devi;
- unsigned int first;
- unsigned int nBtns;
-#endif
{
register xkbSetDeviceInfoReq *req;
Status ok = 0;
diff --git a/src/xkb/XKBGAlloc.c b/src/xkb/XKBGAlloc.c
index 44a74c6..209631e 100644
--- a/src/xkb/XKBGAlloc.c
+++ b/src/xkb/XKBGAlloc.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBGAlloc.c,v 3.4 2001/01/17 19:41:48 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBGAlloc.c,v 3.5 2003/11/17 22:20:09 dawes Exp $ */
#define NEED_EVENTS
#define NEED_REPLIES
@@ -58,7 +58,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbFreeGeomLeafElems( Bool freeAll,
int first,
int count,
@@ -66,16 +65,6 @@ _XkbFreeGeomLeafElems( Bool freeAll,
unsigned short * sz_inout,
char ** elems,
unsigned int elem_sz)
-#else
-_XkbFreeGeomLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz)
- Bool freeAll;
- int first;
- int count;
- unsigned short * num_inout;
- unsigned short * sz_inout;
- char ** elems;
- unsigned int elem_sz;
-#endif
{
if ((freeAll)||(*elems==NULL)) {
*num_inout= *sz_inout= 0;
@@ -106,13 +95,10 @@ _XkbFreeGeomLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz)
}
typedef void (*ContentsClearFunc)(
-#if NeedFunctionPrototypes
char * /* priv */
-#endif
);
static void
-#if NeedFunctionPrototypes
_XkbFreeGeomNonLeafElems( Bool freeAll,
int first,
int count,
@@ -121,18 +107,6 @@ _XkbFreeGeomNonLeafElems( Bool freeAll,
char ** elems,
unsigned int elem_sz,
ContentsClearFunc freeFunc)
-#else
-_XkbFreeGeomNonLeafElems(freeAll,first,count,num_inout,sz_inout,elems,elem_sz,
- freeFunc)
- Bool freeAll;
- int first;
- int count;
- unsigned short * num_inout;
- unsigned short * sz_inout;
- char ** elems;
- unsigned int elem_sz;
- ContentsClearFunc freeFunc;
-#endif
{
register int i;
register char *ptr;
@@ -177,12 +151,7 @@ register char *ptr;
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearProperty(char *prop_in)
-#else
-_XkbClearProperty(prop_in)
- char * prop_in;
-#endif
{
XkbPropertyPtr prop= (XkbPropertyPtr)prop_in;
@@ -198,18 +167,10 @@ XkbPropertyPtr prop= (XkbPropertyPtr)prop_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomProperties( XkbGeometryPtr geom,
int first,
int count,
Bool freeAll)
-#else
-XkbFreeGeomProperties(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&geom->num_properties,&geom->sz_properties,
@@ -221,18 +182,10 @@ XkbFreeGeomProperties(geom,first,count,freeAll)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFreeGeomKeyAliases( XkbGeometryPtr geom,
int first,
int count,
Bool freeAll)
-#else
-XkbFreeGeomKeyAliases(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomLeafElems(freeAll,first,count,
&geom->num_key_aliases,&geom->sz_key_aliases,
@@ -244,12 +197,7 @@ XkbFreeGeomKeyAliases(geom,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearColor(char *color_in)
-#else
-_XkbClearColor(color_in)
- char * color_in;
-#endif
{
XkbColorPtr color= (XkbColorPtr)color_in;
@@ -259,15 +207,7 @@ XkbColorPtr color= (XkbColorPtr)color_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomColors(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomColors(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&geom->num_colors,&geom->sz_colors,
@@ -279,15 +219,7 @@ XkbFreeGeomColors(geom,first,count,freeAll)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFreeGeomPoints(XkbOutlinePtr outline,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomPoints(outline,first,count,freeAll)
- XkbOutlinePtr outline;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomLeafElems(freeAll,first,count,
&outline->num_points,&outline->sz_points,
@@ -299,12 +231,7 @@ XkbFreeGeomPoints(outline,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearOutline(char *outline_in)
-#else
-_XkbClearOutline(outline_in)
- char * outline_in;
-#endif
{
XkbOutlinePtr outline= (XkbOutlinePtr)outline_in;
@@ -314,15 +241,7 @@ XkbOutlinePtr outline= (XkbOutlinePtr)outline_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomOutlines(XkbShapePtr shape,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomOutlines(shape,first,count,freeAll)
- XkbShapePtr shape;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&shape->num_outlines,&shape->sz_outlines,
@@ -335,12 +254,7 @@ XkbFreeGeomOutlines(shape,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearShape(char *shape_in)
-#else
-_XkbClearShape(shape_in)
- char * shape_in;
-#endif
{
XkbShapePtr shape= (XkbShapePtr)shape_in;
@@ -350,15 +264,7 @@ XkbShapePtr shape= (XkbShapePtr)shape_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomShapes(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomShapes(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&geom->num_shapes,&geom->sz_shapes,
@@ -370,15 +276,7 @@ XkbFreeGeomShapes(geom,first,count,freeAll)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFreeGeomOverlayKeys(XkbOverlayRowPtr row,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomOverlayKeys(row,first,count,freeAll)
- XkbOverlayRowPtr row;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomLeafElems(freeAll,first,count,
&row->num_keys,&row->sz_keys,
@@ -390,12 +288,7 @@ XkbFreeGeomOverlayKeys(row,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearOverlayRow(char *row_in)
-#else
-_XkbClearOverlayRow(row_in)
- char * row_in;
-#endif
{
XkbOverlayRowPtr row= (XkbOverlayRowPtr)row_in;
@@ -405,15 +298,7 @@ XkbOverlayRowPtr row= (XkbOverlayRowPtr)row_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomOverlayRows(XkbOverlayPtr overlay,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomOverlayRows(overlay,first,count,freeAll)
- XkbOverlayPtr overlay;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&overlay->num_rows,&overlay->sz_rows,
@@ -425,12 +310,7 @@ XkbFreeGeomOverlayRows(overlay,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearOverlay(char *overlay_in)
-#else
-_XkbClearOverlay(overlay_in)
- char * overlay_in;
-#endif
{
XkbOverlayPtr overlay= (XkbOverlayPtr)overlay_in;
@@ -440,15 +320,7 @@ XkbOverlayPtr overlay= (XkbOverlayPtr)overlay_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomOverlays(XkbSectionPtr section,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomOverlays(section,first,count,freeAll)
- XkbSectionPtr section;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&section->num_overlays,&section->sz_overlays,
@@ -460,15 +332,7 @@ XkbFreeGeomOverlays(section,first,count,freeAll)
/***====================================================================***/
void
-#if NeedFunctionPrototypes
XkbFreeGeomKeys(XkbRowPtr row,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomKeys(row,first,count,freeAll)
- XkbRowPtr row;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomLeafElems(freeAll,first,count,
&row->num_keys,&row->sz_keys,
@@ -480,12 +344,7 @@ XkbFreeGeomKeys(row,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearRow(char *row_in)
-#else
-_XkbClearRow(row_in)
- char * row_in;
-#endif
{
XkbRowPtr row= (XkbRowPtr)row_in;
@@ -495,15 +354,7 @@ XkbRowPtr row= (XkbRowPtr)row_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomRows(XkbSectionPtr section,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomRows(section,first,count,freeAll)
- XkbSectionPtr section;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&section->num_rows,&section->sz_rows,
@@ -514,12 +365,7 @@ XkbFreeGeomRows(section,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearSection(char *section_in)
-#else
-_XkbClearSection(section_in)
- char * section_in;
-#endif
{
XkbSectionPtr section= (XkbSectionPtr)section_in;
@@ -533,15 +379,7 @@ XkbSectionPtr section= (XkbSectionPtr)section_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomSections(XkbGeometryPtr geom,int first,int count,Bool freeAll)
-#else
-XkbFreeGeomSections(geom,first,count,freeAll)
- XkbGeometryPtr geom;
- int first;
- int count;
- Bool freeAll;
-#endif
{
_XkbFreeGeomNonLeafElems(freeAll,first,count,
&geom->num_sections,&geom->sz_sections,
@@ -553,12 +391,7 @@ XkbFreeGeomSections(geom,first,count,freeAll)
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbClearDoodad(char *doodad_in)
-#else
-_XkbClearDoodad(doodad_in)
- char * doodad_in;
-#endif
{
XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
@@ -588,14 +421,7 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeomDoodads(XkbDoodadPtr doodads,int nDoodads,Bool freeAll)
-#else
-XkbFreeGeomDoodads(doodads,nDoodads,freeAll)
- XkbDoodadPtr doodads;
- int nDoodads;
- Bool freeAll;
-#endif
{
register int i;
register XkbDoodadPtr doodad;
@@ -611,14 +437,7 @@ register XkbDoodadPtr doodad;
}
void
-#if NeedFunctionPrototypes
XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap)
-#else
-XkbFreeGeometry(geom,which,freeMap)
- XkbGeometryPtr geom;
- unsigned which;
- Bool freeMap;
-#endif
{
if (geom==NULL)
return;
@@ -652,20 +471,11 @@ XkbFreeGeometry(geom,which,freeMap)
/***====================================================================***/
static Status
-#if NeedFunctionPrototypes
_XkbGeomAlloc( XPointer * old,
unsigned short * num,
unsigned short * total,
int num_new,
Size_t sz_elem)
-#else
-_XkbGeomAlloc(old,num,total,num_new,sz_elem)
- XPointer * old;
- unsigned short * num;
- unsigned short * total;
- int num_new;
- Size_t sz_elem;
-#endif
{
if (num_new<1)
return Success;
@@ -733,181 +543,91 @@ _XkbGeomAlloc(old,num,total,num_new,sz_elem)
(n),sizeof(XkbOverlayKeyRec))
Status
-#if NeedFunctionPrototypes
XkbAllocGeomProps(XkbGeometryPtr geom,int nProps)
-#else
-XkbAllocGeomProps(geom,nProps)
- XkbGeometryPtr geom;
- int nProps;
-#endif
{
return _XkbAllocProps(geom,nProps);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomColors(XkbGeometryPtr geom,int nColors)
-#else
-XkbAllocGeomColors(geom,nColors)
- XkbGeometryPtr geom;
- int nColors;
-#endif
{
return _XkbAllocColors(geom,nColors);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomKeyAliases(XkbGeometryPtr geom,int nKeyAliases)
-#else
-XkbAllocGeomKeyAliases(geom,nKeyAliases)
- XkbGeometryPtr geom;
- int nKeyAliases;
-#endif
{
return _XkbAllocKeyAliases(geom,nKeyAliases);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomShapes(XkbGeometryPtr geom,int nShapes)
-#else
-XkbAllocGeomShapes(geom,nShapes)
- XkbGeometryPtr geom;
- int nShapes;
-#endif
{
return _XkbAllocShapes(geom,nShapes);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomSections(XkbGeometryPtr geom,int nSections)
-#else
-XkbAllocGeomSections(geom,nSections)
- XkbGeometryPtr geom;
- int nSections;
-#endif
{
return _XkbAllocSections(geom,nSections);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomOverlays(XkbSectionPtr section,int nOverlays)
-#else
-XkbAllocGeomOverlays(section,nOverlays)
- XkbSectionPtr section;
- int nOverlays;
-#endif
{
return _XkbAllocOverlays(section,nOverlays);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomOverlayRows(XkbOverlayPtr overlay,int nRows)
-#else
-XkbAllocGeomOverlayRows(overlay,nRows)
- XkbOverlayPtr overlay;
- int nRows;
-#endif
{
return _XkbAllocOverlayRows(overlay,nRows);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomOverlayKeys(XkbOverlayRowPtr row,int nKeys)
-#else
-XkbAllocGeomOverlayKeys(row,nKeys)
- XkbOverlayRowPtr row;
- int nKeys;
-#endif
{
return _XkbAllocOverlayKeys(row,nKeys);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomDoodads(XkbGeometryPtr geom,int nDoodads)
-#else
-XkbAllocGeomDoodads(geom,nDoodads)
- XkbGeometryPtr geom;
- int nDoodads;
-#endif
{
return _XkbAllocDoodads(geom,nDoodads);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomSectionDoodads(XkbSectionPtr section,int nDoodads)
-#else
-XkbAllocGeomSectionDoodads(section,nDoodads)
- XkbSectionPtr section;
- int nDoodads;
-#endif
{
return _XkbAllocDoodads(section,nDoodads);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomOutlines(XkbShapePtr shape,int nOL)
-#else
-XkbAllocGeomOutlines(shape,nOL)
- XkbShapePtr shape;
- int nOL;
-#endif
{
return _XkbAllocOutlines(shape,nOL);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomRows(XkbSectionPtr section,int nRows)
-#else
-XkbAllocGeomRows(section,nRows)
- XkbSectionPtr section;
- int nRows;
-#endif
{
return _XkbAllocRows(section,nRows);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomPoints(XkbOutlinePtr ol,int nPts)
-#else
-XkbAllocGeomPoints(ol,nPts)
- XkbOutlinePtr ol;
- int nPts;
-#endif
{
return _XkbAllocPoints(ol,nPts);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeomKeys(XkbRowPtr row,int nKeys)
-#else
-XkbAllocGeomKeys(row,nKeys)
- XkbRowPtr row;
- int nKeys;
-#endif
{
return _XkbAllocKeys(row,nKeys);
}
Status
-#if NeedFunctionPrototypes
XkbAllocGeometry(XkbDescPtr xkb,XkbGeometrySizesPtr sizes)
-#else
-XkbAllocGeometry(xkb,sizes)
- XkbDescPtr xkb;
- XkbGeometrySizesPtr sizes;
-#endif
{
XkbGeometryPtr geom;
Status rtrn;
@@ -952,14 +672,7 @@ BAIL:
/***====================================================================***/
XkbPropertyPtr
-#if NeedFunctionPrototypes
XkbAddGeomProperty(XkbGeometryPtr geom,char *name,char *value)
-#else
-XkbAddGeomProperty(geom,name,value)
- XkbGeometryPtr geom;
- char * name;
- char * value;
-#endif
{
register int i;
register XkbPropertyPtr prop;
@@ -997,14 +710,7 @@ register XkbPropertyPtr prop;
}
XkbKeyAliasPtr
-#if NeedFunctionPrototypes
XkbAddGeomKeyAlias(XkbGeometryPtr geom,char *aliasStr,char *realStr)
-#else
-XkbAddGeomKeyAlias(geom,aliasStr,realStr)
- XkbGeometryPtr geom;
- char * aliasStr;
- char * realStr;
-#endif
{
register int i;
register XkbKeyAliasPtr alias;
@@ -1031,14 +737,7 @@ register XkbKeyAliasPtr alias;
}
XkbColorPtr
-#if NeedFunctionPrototypes
XkbAddGeomColor(XkbGeometryPtr geom,char *spec,unsigned int pixel)
-#else
-XkbAddGeomColor(geom,spec,pixel)
- XkbGeometryPtr geom;
- char * spec;
- unsigned int pixel;
-#endif
{
register int i;
register XkbColorPtr color;
@@ -1066,13 +765,7 @@ register XkbColorPtr color;
}
XkbOutlinePtr
-#if NeedFunctionPrototypes
XkbAddGeomOutline(XkbShapePtr shape,int sz_points)
-#else
-XkbAddGeomOutline(shape,sz_points)
- XkbShapePtr shape;
- int sz_points;
-#endif
{
XkbOutlinePtr outline;
@@ -1091,14 +784,7 @@ XkbOutlinePtr outline;
}
XkbShapePtr
-#if NeedFunctionPrototypes
XkbAddGeomShape(XkbGeometryPtr geom,Atom name,int sz_outlines)
-#else
-XkbAddGeomShape(geom,name,sz_outlines)
- XkbGeometryPtr geom;
- Atom name;
- int sz_outlines;
-#endif
{
XkbShapePtr shape;
register int i;
@@ -1125,12 +811,7 @@ register int i;
}
XkbKeyPtr
-#if NeedFunctionPrototypes
XkbAddGeomKey(XkbRowPtr row)
-#else
-XkbAddGeomKey(row)
- XkbRowPtr row;
-#endif
{
XkbKeyPtr key;
if (!row)
@@ -1143,13 +824,7 @@ XkbKeyPtr key;
}
XkbRowPtr
-#if NeedFunctionPrototypes
XkbAddGeomRow(XkbSectionPtr section,int sz_keys)
-#else
-XkbAddGeomRow(section,sz_keys)
- XkbSectionPtr section;
- int sz_keys;
-#endif
{
XkbRowPtr row;
@@ -1167,20 +842,11 @@ XkbRowPtr row;
}
XkbSectionPtr
-#if NeedFunctionPrototypes
XkbAddGeomSection( XkbGeometryPtr geom,
Atom name,
int sz_rows,
int sz_doodads,
int sz_over)
-#else
-XkbAddGeomSection(geom,name,sz_rows,sz_doodads,sz_over)
- XkbGeometryPtr geom;
- Atom name;
- int sz_rows;
- int sz_doodads;
- int sz_over;
-#endif
{
register int i;
XkbSectionPtr section;
@@ -1216,14 +882,7 @@ XkbSectionPtr section;
}
XkbDoodadPtr
-#if NeedFunctionPrototypes
XkbAddGeomDoodad(XkbGeometryPtr geom,XkbSectionPtr section,Atom name)
-#else
-XkbAddGeomDoodad(geom,section,name)
- XkbGeometryPtr geom;
- XkbSectionPtr section;
- Atom name;
-#endif
{
XkbDoodadPtr old,doodad;
register int i,nDoodads;
@@ -1261,18 +920,10 @@ register int i,nDoodads;
}
XkbOverlayKeyPtr
-#if NeedFunctionPrototypes
XkbAddGeomOverlayKey( XkbOverlayPtr overlay,
XkbOverlayRowPtr row,
char * over,
char * under)
-#else
-XkbAddGeomOverlayKey(overlay,row,over,under)
- XkbOverlayPtr overlay;
- XkbOverlayRowPtr row;
- char * over;
- char * under;
-#endif
{
register int i;
XkbOverlayKeyPtr key;
@@ -1304,14 +955,7 @@ Bool found;
}
XkbOverlayRowPtr
-#if NeedFunctionPrototypes
XkbAddGeomOverlayRow(XkbOverlayPtr overlay,int row_under,int sz_keys)
-#else
-XkbAddGeomOverlayRow(overlay,row_under,sz_keys)
- XkbOverlayPtr overlay;
- int row_under;
- int sz_keys;
-#endif
{
register int i;
XkbOverlayRowPtr row;
@@ -1343,14 +987,7 @@ XkbOverlayRowPtr row;
}
XkbOverlayPtr
-#if NeedFunctionPrototypes
XkbAddGeomOverlay(XkbSectionPtr section,Atom name,int sz_rows)
-#else
-XkbAddGeomOverlay(section,name,sz_rows)
- XkbSectionPtr section;
- Atom name;
- int sz_rows;
-#endif
{
register int i;
XkbOverlayPtr overlay;
diff --git a/src/xkb/XKBGeom.c b/src/xkb/XKBGeom.c
index 9afc0c0..65109d7 100644
--- a/src/xkb/XKBGeom.c
+++ b/src/xkb/XKBGeom.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBGeom.c,v 1.4 2001/10/28 03:32:33 tsi Exp $ */
+/* $XFree86: xc/lib/X11/XKBGeom.c,v 1.6 2003/11/17 22:20:09 dawes Exp $ */
#ifdef DEBUG
#include <stdio.h>
@@ -32,10 +32,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define NEED_EVENTS
#define NEED_REPLIES
+#define NEED_MAP_READERS
#include "Xlibint.h"
-#include "XKBlibint.h"
#include <X11/extensions/XKBgeom.h>
#include <X11/extensions/XKBproto.h>
+#include "XKBlibint.h"
#ifndef MINSHORT
#define MINSHORT -32768
@@ -47,13 +48,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_XkbCheckBounds(XkbBoundsPtr bounds,int x,int y)
-#else
-_XkbCheckBounds(bounds,x,y)
- XkbBoundsPtr bounds;
- int x,y;
-#endif
{
if (x<bounds->x1) bounds->x1= x;
if (x>bounds->x2) bounds->x2= x;
@@ -63,12 +58,7 @@ _XkbCheckBounds(bounds,x,y)
}
Bool
-#if NeedFunctionPrototypes
XkbComputeShapeBounds(XkbShapePtr shape)
-#else
-XkbComputeShapeBounds(shape)
- XkbShapePtr shape;
-#endif
{
register int o,p;
XkbOutlinePtr outline;
@@ -87,13 +77,7 @@ XkbPointPtr pt;
}
Bool
-#if NeedFunctionPrototypes
XkbComputeShapeTop(XkbShapePtr shape,XkbBoundsPtr bounds)
-#else
-XkbComputeShapeTop(shape,bounds)
- XkbShapePtr shape;
- XkbBoundsPtr bounds;
-#endif
{
register int p;
XkbOutlinePtr outline;
@@ -118,14 +102,7 @@ XkbPointPtr pt;
}
Bool
-#if NeedFunctionPrototypes
XkbComputeRowBounds(XkbGeometryPtr geom,XkbSectionPtr section,XkbRowPtr row)
-#else
-XkbComputeRowBounds(geom,section,row)
- XkbGeometryPtr geom;
- XkbSectionPtr section;
- XkbRowPtr row;
-#endif
{
register int k,pos;
XkbKeyPtr key;
@@ -162,13 +139,7 @@ XkbBoundsPtr bounds,sbounds;
}
Bool
-#if NeedFunctionPrototypes
XkbComputeSectionBounds(XkbGeometryPtr geom,XkbSectionPtr section)
-#else
-XkbComputeSectionBounds(geom,section)
- XkbGeometryPtr geom;
- XkbSectionPtr section;
-#endif
{
register int i;
XkbShapePtr shape;
@@ -224,14 +195,7 @@ XkbBoundsPtr bounds,rbounds=NULL;
/***====================================================================***/
char *
-#if NeedFunctionPrototypes
XkbFindOverlayForKey(XkbGeometryPtr geom,XkbSectionPtr wanted,char *under)
-#else
-XkbFindOverlayForKey(geom,wanted,under)
- XkbGeometryPtr geom;
- XkbSectionPtr wanted;
- char * under;
-#endif
{
int s;
XkbSectionPtr section;
@@ -271,16 +235,9 @@ XkbSectionPtr section;
/***====================================================================***/
static Status
-#if NeedFunctionPrototypes
_XkbReadGeomProperties( XkbReadBufferPtr buf,
XkbGeometryPtr geom,
xkbGetGeometryReply * rep)
-#else
-_XkbReadGeomProperties(buf,geom,rep)
- XkbReadBufferPtr buf;
- XkbGeometryPtr geom;
- xkbGetGeometryReply * rep;
-#endif
{
Status rtrn;
@@ -303,16 +260,9 @@ Status rtrn;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadGeomKeyAliases( XkbReadBufferPtr buf,
XkbGeometryPtr geom,
xkbGetGeometryReply * rep)
-#else
-_XkbReadGeomKeyAliases(buf,geom,rep)
- XkbReadBufferPtr buf;
- XkbGeometryPtr geom;
- xkbGetGeometryReply * rep;
-#endif
{
Status rtrn;
@@ -332,16 +282,9 @@ Status rtrn;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadGeomColors( XkbReadBufferPtr buf,
XkbGeometryPtr geom,
xkbGetGeometryReply * rep)
-#else
-_XkbReadGeomColors(buf,geom,rep)
- XkbReadBufferPtr buf;
- XkbGeometryPtr geom;
- xkbGetGeometryReply * rep;
-#endif
{
Status rtrn;
@@ -362,16 +305,9 @@ Status rtrn;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadGeomShapes( XkbReadBufferPtr buf,
XkbGeometryPtr geom,
xkbGetGeometryReply * rep)
-#else
-_XkbReadGeomShapes(buf,geom,rep)
- XkbReadBufferPtr buf;
- XkbGeometryPtr geom;
- xkbGetGeometryReply * rep;
-#endif
{
register int i;
Status rtrn;
@@ -427,16 +363,9 @@ Status rtrn;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadGeomDoodad( XkbReadBufferPtr buf,
XkbGeometryPtr geom,
XkbSectionPtr section)
-#else
-_XkbReadGeomDoodad(buf,geom,section)
- XkbReadBufferPtr buf;
- XkbGeometryPtr geom;
- XkbSectionPtr section;
-#endif
{
XkbDoodadPtr doodad;
xkbDoodadWireDesc * doodadWire;
@@ -486,16 +415,9 @@ xkbDoodadWireDesc * doodadWire;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadGeomOverlay( XkbReadBufferPtr buf,
XkbGeometryPtr geom,
XkbSectionPtr section)
-#else
-_XkbReadGeomOverlay(buf,geom,section)
- XkbReadBufferPtr buf;
- XkbGeometryPtr geom;
- XkbSectionPtr section;
-#endif
{
XkbOverlayPtr ol;
xkbOverlayWireDesc * olWire;
@@ -539,16 +461,9 @@ register int r;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadGeomSections( XkbReadBufferPtr buf,
XkbGeometryPtr geom,
xkbGetGeometryReply * rep)
-#else
-_XkbReadGeomSections(buf,geom,rep)
- XkbReadBufferPtr buf;
- XkbGeometryPtr geom;
- xkbGetGeometryReply * rep;
-#endif
{
register int s;
XkbSectionPtr section;
@@ -629,16 +544,9 @@ Status rtrn;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadGeomDoodads( XkbReadBufferPtr buf,
XkbGeometryPtr geom,
xkbGetGeometryReply * rep)
-#else
-_XkbReadGeomDoodads(buf,geom,rep)
- XkbReadBufferPtr buf;
- XkbGeometryPtr geom;
- xkbGetGeometryReply * rep;
-#endif
{
register int d;
Status rtrn;
@@ -655,18 +563,10 @@ Status rtrn;
}
Status
-#if NeedFunctionPrototypes
_XkbReadGetGeometryReply( Display * dpy,
xkbGetGeometryReply * rep,
XkbDescPtr xkb,
int * nread_rtrn)
-#else
-_XkbReadGetGeometryReply(dpy,rep,xkb,nread_rtrn)
- Display * dpy;
- xkbGetGeometryReply * rep;
- XkbDescPtr xkb;
- int * nread_rtrn;
-#endif
{
XkbGeometryPtr geom;
@@ -722,13 +622,7 @@ XkbGeometryPtr geom;
}
Status
-#if NeedFunctionPrototypes
XkbGetGeometry(Display *dpy,XkbDescPtr xkb)
-#else
-XkbGetGeometry(dpy,xkb)
- Display * dpy;
- XkbDescPtr xkb;
-#endif
{
xkbGetGeometryReq *req;
xkbGetGeometryReply rep;
@@ -750,14 +644,7 @@ xkbGetGeometryReply rep;
}
Status
-#if NeedFunctionPrototypes
XkbGetNamedGeometry(Display *dpy,XkbDescPtr xkb,Atom name)
-#else
-XkbGetNamedGeometry(dpy,xkb,name)
- Display * dpy;
- XkbDescPtr xkb;
- Atom name;
-#endif
{
xkbGetGeometryReq *req;
xkbGetGeometryReply rep;
diff --git a/src/xkb/XKBGetByName.c b/src/xkb/XKBGetByName.c
index 411be96..b5785b5 100644
--- a/src/xkb/XKBGetByName.c
+++ b/src/xkb/XKBGetByName.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/lib/X11/XKBGetByName.c,v 1.2 2003/11/17 22:20:09 dawes Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
@@ -35,22 +36,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
XkbDescPtr
-#if NeedFunctionPrototypes
XkbGetKeyboardByName( Display * dpy,
unsigned deviceSpec,
XkbComponentNamesPtr names,
unsigned want,
unsigned need,
Bool load)
-#else
-XkbGetKeyboardByName(dpy,deviceSpec,names,want,need,load)
- Display * dpy;
- unsigned deviceSpec;
- XkbComponentNamesPtr names;
- unsigned want;
- unsigned need;
- Bool load;
-#endif
{
register xkbGetKbdByNameReq * req;
xkbGetKbdByNameReply rep;
@@ -218,14 +209,7 @@ BAILOUT:
}
XkbDescPtr
-#if NeedFunctionPrototypes
XkbGetKeyboard(Display *dpy,unsigned which,unsigned deviceSpec)
-#else
-XkbGetKeyboard(dpy,which,deviceSpec)
- Display * dpy;
- unsigned which;
- unsigned deviceSpec;
-#endif
{
return XkbGetKeyboardByName(dpy,deviceSpec,NULL,which,which,False);
}
diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
index e0fe10e..4442fe6 100644
--- a/src/xkb/XKBGetMap.c
+++ b/src/xkb/XKBGetMap.c
@@ -25,7 +25,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.7 2003/02/04 03:49:33 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBGetMap.c,v 1.10 2003/11/17 22:20:09 dawes Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
@@ -35,14 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XKBlibint.h"
static Status
-#if NeedFunctionPrototypes
_XkbReadKeyTypes(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-_XkbReadKeyTypes(buf,xkb,rep)
- XkbReadBufferPtr buf;
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
int i,n,lastMapCount;
XkbKeyTypePtr type;
@@ -152,14 +145,7 @@ XkbKeyTypePtr type;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadKeySyms(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-_XkbReadKeySyms(buf,xkb,rep)
- XkbReadBufferPtr buf;
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
register int i;
XkbClientMapPtr map;
@@ -254,14 +240,7 @@ XkbClientMapPtr map;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadKeyActions(XkbReadBufferPtr buf,XkbDescPtr info,xkbGetMapReply *rep)
-#else
-_XkbReadKeyActions(buf,info,rep)
- XkbReadBufferPtr buf;
- XkbDescPtr info;
- xkbGetMapReply * rep;
-#endif
{
int i;
CARD8 numDescBuf[248];
@@ -313,14 +292,7 @@ done:
}
static Status
-#if NeedFunctionPrototypes
_XkbReadKeyBehaviors(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-_XkbReadKeyBehaviors(buf,xkb,rep)
- XkbReadBufferPtr buf;
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
register int i;
xkbBehaviorWireDesc *wire;
@@ -349,14 +321,7 @@ xkbBehaviorWireDesc *wire;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadVirtualMods(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-_XkbReadVirtualMods(buf,xkb,rep)
- XkbReadBufferPtr buf;
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
if ( rep->virtualMods ) {
register int i,bit,nVMods;
@@ -380,16 +345,9 @@ _XkbReadVirtualMods(buf,xkb,rep)
}
static Status
-#if NeedFunctionPrototypes
_XkbReadExplicitComponents( XkbReadBufferPtr buf,
XkbDescPtr xkb,
xkbGetMapReply * rep)
-#else
-_XkbReadExplicitComponents(buf,xkb,rep)
- XkbReadBufferPtr buf;
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
register int i;
unsigned char *wire;
@@ -417,14 +375,7 @@ unsigned char *wire;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadModifierMap(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-_XkbReadModifierMap(buf,xkb,rep)
- XkbReadBufferPtr buf;
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
register int i;
unsigned char *wire;
@@ -449,14 +400,7 @@ unsigned char *wire;
}
static Status
-#if NeedFunctionPrototypes
_XkbReadVirtualModMap(XkbReadBufferPtr buf,XkbDescPtr xkb,xkbGetMapReply *rep)
-#else
-_XkbReadVirtualModMap(buf,xkb,rep)
- XkbReadBufferPtr buf;
- XkbDescPtr xkb;
- xkbGetMapReply * rep;
-#endif
{
register int i;
xkbVModMapWireDesc * wire;
@@ -488,13 +432,7 @@ XkbServerMapPtr srv;
}
static xkbGetMapReq *
-#if NeedFunctionPrototypes
_XkbGetGetMapReq(Display *dpy,XkbDescPtr xkb)
-#else
-_XkbGetGetMapReq(dpy,xkb)
- Display * dpy;
- XkbDescPtr xkb;
-#endif
{
xkbGetMapReq *req;
@@ -515,18 +453,10 @@ xkbGetMapReq *req;
}
Status
-#if NeedFunctionPrototypes
_XkbReadGetMapReply( Display * dpy,
xkbGetMapReply *rep,
XkbDescPtr xkb,
int * nread_rtrn)
-#else
-_XkbReadGetMapReply(dpy,rep,xkb,nread_rtrn)
- Display * dpy;
- xkbGetMapReply * rep;
- XkbDescPtr xkb;
- int * nread_rtrn;
-#endif
{
int extraData;
unsigned mask;
@@ -581,13 +511,7 @@ unsigned mask;
}
static Status
-#if NeedFunctionPrototypes
_XkbHandleGetMapReply(Display *dpy,XkbDescPtr xkb)
-#else
-_XkbHandleGetMapReply(dpy,xkb)
- Display * dpy;
- XkbDescPtr xkb;
-#endif
{
xkbGetMapReply rep;
@@ -600,14 +524,7 @@ xkbGetMapReply rep;
}
Status
-#if NeedFunctionPrototypes
XkbGetUpdatedMap(Display *dpy,unsigned which,XkbDescPtr xkb)
-#else
-XkbGetUpdatedMap(dpy,which,xkb)
- Display * dpy;
- unsigned which;
- XkbDescPtr xkb;
-#endif
{
if ((dpy->flags & XlibDisplayNoXkb) ||
(!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL)))
@@ -630,14 +547,7 @@ XkbGetUpdatedMap(dpy,which,xkb)
}
XkbDescPtr
-#if NeedFunctionPrototypes
XkbGetMap(Display *dpy,unsigned which,unsigned deviceSpec)
-#else
-XkbGetMap(dpy,which,deviceSpec)
- Display *dpy;
- unsigned which;
- unsigned deviceSpec;
-#endif
{
XkbDescPtr xkb;
@@ -660,15 +570,7 @@ XkbDescPtr xkb;
}
Status
-#if NeedFunctionPrototypes
XkbGetKeyTypes(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
-#else
-XkbGetKeyTypes(dpy,first,num,xkb)
- Display *dpy;
- unsigned first;
- unsigned num;
- XkbDescPtr xkb;
-#endif
{
register xkbGetMapReq *req;
Status status;
@@ -692,15 +594,7 @@ XkbGetKeyTypes(dpy,first,num,xkb)
}
Status
-#if NeedFunctionPrototypes
XkbGetKeyActions(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
-#else
-XkbGetKeyActions(dpy,first,num,xkb)
- Display *dpy;
- unsigned first;
- unsigned num;
- XkbDescPtr xkb;
-#endif
{
register xkbGetMapReq *req;
Status status;
@@ -725,15 +619,7 @@ XkbGetKeyActions(dpy,first,num,xkb)
}
Status
-#if NeedFunctionPrototypes
XkbGetKeySyms(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
-#else
-XkbGetKeySyms(dpy,first,num,xkb)
- Display *dpy;
- unsigned first;
- unsigned num;
- XkbDescPtr xkb;
-#endif
{
register xkbGetMapReq *req;
Status status;
@@ -759,15 +645,7 @@ XkbGetKeySyms(dpy,first,num,xkb)
}
Status
-#if NeedFunctionPrototypes
XkbGetKeyBehaviors(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
-#else
-XkbGetKeyBehaviors(dpy,first,num,xkb)
- Display * dpy;
- unsigned first;
- unsigned num;
- XkbDescPtr xkb;
-#endif
{
register xkbGetMapReq *req;
Status status;
@@ -792,14 +670,7 @@ XkbGetKeyBehaviors(dpy,first,num,xkb)
}
Status
-#if NeedFunctionPrototypes
XkbGetVirtualMods(Display *dpy,unsigned which,XkbDescPtr xkb)
-#else
-XkbGetVirtualMods(dpy,which,xkb)
- Display * dpy;
- unsigned which;
- XkbDescPtr xkb;
-#endif
{
register xkbGetMapReq *req;
Status status;
@@ -820,18 +691,10 @@ XkbGetVirtualMods(dpy,which,xkb)
}
Status
-#if NeedFunctionPrototypes
XkbGetKeyExplicitComponents( Display * dpy,
unsigned first,
unsigned num,
XkbDescPtr xkb)
-#else
-XkbGetKeyExplicitComponents(dpy,first,num,xkb)
- Display *dpy;
- unsigned first;
- unsigned num;
- XkbDescPtr xkb;
-#endif
{
register xkbGetMapReq *req;
Status status;
@@ -860,15 +723,7 @@ XkbGetKeyExplicitComponents(dpy,first,num,xkb)
}
Status
-#if NeedFunctionPrototypes
XkbGetKeyModifierMap(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
-#else
-XkbGetKeyModifierMap(dpy,first,num,xkb)
- Display * dpy;
- unsigned first;
- unsigned num;
- XkbDescPtr xkb;
-#endif
{
register xkbGetMapReq *req;
Status status;
@@ -897,15 +752,7 @@ XkbGetKeyModifierMap(dpy,first,num,xkb)
}
Status
-#if NeedFunctionPrototypes
XkbGetKeyVirtualModMap(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
-#else
-XkbGetKeyVirtualModMap(dpy,first,num,xkb)
- Display *dpy;
- unsigned first;
- unsigned num;
- XkbDescPtr xkb;
-#endif
{
register xkbGetMapReq *req;
Status status;
@@ -934,14 +781,7 @@ XkbGetKeyVirtualModMap(dpy,first,num,xkb)
}
Status
-#if NeedFunctionPrototypes
XkbGetMapChanges(Display *dpy,XkbDescPtr xkb,XkbMapChangesPtr changes)
-#else
-XkbGetMapChanges(dpy,xkb,changes)
- Display * dpy;
- XkbDescPtr xkb;
- XkbMapChangesPtr changes;
-#endif
{
xkbGetMapReq *req;
diff --git a/src/xkb/XKBList.c b/src/xkb/XKBList.c
index 9f521a6..1f2b6e9 100644
--- a/src/xkb/XKBList.c
+++ b/src/xkb/XKBList.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/lib/X11/XKBList.c,v 1.2 2003/11/17 22:20:09 dawes Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
@@ -35,13 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
static void
-#if NeedFunctionPrototypes
_FreeComponentNames(int num,XkbComponentNamePtr names)
-#else
-_FreeComponentNames(num,names)
- int num;
- XkbComponentNamePtr names;
-#endif
{
int i;
XkbComponentNamePtr tmp;
@@ -61,14 +56,7 @@ XkbComponentNamePtr tmp;
/***====================================================================***/
static XkbComponentNamePtr
-#if NeedFunctionPrototypes
_ReadListing(XkbReadBufferPtr buf,int count,Status *status_rtrn)
-#else
-_ReadListing(buf,count,status_rtrn)
- XkbReadBufferPtr buf;
- int count;
- Status * status_rtrn;
-#endif
{
XkbComponentNamePtr first,this;
register int i;
@@ -104,18 +92,10 @@ BAILOUT:
/***====================================================================***/
XkbComponentListPtr
-#if NeedFunctionPrototypes
XkbListComponents( Display * dpy,
unsigned deviceSpec,
XkbComponentNamesPtr ptrns,
int * max_inout)
-#else
-XkbListComponents(dpy,deviceSpec,ptrns,max_inout)
- Display * dpy;
- unsigned deviceSpec;
- XkbComponentNamesPtr ptrns;
- int * max_inout;
-#endif
{
register xkbListComponentsReq* req;
xkbListComponentsReply rep;
@@ -246,12 +226,7 @@ BAILOUT:
}
void
-#if NeedFunctionPrototypes
XkbFreeComponentList(XkbComponentListPtr list)
-#else
-XkbFreeComponentList(list)
- XkbComponentListPtr list;
-#endif
{
if (list) {
if (list->keymaps)
diff --git a/src/xkb/XKBMAlloc.c b/src/xkb/XKBMAlloc.c
index 29cdc3c..20def46 100644
--- a/src/xkb/XKBMAlloc.c
+++ b/src/xkb/XKBMAlloc.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBMAlloc.c,v 3.11 2001/01/17 19:41:48 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBMAlloc.c,v 3.12 2003/11/17 22:20:09 dawes Exp $ */
#ifndef XKB_IN_SERVER
@@ -54,14 +54,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
Status
-#if NeedFunctionPrototypes
XkbAllocClientMap(XkbDescPtr xkb,unsigned which,unsigned nTotalTypes)
-#else
-XkbAllocClientMap(xkb,which,nTotalTypes)
- XkbDescPtr xkb;
- unsigned which;
- unsigned nTotalTypes;
-#endif
{
register int i;
XkbClientMapPtr map;
@@ -144,14 +137,7 @@ fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n",
}
Status
-#if NeedFunctionPrototypes
XkbAllocServerMap(XkbDescPtr xkb,unsigned which,unsigned nNewActions)
-#else
-XkbAllocServerMap(xkb,which,nNewActions)
- XkbDescPtr xkb;
- unsigned which;
- unsigned nNewActions;
-#endif
{
register int i;
XkbServerMapPtr map;
@@ -245,13 +231,7 @@ XkbServerMapPtr map;
/***====================================================================***/
Status
-#if NeedFunctionPrototypes
XkbCopyKeyType(XkbKeyTypePtr from,XkbKeyTypePtr into)
-#else
-XkbCopyKeyType(from,into)
- XkbKeyTypePtr from;
- XkbKeyTypePtr into;
-#endif
{
if ((!from)||(!into))
return BadMatch;
@@ -292,14 +272,7 @@ XkbCopyKeyType(from,into)
}
Status
-#if NeedFunctionPrototypes
XkbCopyKeyTypes(XkbKeyTypePtr from,XkbKeyTypePtr into,int num_types)
-#else
-XkbCopyKeyTypes(from,into,num_types)
- XkbKeyTypePtr from;
- XkbKeyTypePtr into;
- int num_types;
-#endif
{
register int i,rtrn;
@@ -313,20 +286,11 @@ register int i,rtrn;
}
XkbKeyTypePtr
-#if NeedFunctionPrototypes
XkbAddKeyType( XkbDescPtr xkb,
Atom name,
int map_count,
Bool want_preserve,
int num_lvls)
-#else
-XkbAddKeyType(xkb,name,map_count,want_preserve,num_lvls)
- XkbDescPtr xkb;
- Atom name;
- int map_count;
- Bool want_preserve;
- int num_lvls;
-#endif
{
register int i;
unsigned tmp;
@@ -397,20 +361,11 @@ XkbClientMapPtr map;
}
Status
-#if NeedFunctionPrototypes
XkbResizeKeyType( XkbDescPtr xkb,
int type_ndx,
int map_count,
Bool want_preserve,
int new_num_lvls)
-#else
-XkbResizeKeyType(xkb,type_ndx,map_count,want_preserve,new_num_lvls)
- XkbDescPtr xkb;
- int type_ndx;
- int map_count;
- Bool want_preserve;
- int new_num_lvls;
-#endif
{
XkbKeyTypePtr type;
KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
@@ -604,14 +559,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
}
KeySym *
-#if NeedFunctionPrototypes
XkbResizeKeySyms(XkbDescPtr xkb,int key,int needed)
-#else
-XkbResizeKeySyms(xkb,key,needed)
- XkbDescPtr xkb;
- int key;
- int needed;
-#endif
{
register int i,nSyms,nKeySyms;
unsigned nOldSyms;
@@ -666,20 +614,11 @@ KeySym *newSyms;
}
static unsigned
-#if NeedFunctionPrototypes
_ExtendRange( unsigned int old_flags,
unsigned int flag,
KeyCode newKC,
KeyCode * old_min,
unsigned char * old_num)
-#else
-_ExtendRange(old_flags,flag,newKC,old_min,old_num)
- unsigned int old_flags;
- unsigned int flag;
- KeyCode newKC;
- KeyCode * old_min;
- unsigned char * old_num;
-#endif
{
if ((old_flags&flag)==0) {
old_flags|= flag;
@@ -700,18 +639,10 @@ _ExtendRange(old_flags,flag,newKC,old_min,old_num)
}
Status
-#if NeedFunctionPrototypes
XkbChangeKeycodeRange( XkbDescPtr xkb,
int minKC,
int maxKC,
XkbChangesPtr changes)
-#else
-XkbChangeKeycodeRange(xkb,minKC,maxKC,changes)
- XkbDescPtr xkb;
- int minKC;
- int maxKC;
- XkbChangesPtr changes;
-#endif
{
int tmp;
@@ -908,14 +839,7 @@ int tmp;
}
XkbAction *
-#if NeedFunctionPrototypes
XkbResizeKeyActions(XkbDescPtr xkb,int key,int needed)
-#else
-XkbResizeKeyActions(xkb,key,needed)
- XkbDescPtr xkb;
- int key;
- int needed;
-#endif
{
register int i,nActs;
XkbAction *newActs;
@@ -965,14 +889,7 @@ XkbAction *newActs;
}
void
-#if NeedFunctionPrototypes
XkbFreeClientMap(XkbDescPtr xkb,unsigned what,Bool freeMap)
-#else
-XkbFreeClientMap(xkb,what,freeMap)
- XkbDescPtr xkb;
- unsigned what;
- Bool freeMap;
-#endif
{
XkbClientMapPtr map;
@@ -1030,14 +947,7 @@ XkbClientMapPtr map;
}
void
-#if NeedFunctionPrototypes
XkbFreeServerMap(XkbDescPtr xkb,unsigned what,Bool freeMap)
-#else
-XkbFreeServerMap(xkb,what,freeMap)
- XkbDescPtr xkb;
- unsigned what;
- Bool freeMap;
-#endif
{
XkbServerMapPtr map;
diff --git a/src/xkb/XKBMisc.c b/src/xkb/XKBMisc.c
index f3de929..06660ff 100644
--- a/src/xkb/XKBMisc.c
+++ b/src/xkb/XKBMisc.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.5 2001/10/28 03:32:33 tsi Exp $ */
+/* $XFree86: xc/lib/X11/XKBMisc.c,v 3.6 2003/11/17 22:20:09 dawes Exp $ */
#ifndef XKB_IN_SERVER
@@ -102,14 +102,7 @@ static XkbKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = {
};
Status
-#if NeedFunctionPrototypes
XkbInitCanonicalKeyTypes(XkbDescPtr xkb,unsigned which,int keypadVMod)
-#else
-XkbInitCanonicalKeyTypes(xkb,which,keypadVMod)
- XkbDescPtr xkb;
- unsigned which;
- int keypadVMod;
-#endif
{
XkbClientMapPtr map;
XkbKeyTypePtr from,to;
@@ -159,23 +152,12 @@ Status rtrn;
#define XKB_OFFSET(g,l) (((g)*groupsWidth)+(l))
int
-#if NeedFunctionPrototypes
XkbKeyTypesForCoreSymbols( XkbDescPtr xkb,
int map_width,
KeySym * core_syms,
unsigned int protected,
int * types_inout,
KeySym * xkb_syms_rtrn)
-#else
-XkbKeyTypesForCoreSymbols(xkb,map_width,core_syms,protected,types_inout,
- xkb_syms_rtrn)
- XkbDescPtr xkb;
- int map_width;
- KeySym * core_syms;
- unsigned int protected;
- int * types_inout;
- KeySym * xkb_syms_rtrn;
-#endif
{
register int i;
unsigned int empty;
@@ -340,18 +322,10 @@ int nGroups,tmp,groupsWidth;
}
static XkbSymInterpretPtr
-#if NeedFunctionPrototypes
_XkbFindMatchingInterp( XkbDescPtr xkb,
KeySym sym,
unsigned int real_mods,
unsigned int level)
-#else
-_XkbFindMatchingInterp(xkb,sym,real_mods,level)
- XkbDescPtr xkb;
- KeySym sym;
- unsigned int real_mods;
- unsigned int level;
-#endif
{
register unsigned i;
XkbSymInterpretPtr interp,rtrn;
@@ -399,14 +373,7 @@ CARD8 mods;
}
static void
-#if NeedFunctionPrototypes
_XkbAddKeyChange(KeyCode *pFirst,unsigned char *pNum,KeyCode newKey)
-#else
-_XkbAddKeyChange(pFirst,pNum,newKey)
- KeyCode * pFirst;
- unsigned char * pNum;
- KeyCode newKey;
-#endif
{
KeyCode last;
@@ -422,14 +389,7 @@ KeyCode last;
}
static void
-#if NeedFunctionPrototypes
_XkbSetActionKeyMods(XkbDescPtr xkb,XkbAction *act,unsigned mods)
-#else
-_XkbSetActionKeyMods(xkb,act,mods)
- XkbDescPtr xkb;
- XkbAction * act;
- unsigned mods;
-#endif
{
unsigned tmp;
@@ -457,14 +417,7 @@ unsigned tmp;
#define IBUF_SIZE 8
Bool
-#if NeedFunctionPrototypes
XkbApplyCompatMapToKey(XkbDescPtr xkb,KeyCode key,XkbChangesPtr changes)
-#else
-XkbApplyCompatMapToKey(xkb,key,changes)
- XkbDescPtr xkb;
- KeyCode key;
- XkbChangesPtr changes;
-#endif
{
KeySym * syms;
unsigned char explicit,mods;
@@ -613,22 +566,12 @@ unsigned changed,tmp;
}
Bool
-#if NeedFunctionPrototypes
XkbUpdateMapFromCore( XkbDescPtr xkb,
KeyCode first_key,
int num_keys,
int map_width,
KeySym * core_keysyms,
XkbChangesPtr changes)
-#else
-XkbUpdateMapFromCore(xkb,first_key,num_keys,map_width,core_keysyms,changes)
- XkbDescPtr xkb;
- KeyCode first_key;
- int num_keys;
- int map_width;
- KeySym * core_keysyms;
- XkbChangesPtr changes;
-#endif
{
register int key,last_key;
KeySym * syms;
@@ -705,22 +648,12 @@ KeySym * syms;
}
Status
-#if NeedFunctionPrototypes
XkbChangeTypesOfKey( XkbDescPtr xkb,
int key,
int nGroups,
unsigned groups,
int * newTypesIn,
XkbMapChangesPtr changes)
-#else
-XkbChangeTypesOfKey(xkb,key,nGroups,groups,newTypesIn,changes)
- XkbDescPtr xkb;
- int key;
- int nGroups;
- unsigned groups;
- int * newTypesIn;
- XkbMapChangesPtr changes;
-#endif
{
XkbKeyTypePtr pOldType,pNewType;
register int i;
@@ -839,14 +772,7 @@ int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups];
/***====================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbVirtualModsToReal(XkbDescPtr xkb,unsigned virtual_mask,unsigned *mask_rtrn)
-#else
-XkbVirtualModsToReal(xkb,virtual_mask,mask_rtrn)
- XkbDescPtr xkb;
- unsigned virtual_mask;
- unsigned * mask_rtrn;
-#endif
{
register int i,bit;
register unsigned mask;
@@ -870,14 +796,7 @@ register unsigned mask;
/***====================================================================***/
Bool
-#if NeedFunctionPrototypes
XkbUpdateActionVirtualMods(XkbDescPtr xkb,XkbAction *act,unsigned changed)
-#else
-XkbUpdateActionVirtualMods(xkb,act,changed)
- XkbDescPtr xkb;
- XkbAction * act;
- unsigned changed;
-#endif
{
unsigned int tmp;
@@ -903,18 +822,10 @@ unsigned int tmp;
}
void
-#if NeedFunctionPrototypes
XkbUpdateKeyTypeVirtualMods( XkbDescPtr xkb,
XkbKeyTypePtr type,
unsigned int changed,
XkbChangesPtr changes)
-#else
-XkbUpdateKeyTypeVirtualMods(xkb,type,changed,changes)
- XkbDescPtr xkb;
- XkbKeyTypePtr type;
- unsigned int changed;
- XkbChangesPtr changes;
-#endif
{
register unsigned int i;
unsigned int mask;
@@ -959,14 +870,7 @@ unsigned int mask;
}
Bool
-#if NeedFunctionPrototypes
XkbApplyVirtualModChanges(XkbDescPtr xkb,unsigned changed,XkbChangesPtr changes)
-#else
-XkbApplyVirtualModChanges(xkb,changed,changes)
- XkbDescPtr xkb;
- unsigned changed;
- XkbChangesPtr changes;
-#endif
{
register int i;
unsigned int checkState = 0;
diff --git a/src/xkb/XKBNames.c b/src/xkb/XKBNames.c
index a072bf8..9e8326d 100644
--- a/src/xkb/XKBNames.c
+++ b/src/xkb/XKBNames.c
@@ -24,28 +24,21 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBNames.c,v 1.4 2001/10/28 03:32:33 tsi Exp $ */
+/* $XFree86: xc/lib/X11/XKBNames.c,v 1.6 2003/11/17 22:20:09 dawes Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
+#define NEED_MAP_READERS
#include "Xlibint.h"
#include <X11/extensions/XKBproto.h>
#include "XKBlibint.h"
static Status
-#if NeedFunctionPrototypes
_XkbReadAtoms( XkbReadBufferPtr buf,
Atom * atoms,
int maxAtoms,
CARD32 present)
-#else
-_XkbReadAtoms(buf,atoms,maxAtoms,present)
- XkbReadBufferPtr buf;
- Atom *atoms;
- int maxAtoms;
- CARD32 present;
-#endif
{
register int i,bit;
@@ -60,18 +53,10 @@ register int i,bit;
}
Status
-#if NeedFunctionPrototypes
_XkbReadGetNamesReply( Display * dpy,
xkbGetNamesReply * rep,
XkbDescPtr xkb,
int * nread_rtrn)
-#else
-_XkbReadGetNamesReply(dpy,rep,xkb,nread_rtrn)
- Display * dpy;
- xkbGetNamesReply * rep;
- XkbDescPtr xkb;
- int * nread_rtrn;
-#endif
{
int i,len;
XkbReadBufferRec buf;
@@ -244,14 +229,7 @@ BAILOUT:
}
Status
-#if NeedFunctionPrototypes
XkbGetNames(Display *dpy,unsigned which,XkbDescPtr xkb)
-#else
-XkbGetNames(dpy,which,xkb)
- Display * dpy;
- unsigned which;
- XkbDescPtr xkb;
-#endif
{
register xkbGetNamesReq *req;
xkbGetNamesReply rep;
@@ -291,13 +269,7 @@ XkbGetNames(dpy,which,xkb)
/***====================================================================***/
static int
-#if NeedFunctionPrototypes
_XkbCountBits(int nBitsMax,unsigned long mask)
-#else
-_XkbCountBits(nBitsMax,mask)
- int nBitsMax;
- unsigned long mask;
-#endif
{
register unsigned long y, nBits;
@@ -310,14 +282,7 @@ register unsigned long y, nBits;
}
static CARD32
-#if NeedFunctionPrototypes
_XkbCountAtoms(Atom *atoms,int maxAtoms,int *count)
-#else
-_XkbCountAtoms(atoms,maxAtoms,count)
- Atom *atoms;
- int maxAtoms;
- int *count;
-#endif
{
register unsigned int i,bit,nAtoms;
register CARD32 atomsPresent;
@@ -334,15 +299,7 @@ register CARD32 atomsPresent;
}
static void
-#if NeedFunctionPrototypes
_XkbCopyAtoms(Display *dpy,Atom *atoms,CARD32 mask,int maxAtoms)
-#else
-_XkbCopyAtoms(dpy,atoms,mask,maxAtoms)
- Display * dpy;
- Atom * atoms;
- CARD32 mask;
- int maxAtoms;
-#endif
{
register unsigned int i,bit;
@@ -354,20 +311,11 @@ register unsigned int i,bit;
}
Bool
-#if NeedFunctionPrototypes
XkbSetNames( Display * dpy,
unsigned int which,
unsigned int firstType,
unsigned int nTypes,
XkbDescPtr xkb)
-#else
-XkbSetNames(dpy,which,firstType,nTypes,xkb)
- Display * dpy;
- unsigned int which;
- unsigned int firstType;
- unsigned int nTypes;
- XkbDescPtr xkb;
-#endif
{
register xkbSetNamesReq *req;
int nLvlNames = 0;
@@ -589,14 +537,7 @@ XkbSetNames(dpy,which,firstType,nTypes,xkb)
}
Bool
-#if NeedFunctionPrototypes
XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes)
-#else
-XkbChangeNames(dpy,xkb,changes)
- Display * dpy;
- XkbDescPtr xkb;
- XkbNameChangesPtr changes;
-#endif
{
register xkbSetNamesReq *req;
int nLvlNames = 0;
@@ -852,16 +793,9 @@ XkbChangeNames(dpy,xkb,changes)
}
void
-#if NeedFunctionPrototypes
XkbNoteNameChanges( XkbNameChangesPtr old,
XkbNamesNotifyEvent * new,
unsigned int wanted)
-#else
-XkbNoteNameChanges(old,new,wanted)
- XkbNameChangesPtr old;
- XkbNamesNotifyEvent * new;
- unsigned int wanted;
-#endif
{
int first,last,old_last,new_last;
diff --git a/src/xkb/XKBRdBuf.c b/src/xkb/XKBRdBuf.c
index 5e962b1..8f688c0 100644
--- a/src/xkb/XKBRdBuf.c
+++ b/src/xkb/XKBRdBuf.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBRdBuf.c,v 1.2 2001/10/28 03:32:33 tsi Exp $ */
+/* $XFree86: xc/lib/X11/XKBRdBuf.c,v 1.3 2003/11/17 22:20:10 dawes Exp $ */
#include <stdio.h>
#define NEED_REPLIES
@@ -36,14 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
int
-#if NeedFunctionPrototypes
_XkbInitReadBuffer(Display *dpy,XkbReadBufferPtr buf,int size)
-#else
-_XkbInitReadBuffer(dpy,buf,size)
- Display *dpy;
- XkbReadBufferPtr buf;
- int size;
-#endif
{
if ((dpy!=NULL) && (buf!=NULL) && (size>0)) {
buf->error= 0;
@@ -60,13 +53,7 @@ _XkbInitReadBuffer(dpy,buf,size)
#define _XkbReadBufferDataLeft(b) (((b)->size)-((b)->data-(b)->start))
int
-#if NeedFunctionPrototypes
_XkbSkipReadBufferData(XkbReadBufferPtr from,int size)
-#else
-_XkbSkipReadBufferData(from,size)
- XkbReadBufferPtr from;
- int size;
-#endif
{
if (size==0)
return 1;
@@ -78,14 +65,7 @@ _XkbSkipReadBufferData(from,size)
}
int
-#if NeedFunctionPrototypes
_XkbCopyFromReadBuffer(XkbReadBufferPtr from,char *to,int size)
-#else
-_XkbCopyFromReadBuffer(from,to,size)
- XkbReadBufferPtr from;
- char *to;
- int size;
-#endif
{
if (size==0)
return 1;
@@ -99,14 +79,7 @@ _XkbCopyFromReadBuffer(from,to,size)
#ifdef XKB_FORCE_INT_KEYSYM
int
-#if NeedFunctionPrototypes
_XkbReadCopyKeySyms(int *wire,KeySym *to,int num_words)
-#else
-_XkbReadCopyKeySyms(wire,to,num_words)
- int * wire;
- KeySym * to;
- int num_words;
-#endif
{
while (num_words-->0) {
*to++= *wire++;
@@ -115,14 +88,7 @@ _XkbReadCopyKeySyms(wire,to,num_words)
}
int
-#if NeedFunctionPrototypes
_XkbReadBufferCopyKeySyms(XkbReadBufferPtr from,KeySym *to,int num_words)
-#else
-_XkbReadBufferCopyKeySyms(from,to,num_words)
- XkbReadBufferPtr from;
- KeySym * to;
- int num_words;
-#endif
{
if ((unsigned)(num_words*4)>_XkbReadBufferDataLeft(from))
return 0;
@@ -132,14 +98,7 @@ _XkbReadBufferCopyKeySyms(from,to,num_words)
}
int
-#if NeedFunctionPrototypes
_XkbWriteCopyKeySyms (register KeySym *from,CARD32 *to,int len)
-#else
-_XkbWriteCopyKeySyms (from,to,len)
- register KeySym * from;
- CARD32 * to;
- int len;
-#endif
{
while (len-->0) {
@@ -151,14 +110,7 @@ _XkbWriteCopyKeySyms (from,to,len)
#ifdef LONG64
int
-#if NeedFunctionPrototypes
_XkbReadCopyData32(int *wire,long *to,int num_words)
-#else
-_XkbReadCopyData32(wire,to,num_words)
- int * wire;
- long * to;
- int num_words;
-#endif
{
while (num_words-->0) {
*to++= *wire++;
@@ -168,14 +120,7 @@ _XkbReadCopyData32(wire,to,num_words)
#endif
#ifdef WORD64
int
-#if NeedFunctionPrototypes
_XkbReadCopyData32(int *from,long *lp,int num_words)
-#else
-_XkbReadCopyData32(from,lp,num_words)
- int * from;
- long * lp;
- int num_words;
-#endif
{
long *lpack;
long mask32 = 0x00000000ffffffff;
@@ -197,14 +142,7 @@ long maskw, i, bits;
#if defined(LONG64) || defined(WORD64)
int
-#if NeedFunctionPrototypes
_XkbReadBufferCopy32(XkbReadBufferPtr from,long *to,int num_words)
-#else
-_XkbReadBufferCopy32(from,to,num_words)
- XkbReadBufferPtr from;
- long * to;
- int num_words;
-#endif
{
if ((unsigned)(num_words*4)>_XkbReadBufferDataLeft(from))
return 0;
@@ -216,14 +154,7 @@ _XkbReadBufferCopy32(from,to,num_words)
#ifdef LONG64
int
-#if NeedFunctionPrototypes
_XkbWriteCopyData32 (register unsigned long *from,CARD32 *to,int len)
-#else
-_XkbWriteCopyData32 (from,to,len)
- register unsigned long * from;
- CARD32 * to;
- int len;
-#endif
{
while (len-->0) {
@@ -238,13 +169,7 @@ _XkbWriteCopyData32 Not Implemented Yet for sizeof(int)==8
#endif
char *
-#if NeedFunctionPrototypes
_XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size)
-#else
-_XkbPeekAtReadBuffer(from,size)
- XkbReadBufferPtr from;
- int size;
-#endif
{
if ((from==NULL)||(from->error)||(size<1)||
(_XkbReadBufferDataLeft(from)<size))
@@ -253,13 +178,7 @@ _XkbPeekAtReadBuffer(from,size)
}
char *
-#if NeedFunctionPrototypes
_XkbGetReadBufferPtr(XkbReadBufferPtr from,int size)
-#else
-_XkbGetReadBufferPtr(from,size)
- XkbReadBufferPtr from;
- int size;
-#endif
{
char *ptr;
if ((from==NULL)||(from->error)||(size<1)||
@@ -272,12 +191,7 @@ char *ptr;
int
-#if NeedFunctionPrototypes
_XkbFreeReadBuffer(XkbReadBufferPtr buf)
-#else
-_XkbFreeReadBuffer(buf)
- XkbReadBufferPtr buf;
-#endif
{
if ((buf!=NULL) && (buf->start!=NULL)) {
int left;
@@ -292,13 +206,7 @@ _XkbFreeReadBuffer(buf)
}
Bool
-#if NeedFunctionPrototypes
_XkbGetReadBufferCountedString(XkbReadBufferPtr buf,char **rtrn)
-#else
-_XkbGetReadBufferCountedString(buf,rtrn)
- XkbReadBufferPtr buf;
- char ** rtrn;
-#endif
{
CARD16 len,*pLen;
int left;
diff --git a/src/xkb/XKBSetGeom.c b/src/xkb/XKBSetGeom.c
index 72d7f3d..d792b5e 100644
--- a/src/xkb/XKBSetGeom.c
+++ b/src/xkb/XKBSetGeom.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/lib/X11/XKBSetGeom.c,v 3.6 2003/11/17 22:20:10 dawes Exp $ */
#ifdef DEBUG
#include <stdio.h>
@@ -48,13 +49,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define _SizeCountedString(s) ((s)?XkbPaddedSize(2+strlen(s)):4)
static char *
-#if NeedFunctionPrototypes
_WriteCountedString(char *wire,char *str)
-#else
-_WriteCountedString(wire,str)
- char * wire;
- char * str;
-#endif
{
CARD16 len,*pLen;
@@ -68,12 +63,7 @@ CARD16 len,*pLen;
}
static int
-#if NeedFunctionPrototypes
_SizeGeomProperties(XkbGeometryPtr geom)
-#else
-_SizeGeomProperties(geom)
- XkbGeometryPtr geom;
-#endif
{
register int i,size;
XkbPropertyPtr prop;
@@ -86,12 +76,7 @@ XkbPropertyPtr prop;
}
static int
-#if NeedFunctionPrototypes
_SizeGeomColors(XkbGeometryPtr geom)
-#else
-_SizeGeomColors(geom)
- XkbGeometryPtr geom;
-#endif
{
register int i,size;
register XkbColorPtr color;
@@ -103,12 +88,7 @@ register XkbColorPtr color;
}
static int
-#if NeedFunctionPrototypes
_SizeGeomShapes(XkbGeometryPtr geom)
-#else
-_SizeGeomShapes(geom)
- XkbGeometryPtr geom;
-#endif
{
register int i,size;
register XkbShapePtr shape;
@@ -126,13 +106,7 @@ register XkbShapePtr shape;
}
static int
-#if NeedFunctionPrototypes
_SizeGeomDoodads(int num_doodads,XkbDoodadPtr doodad)
-#else
-_SizeGeomDoodads(num_doodads,doodad)
- int num_doodads;
- XkbDoodadPtr doodad;
-#endif
{
register int i,size;
@@ -150,12 +124,7 @@ register int i,size;
}
static int
-#if NeedFunctionPrototypes
_SizeGeomSections(XkbGeometryPtr geom)
-#else
-_SizeGeomSections(geom)
- XkbGeometryPtr geom;
-#endif
{
register int i,size;
XkbSectionPtr section;
@@ -190,12 +159,7 @@ XkbSectionPtr section;
}
static int
-#if NeedFunctionPrototypes
_SizeGeomKeyAliases(XkbGeometryPtr geom)
-#else
-_SizeGeomKeyAliases(geom)
- XkbGeometryPtr geom;
-#endif
{
return geom->num_key_aliases*(2*XkbKeyNameLength);
}
@@ -203,13 +167,7 @@ _SizeGeomKeyAliases(geom)
/***====================================================================***/
static char *
-#if NeedFunctionPrototypes
_WriteGeomProperties(char *wire,XkbGeometryPtr geom)
-#else
-_WriteGeomProperties(wire,geom)
- char * wire;
- XkbGeometryPtr geom;
-#endif
{
register int i;
register XkbPropertyPtr prop;
@@ -222,13 +180,7 @@ register XkbPropertyPtr prop;
}
static char *
-#if NeedFunctionPrototypes
_WriteGeomColors(char *wire,XkbGeometryPtr geom)
-#else
-_WriteGeomColors(wire,geom)
- char * wire;
- XkbGeometryPtr geom;
-#endif
{
register int i;
register XkbColorPtr color;
@@ -240,13 +192,7 @@ register XkbColorPtr color;
}
static char *
-#if NeedFunctionPrototypes
_WriteGeomShapes(char *wire,XkbGeometryPtr geom)
-#else
-_WriteGeomShapes(wire,geom)
- char * wire;
- XkbGeometryPtr geom;
-#endif
{
int i;
XkbShapePtr shape;
@@ -286,14 +232,7 @@ xkbShapeWireDesc * shapeWire;
}
static char *
-#if NeedFunctionPrototypes
_WriteGeomDoodads(char *wire,int num_doodads,XkbDoodadPtr doodad)
-#else
-_WriteGeomDoodads(wire,num_doodads,doodad)
- char * wire;
- int num_doodads;
- XkbDoodadPtr doodad;
-#endif
{
register int i;
xkbDoodadWireDesc * doodadWire;
@@ -340,13 +279,7 @@ xkbDoodadWireDesc * doodadWire;
}
static char *
-#if NeedFunctionPrototypes
_WriteGeomOverlay(char *wire,XkbOverlayPtr ol)
-#else
-_WriteGeomOverlay(wire,ol)
- char * wire;
- XkbOverlayPtr ol;
-#endif
{
register int r;
XkbOverlayRowPtr row;
@@ -376,13 +309,7 @@ xkbOverlayWireDesc * olWire;
}
static char *
-#if NeedFunctionPrototypes
_WriteGeomSections(char *wire,XkbGeometryPtr geom)
-#else
-_WriteGeomSections(wire,geom)
- char * wire;
- XkbGeometryPtr geom;
-#endif
{
register int i;
XkbSectionPtr section;
@@ -444,13 +371,7 @@ xkbSectionWireDesc * sectionWire;
}
static char *
-#if NeedFunctionPrototypes
_WriteGeomKeyAliases(char *wire,XkbGeometryPtr geom)
-#else
-_WriteGeomKeyAliases(wire,geom)
- char * wire;
- XkbGeometryPtr geom;
-#endif
{
register int sz;
@@ -465,16 +386,8 @@ register int sz;
/***====================================================================***/
static Status
-#if NeedFunctionPrototypes
_SendSetGeometry(Display *dpy,XkbGeometryPtr geom,xkbSetGeometryReq *req)
-#else
-_SendSetGeometry(dpy,geom,req)
- Display * dpy;
- XkbGeometryPtr geom;
- xkbSetGeometryReq * req;
-#endif
{
-xkbSetGeometryReq tmp;
int sz;
char * wire,*tbuf;
@@ -487,7 +400,6 @@ char * wire,*tbuf;
sz+= _SizeGeomDoodads(geom->num_doodads,geom->doodads);
sz+= _SizeGeomKeyAliases(geom);
req->length+= (sz/4);
- tmp= *req;
if (sz<BUFSIZE) {
BufAlloc(char *,wire,sz);
tbuf= NULL;
@@ -521,14 +433,7 @@ char * wire,*tbuf;
/***====================================================================***/
Status
-#if NeedFunctionPrototypes
XkbSetGeometry(Display *dpy,unsigned deviceSpec,XkbGeometryPtr geom)
-#else
-XkbSetGeometry(dpy,deviceSpec,geom)
- Display * dpy;
- unsigned deviceSpec;
- XkbGeometryPtr geom;
-#endif
{
xkbSetGeometryReq *req;
Status ret;
diff --git a/src/xkb/XKBSetMap.c b/src/xkb/XKBSetMap.c
index 331ad40..53bb566 100644
--- a/src/xkb/XKBSetMap.c
+++ b/src/xkb/XKBSetMap.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBSetMap.c,v 3.2 2001/01/17 19:41:49 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBSetMap.c,v 3.3 2003/11/17 22:20:10 dawes Exp $ */
#include <stdio.h>
#define NEED_REPLIES
@@ -34,13 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "XKBlibint.h"
static int
-#if NeedFunctionPrototypes
_XkbSizeKeyTypes(XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbSizeKeyTypes(xkb,req)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
XkbKeyTypePtr map;
int i,len;
@@ -62,14 +56,7 @@ _XkbSizeKeyTypes(xkb,req)
}
static void
-#if NeedFunctionPrototypes
_XkbWriteKeyTypes(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbWriteKeyTypes(dpy,xkb,req)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
char * buf;
XkbKeyTypePtr type;
@@ -115,13 +102,7 @@ _XkbWriteKeyTypes(dpy,xkb,req)
}
static int
-#if NeedFunctionPrototypes
_XkbSizeKeySyms(XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbSizeKeySyms(xkb,req)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
int i,len;
unsigned nSyms;
@@ -142,14 +123,7 @@ _XkbSizeKeySyms(xkb,req)
}
static void
-#if NeedFunctionPrototypes
_XkbWriteKeySyms(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbWriteKeySyms(dpy,xkb,req)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register KeySym * pSym;
CARD32 * outSym;
@@ -181,13 +155,7 @@ register int i;
}
static int
-#if NeedFunctionPrototypes
_XkbSizeKeyActions(XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbSizeKeyActions(xkb,req)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
int i,len,nActs;
@@ -207,14 +175,7 @@ _XkbSizeKeyActions(xkb,req)
}
static void
-#if NeedFunctionPrototypes
_XkbWriteKeyActions(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbWriteKeyActions(dpy,xkb,req)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i;
int n;
@@ -245,13 +206,7 @@ _XkbWriteKeyActions(dpy,xkb,req)
}
static int
-#if NeedFunctionPrototypes
_XkbSizeKeyBehaviors(XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbSizeKeyBehaviors(xkb,req)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i,first,last,nFound;
@@ -272,14 +227,7 @@ register int i,first,last,nFound;
}
static void
-#if NeedFunctionPrototypes
_XkbWriteKeyBehaviors(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbWriteKeyBehaviors(dpy,xkb,req)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i,first,last;
xkbBehaviorWireDesc * wire;
@@ -306,12 +254,7 @@ char * buf;
}
static unsigned
-#if NeedFunctionPrototypes
_XkbSizeVirtualMods(xkbSetMapReq *req)
-#else
-_XkbSizeVirtualMods(req)
- xkbSetMapReq * req;
-#endif
{
register int i,bit,nMods;
@@ -328,18 +271,10 @@ register int i,bit,nMods;
}
static void
-#if NeedFunctionPrototypes
_XkbWriteVirtualMods( Display * dpy,
XkbDescPtr xkb,
xkbSetMapReq * req,
unsigned size)
-#else
-_XkbWriteVirtualMods(dpy,xkb,req,size)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
- unsigned size;
-#endif
{
register int i,bit;
CARD8 *vmods;
@@ -356,13 +291,7 @@ _XkbWriteVirtualMods(dpy,xkb,req,size)
}
static int
-#if NeedFunctionPrototypes
_XkbSizeKeyExplicit(XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbSizeKeyExplicit(xkb,req)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i,first,last,nFound;
@@ -384,14 +313,7 @@ register int i,first,last,nFound;
}
static void
-#if NeedFunctionPrototypes
_XkbWriteKeyExplicit(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbWriteKeyExplicit(dpy,xkb,req)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i,first,last;
CARD8 * wire;
@@ -413,13 +335,7 @@ CARD8 * wire;
}
static int
-#if NeedFunctionPrototypes
_XkbSizeModifierMap(XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbSizeModifierMap(xkb,req)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i,first,last,nFound;
@@ -441,14 +357,7 @@ register int i,first,last,nFound;
}
static void
-#if NeedFunctionPrototypes
_XkbWriteModifierMap(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbWriteModifierMap(dpy,xkb,req)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i,first,last;
CARD8 * wire;
@@ -472,13 +381,7 @@ CARD8 * wire;
}
static int
-#if NeedFunctionPrototypes
_XkbSizeVirtualModMap(XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbSizeVirtualModMap(xkb,req)
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i,first,last,nFound;
@@ -500,14 +403,7 @@ register int i,first,last,nFound;
}
static void
-#if NeedFunctionPrototypes
_XkbWriteVirtualModMap(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-_XkbWriteVirtualModMap(dpy,xkb,req)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
register int i,first,last;
xkbVModMapWireDesc * wire;
@@ -531,14 +427,7 @@ xkbVModMapWireDesc * wire;
}
static void
-#if NeedFunctionPrototypes
SendSetMap(Display *dpy,XkbDescPtr xkb,xkbSetMapReq *req)
-#else
-SendSetMap(dpy,xkb,req)
- Display * dpy;
- XkbDescPtr xkb;
- xkbSetMapReq * req;
-#endif
{
xkbSetMapReq tmp;
unsigned szMods;
@@ -574,14 +463,7 @@ unsigned szMods;
}
Bool
-#if NeedFunctionPrototypes
XkbSetMap(Display *dpy,unsigned which,XkbDescPtr xkb)
-#else
-XkbSetMap(dpy,which,xkb)
- Display * dpy;
- unsigned which;
- XkbDescPtr xkb;
-#endif
{
register xkbSetMapReq * req;
XkbInfoPtr xkbi;
@@ -651,14 +533,7 @@ XkbClientMapPtr map;
}
Bool
-#if NeedFunctionPrototypes
XkbChangeMap(Display *dpy,XkbDescPtr xkb,XkbMapChangesPtr changes)
-#else
-XkbChangeMap(dpy,xkb,changes)
- Display * dpy;
- XkbDescPtr xkb;
- XkbMapChangesPtr changes;
-#endif
{
register xkbSetMapReq * req;
XkbInfoPtr xkbi;
diff --git a/src/xkb/XKBUse.c b/src/xkb/XKBUse.c
index 9e7966b..bfbb9ff 100644
--- a/src/xkb/XKBUse.c
+++ b/src/xkb/XKBUse.c
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBUse.c,v 3.6 2001/08/13 17:46:02 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBUse.c,v 3.8 2003/11/17 22:20:10 dawes Exp $ */
#include <stdio.h>
#include <ctype.h>
@@ -37,14 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
static Bool _XkbIgnoreExtension = False;
void
-#if NeedFunctionPrototypes
XkbNoteMapChanges(XkbMapChangesPtr old,XkbMapNotifyEvent *new,unsigned wanted)
-#else
-XkbNoteMapChanges(old,new,wanted)
- XkbMapChangesPtr old;
- XkbMapNotifyEvent * new;
- unsigned int wanted;
-#endif
{
int first,oldLast,newLast;
wanted&= new->changed;
@@ -183,16 +176,9 @@ XkbNoteMapChanges(old,new,wanted)
}
void
-#if NeedFunctionPrototypes
_XkbNoteCoreMapChanges( XkbMapChangesPtr old,
XMappingEvent * new,
unsigned int wanted)
-#else
-_XkbNoteCoreMapChanges(old,new,wanted)
- XkbMapChangesPtr old;
- XMappingEvent * new;
- unsigned int wanted;
-#endif
{
int first,oldLast,newLast;
@@ -219,14 +205,7 @@ _XkbNoteCoreMapChanges(old,new,wanted)
}
static Bool
-#if NeedFunctionPrototypes
wire_to_event(Display *dpy,XEvent *re,xEvent *event)
-#else
-wire_to_event(dpy,re,event)
- Display *dpy;
- XEvent *re;
- xEvent *event;
-#endif
{
xkbEvent *xkbevent= (xkbEvent *)event;
XkbInfoPtr xkbi;
@@ -612,12 +591,7 @@ wire_to_event(dpy,re,event)
}
Bool
-#if NeedFunctionPrototypes
XkbIgnoreExtension(Bool ignore)
-#else
-XkbIgnoreExtension(ignore)
- Bool ignore;
-#endif
{
if (getenv("XKB_FORCE")!=NULL) {
#ifdef DEBUG
@@ -635,12 +609,7 @@ XkbIgnoreExtension(ignore)
}
static void
-#if NeedFunctionPrototypes
_XkbFreeInfo(Display *dpy)
-#else
-_XkbFreeInfo(dpy)
- Display *dpy;
-#endif
{
XkbInfoPtr xkbi = dpy->xkb_info;
if (xkbi) {
@@ -651,14 +620,7 @@ _XkbFreeInfo(dpy)
}
Bool
-#if NeedFunctionPrototypes
XkbUseExtension(Display *dpy,int *major_rtrn,int *minor_rtrn)
-#else
-XkbUseExtension(dpy,major_rtrn,minor_rtrn)
- Display * dpy;
- int * major_rtrn;
- int * minor_rtrn;
-#endif
{
xkbUseExtensionReply rep;
register xkbUseExtensionReq *req;
@@ -669,7 +631,7 @@ XkbUseExtension(dpy,major_rtrn,minor_rtrn)
static int debugMsg;
static int been_here= 0;
- if ( dpy->xkb_info && (!dpy->flags&XlibDisplayNoXkb)) {
+ if ( dpy->xkb_info && !(dpy->flags & XlibDisplayNoXkb)) {
if (major_rtrn) *major_rtrn= dpy->xkb_info->srv_major;
if (minor_rtrn) *minor_rtrn= dpy->xkb_info->srv_minor;
return True;
diff --git a/src/xkb/XKBleds.c b/src/xkb/XKBleds.c
index aa6ba3d..41b4f41 100644
--- a/src/xkb/XKBleds.c
+++ b/src/xkb/XKBleds.c
@@ -24,23 +24,17 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBleds.c,v 1.3 2001/02/21 15:18:03 tsi Exp $ */
+/* $XFree86: xc/lib/X11/XKBleds.c,v 1.5 2003/11/17 22:20:10 dawes Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
+#define NEED_MAP_READERS
#include "Xlibint.h"
#include <X11/extensions/XKBproto.h>
#include "XKBlibint.h"
Status
-#if NeedFunctionPrototypes
XkbGetIndicatorState(Display *dpy,unsigned deviceSpec,unsigned *pStateRtrn)
-#else
-XkbGetIndicatorState(dpy,deviceSpec,pStateRtrn)
- Display * dpy;
- unsigned int deviceSpec;
- unsigned int * pStateRtrn;
-#endif
{
register xkbGetIndicatorStateReq *req;
xkbGetIndicatorStateReply rep;
@@ -65,18 +59,10 @@ XkbGetIndicatorState(dpy,deviceSpec,pStateRtrn)
}
Status
-#if NeedFunctionPrototypes
_XkbReadGetIndicatorMapReply( Display * dpy,
xkbGetIndicatorMapReply * rep,
XkbDescPtr xkb,
int * nread_rtrn)
-#else
-_XkbReadGetIndicatorMapReply(dpy,rep,xkb,nread_rtrn)
- Display * dpy;
- xkbGetIndicatorMapReply * rep;
- XkbDescPtr xkb;
- int * nread_rtrn;
-#endif
{
XkbIndicatorPtr leds;
XkbReadBufferRec buf;
@@ -123,14 +109,7 @@ XkbReadBufferRec buf;
}
Bool
-#if NeedFunctionPrototypes
XkbGetIndicatorMap(Display *dpy,unsigned long which,XkbDescPtr xkb)
-#else
-XkbGetIndicatorMap(dpy,which,xkb)
- Display * dpy;
- unsigned long which;
- XkbDescPtr xkb;
-#endif
{
register xkbGetIndicatorMapReq * req;
xkbGetIndicatorMapReply rep;
@@ -170,14 +149,7 @@ XkbGetIndicatorMap(dpy,which,xkb)
}
Bool
-#if NeedFunctionPrototypes
XkbSetIndicatorMap(Display *dpy,unsigned long which,XkbDescPtr xkb)
-#else
-XkbSetIndicatorMap(dpy,which,xkb)
- Display * dpy;
- unsigned long which;
- XkbDescPtr xkb;
-#endif
{
register xkbSetIndicatorMapReq *req;
register int i,bit;
@@ -222,7 +194,6 @@ XkbSetIndicatorMap(dpy,which,xkb)
}
Bool
-#if NeedFunctionPrototypes
XkbGetNamedDeviceIndicator( Display * dpy,
unsigned device,
unsigned class,
@@ -232,19 +203,6 @@ XkbGetNamedDeviceIndicator( Display * dpy,
Bool * pStateRtrn,
XkbIndicatorMapPtr pMapRtrn,
Bool * pRealRtrn)
-#else
-XkbGetNamedDeviceIndicator(dpy,device,class,id,name,pNdxRtrn,pStateRtrn,
- pMapRtrn,pRealRtrn)
- Display * dpy;
- unsigned device;
- unsigned class;
- unsigned id;
- Atom name;
- int * pNdxRtrn;
- Bool * pStateRtrn;
- XkbIndicatorMapPtr pMapRtrn;
- Bool * pRealRtrn;
-#endif
{
register xkbGetNamedIndicatorReq *req;
xkbGetNamedIndicatorReply rep;
@@ -289,22 +247,12 @@ XkbGetNamedDeviceIndicator(dpy,device,class,id,name,pNdxRtrn,pStateRtrn,
}
Bool
-#if NeedFunctionPrototypes
XkbGetNamedIndicator( Display * dpy,
Atom name,
int * pNdxRtrn,
Bool * pStateRtrn,
XkbIndicatorMapPtr pMapRtrn,
Bool * pRealRtrn)
-#else
-XkbGetNamedIndicator(dpy,name,pNdxRtrn,pStateRtrn,pMapRtrn,pRealRtrn)
- Display * dpy;
- Atom name;
- int * pNdxRtrn;
- Bool * pStateRtrn;
- XkbIndicatorMapPtr pMapRtrn;
- Bool * pRealRtrn;
-#endif
{
return XkbGetNamedDeviceIndicator(dpy,XkbUseCoreKbd,
XkbDfltXIClass,XkbDfltXIId,
@@ -313,7 +261,6 @@ XkbGetNamedIndicator(dpy,name,pNdxRtrn,pStateRtrn,pMapRtrn,pRealRtrn)
}
Bool
-#if NeedFunctionPrototypes
XkbSetNamedDeviceIndicator( Display * dpy,
unsigned device,
unsigned class,
@@ -323,19 +270,6 @@ XkbSetNamedDeviceIndicator( Display * dpy,
Bool state,
Bool createNewMap,
XkbIndicatorMapPtr pMap)
-#else
-XkbSetNamedDeviceIndicator(dpy,device,class,id,name,changeState,
- state,createNewMap,pMap)
- Display * dpy;
- unsigned device;
- unsigned class;
- unsigned id;
- Atom name;
- Bool changeState;
- Bool state;
- Bool createNewMap;
- XkbIndicatorMapPtr pMap;
-#endif
{
register xkbSetNamedIndicatorReq *req;
XkbInfoPtr xkbi;
@@ -384,22 +318,12 @@ XkbSetNamedDeviceIndicator(dpy,device,class,id,name,changeState,
}
Bool
-#if NeedFunctionPrototypes
XkbSetNamedIndicator( Display * dpy,
Atom name,
Bool changeState,
Bool state,
Bool createNewMap,
XkbIndicatorMapPtr pMap)
-#else
-XkbSetNamedIndicator(dpy,name,changeState,state,createNewMap,pMap)
- Display * dpy;
- Atom name;
- Bool changeState;
- Bool state;
- Bool createNewMap;
- XkbIndicatorMapPtr pMap;
-#endif
{
return XkbSetNamedDeviceIndicator(dpy,XkbUseCoreKbd,
XkbDfltXIClass,XkbDfltXIId,
diff --git a/src/xkb/XKBlibint.h b/src/xkb/XKBlibint.h
index b287cf6..06d8d48 100644
--- a/src/xkb/XKBlibint.h
+++ b/src/xkb/XKBlibint.h
@@ -24,7 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/lib/X11/XKBlibint.h,v 3.4 2001/01/17 19:41:49 dawes Exp $ */
+/* $XFree86: xc/lib/X11/XKBlibint.h,v 3.6 2003/11/17 22:20:10 dawes Exp $ */
#ifndef _XKBLIBINT_H_
#define _XKBLIBINT_H_
@@ -36,28 +36,22 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XkbXlibNewKeyboard (1<<1)
typedef int (*XkbKSToMBFunc)(
-#if NeedFunctionPrototypes
XPointer /* priv */,
KeySym /* sym */,
char * /* buf */,
int /* len */,
int * /* extra_rtrn */
-#endif
);
typedef KeySym (*XkbMBToKSFunc)(
-#if NeedFunctionPrototypes
XPointer /* priv */,
char * /* buf */,
int /* len */,
Status * /* status */
-#endif
);
typedef KeySym (*XkbToUpperFunc)(
-#if NeedFunctionPrototypes
KeySym /* sym */
-#endif
);
typedef struct _XkbConverters {
@@ -141,131 +135,103 @@ typedef struct _XkbReadBuffer {
_XFUNCPROTOBEGIN
extern void _XkbReloadDpy(
-#if NeedFunctionPrototypes
Display * /* dpy */
-#endif
);
extern KeySym _XKeycodeToKeysym(
-#if NeedFunctionPrototypes
Display* /* display */,
+#if NeedWidePrototypes
+ unsigned int /* keycode */,
+#else
KeyCode /* keycode */,
- int /* index */
#endif
+ int /* index */
);
extern KeyCode _XKeysymToKeycode(
-#if NeedFunctionPrototypes
Display* /* display */,
KeySym /* keysym */
-#endif
);
extern KeySym _XLookupKeysym(
-#if NeedFunctionPrototypes
XKeyEvent* /* key_event */,
int /* index */
-#endif
);
extern int _XRefreshKeyboardMapping(
-#if NeedFunctionPrototypes
XMappingEvent* /* event_map */
-#endif
);
extern unsigned _XKeysymToModifiers(
-#if NeedFunctionPrototypes
Display * /* dpy */,
KeySym /* ks */
-#endif
);
extern int _XTranslateKey(
-#if NeedFunctionPrototypes
register Display * /* dpy */,
KeyCode /* keycode */,
register unsigned int /* modifiers */,
unsigned int * /* modifiers_return */,
KeySym * /* keysym_return */
-#endif
);
extern int _XTranslateKeySym(
-#if NeedFunctionPrototypes
Display * /* dpy */,
register KeySym /* symbol */,
unsigned int /* modifiers */,
char * /* buffer */,
int /* nbytes */
-#endif
);
extern int _XLookupString(
-#if NeedFunctionPrototypes
register XKeyEvent * /* event */,
char * /* buffer */,
int /* nbytes */,
KeySym * /* keysym */,
XComposeStatus * /* status */
-#endif
);
extern void _XkbNoteCoreMapChanges(
-#if NeedFunctionPrototypes
XkbMapChangesRec * /* old */,
XMappingEvent * /* new */,
unsigned int /* wanted */
-#endif
);
extern int _XkbInitReadBuffer(
-#if NeedFunctionPrototypes
Display * /* dpy */,
XkbReadBufferPtr /* buf */,
int /* size */
-#endif
);
extern int _XkbSkipReadBufferData(
-#if NeedFunctionPrototypes
XkbReadBufferPtr /* from */,
int /* size */
-#endif
);
extern int _XkbCopyFromReadBuffer(
-#if NeedFunctionPrototypes
XkbReadBufferPtr /* from */,
char * /* to */,
int /* size */
-#endif
);
#if defined(WORD64) || defined(LONG64)
extern int _XkbReadCopyData32(
-#if NeedFunctionPrototypes
int * /* from */,
long * /* to */,
int /* num_words */
-#endif
);
extern int _XkbWriteCopyData32(
-#if NeedFunctionPrototypes
unsigned long * /* from */,
CARD32 * /* to */,
int /* num_words */
-#endif
);
extern int _XkbReadBufferCopy32(
-#if NeedFunctionPrototypes
XkbReadBufferPtr /* from */,
long * /* to */,
int /* size */
-#endif
);
#else
#define _XkbReadCopyData32(f,t,s) memcpy((char *)(t),(char *)(f),(s)*4)
@@ -279,23 +245,18 @@ extern int _XkbReadBufferCopy32(
#ifdef XKB_FORCE_INT_KEYSYM
extern int _XkbReadCopyKeySyms(
-#if NeedFunctionPrototypes
int * /* from */,
KeySym * /* to */,
int /* num_words */
-#endif
);
extern int _XkbWriteCopyKeySyms(
-#if NeedFunctionPrototypes
KeySym * /* from */,
CARD32 * /* to */,
int /* num_words */
-#endif
);
extern int _XkbReadBufferCopyKeySyms(
-#if NeedFunctionPrototypes
XkbReadBufferPtr /* from */,
#ifndef NO_DEC_BUG_FIX
KeySym * /* to */,
@@ -303,7 +264,6 @@ extern int _XkbReadBufferCopyKeySyms(
long * /* to */,
#endif
int /* size */
-#endif
);
#else
#define _XkbReadCopyKeySyms(f,t,n) _XkbReadCopyData32(f,t,n)
@@ -312,92 +272,70 @@ extern int _XkbReadBufferCopyKeySyms(
#endif
extern char *_XkbPeekAtReadBuffer(
-#if NeedFunctionPrototypes
XkbReadBufferPtr /* from */,
int /* size */
-#endif
);
extern char *_XkbGetReadBufferPtr(
-#if NeedFunctionPrototypes
XkbReadBufferPtr /* from */,
int /* size */
-#endif
);
#define _XkbGetTypedRdBufPtr(b,n,t) ((t *)_XkbGetReadBufferPtr(b,(n)*SIZEOF(t)))
extern int _XkbFreeReadBuffer(
-#if NeedFunctionPrototypes
XkbReadBufferPtr /* buf */
-#endif
);
extern Bool
_XkbGetReadBufferCountedString(
-#if NeedFunctionPrototypes
XkbReadBufferPtr /* buf */,
char ** /* rtrn */
-#endif
);
extern char *_XkbGetCharset(
-#if NeedFunctionPrototypes
void
-#endif
);
extern int _XkbGetConverters(
-#if NeedFunctionPrototypes
char * /* encoding_name */,
XkbConverters * /* cvt_rtrn */
-#endif
);
#ifdef NEED_MAP_READERS
extern Status _XkbReadGetMapReply(
-#if NeedFunctionPrototypes
Display * /* dpy */,
xkbGetMapReply * /* rep */,
XkbDescRec * /* xkb */,
int * /* nread_rtrn */
-#endif
);
extern Status _XkbReadGetCompatMapReply(
-#if NeedFunctionPrototypes
Display * /* dpy */,
xkbGetCompatMapReply * /* rep */,
XkbDescPtr /* xkb */,
int * /* nread_rtrn */
-#endif
);
extern Status _XkbReadGetIndicatorMapReply(
-#if NeedFunctionPrototypes
Display * /* dpy */,
xkbGetIndicatorMapReply * /* rep */,
XkbDescPtr /* xkb */,
int * /* nread_rtrn */
-#endif
);
extern Status _XkbReadGetNamesReply(
-#if NeedFunctionPrototypes
Display * /* dpy */,
xkbGetNamesReply * /* rep */,
XkbDescPtr /* xkb */,
int * /* nread_rtrn */
-#endif
);
extern Status _XkbReadGetGeometryReply(
-#if NeedFunctionPrototypes
Display * /* dpy */,
xkbGetGeometryReply * /* rep */,
XkbDescPtr /* xkb */,
int * /* nread_rtrn */
-#endif
);
#endif