diff options
Diffstat (limited to 'xkb/xkbtext.c')
-rw-r--r-- | xkb/xkbtext.c | 267 |
1 files changed, 1 insertions, 266 deletions
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c index d233af0b4..fc593e796 100644 --- a/xkb/xkbtext.c +++ b/xkb/xkbtext.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.11 2002/12/21 18:49:02 paulo Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbtext.c,v 3.12 2003/11/17 22:20:24 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -64,12 +64,7 @@ static char textBuffer[BUFFER_SIZE]; static int tbNext= 0; static char * -#if NeedFunctionPrototypes tbGetBuffer(unsigned size) -#else -tbGetBuffer(size) - unsigned size; -#endif { char *rtrn; @@ -85,14 +80,7 @@ char *rtrn; /***====================================================================***/ char * -#if NeedFunctionPrototypes XkbAtomText(Display *dpy,Atom atm,unsigned format) -#else -XkbAtomText(dpy,atm,format) - Display * dpy; - Atom atm; - unsigned format; -#endif { char *rtrn,*tmp; @@ -124,15 +112,7 @@ char *rtrn,*tmp; /***====================================================================***/ char * -#if NeedFunctionPrototypes XkbVModIndexText(Display *dpy,XkbDescPtr xkb,unsigned ndx,unsigned format) -#else -XkbVModIndexText(dpy,xkb,ndx,format) - Display * dpy; - XkbDescPtr xkb; - unsigned ndx; - unsigned format; -#endif { register int len; register Atom *vmodNames; @@ -166,20 +146,11 @@ char numBuf[20]; } char * -#if NeedFunctionPrototypes XkbVModMaskText( Display * dpy, XkbDescPtr xkb, unsigned modMask, unsigned mask, unsigned format) -#else -XkbVModMaskText(dpy,xkb,modMask,mask,format) - Display * dpy; - XkbDescPtr xkb; - unsigned modMask; - unsigned mask; - unsigned format; -#endif { register int i,bit; int len; @@ -258,13 +229,7 @@ static char *modNames[XkbNumModifiers] = { }; char * -#if NeedFunctionPrototypes XkbModIndexText(unsigned ndx,unsigned format) -#else -XkbModIndexText(ndx,format) - unsigned ndx; - unsigned format; -#endif { char * rtrn; char buf[100]; @@ -289,13 +254,7 @@ char buf[100]; } char * -#if NeedFunctionPrototypes XkbModMaskText(unsigned mask,unsigned format) -#else -XkbModMaskText(mask,format) - unsigned mask; - unsigned format; -#endif { register int i,bit; char buf[64],*rtrn; @@ -335,13 +294,7 @@ char buf[64],*rtrn; /*ARGSUSED*/ char * -#if NeedFunctionPrototypes XkbConfigText(unsigned config,unsigned format) -#else -XkbConfigText(config,format) - unsigned config; - unsigned format; -#endif { static char *buf; @@ -388,13 +341,7 @@ static char *buf; /***====================================================================***/ char * -#if NeedFunctionPrototypes XkbKeysymText(KeySym sym,unsigned format) -#else -XkbKeysymText(sym,format) - KeySym sym; - unsigned format; -#endif { static char buf[32],*rtrn; @@ -417,13 +364,7 @@ static char buf[32],*rtrn; } char * -#if NeedFunctionPrototypes XkbKeyNameText(char *name,unsigned format) -#else -XkbKeyNameText(name,format) - char * name; - unsigned format; -#endif { char *buf; @@ -452,13 +393,7 @@ static char *siMatchText[5] = { }; char * -#if NeedFunctionPrototypes XkbSIMatchText(unsigned type,unsigned format) -#else -XkbSIMatchText(type,format) - unsigned type; - unsigned format; -#endif { static char buf[40]; char *rtrn; @@ -492,13 +427,7 @@ static char *imWhichNames[]= { }; char * -#if NeedFunctionPrototypes XkbIMWhichStateMaskText(unsigned use_which,unsigned format) -#else -XkbIMWhichStateMaskText(use_which,format) - unsigned use_which; - unsigned format; -#endif { int len; unsigned i,bit,tmp; @@ -541,13 +470,7 @@ char * buf; } char * -#if NeedFunctionPrototypes XkbAccessXDetailText(unsigned state,unsigned format) -#else -XkbAccessXDetailText(state,format) - unsigned state; - unsigned format; -#endif { char *buf,*prefix; @@ -573,13 +496,7 @@ static char *nknNames[] = { #define NUM_NKN (sizeof(nknNames)/sizeof(char *)) char * -#if NeedFunctionPrototypes XkbNKNDetailMaskText(unsigned detail,unsigned format) -#else -XkbNKNDetailMaskText(detail,format) - unsigned detail; - unsigned format; -#endif { char *buf,*prefix,*suffix; register int i; @@ -663,13 +580,7 @@ static char *ctrlNames[] = { }; char * -#if NeedFunctionPrototypes XkbControlsMaskText(unsigned ctrls,unsigned format) -#else -XkbControlsMaskText(ctrls,format) - unsigned ctrls; - unsigned format; -#endif { int len; unsigned i,bit,tmp; @@ -716,13 +627,7 @@ char * buf; /***====================================================================***/ char * -#if NeedFunctionPrototypes XkbStringText(char *str,unsigned format) -#else -XkbStringText(str,format) - char * str; - unsigned format; -#endif { char * buf; register char *in,*out; @@ -782,13 +687,7 @@ Bool ok; /***====================================================================***/ char * -#if NeedFunctionPrototypes XkbGeomFPText(int val,unsigned format) -#else -XkbGeomFPText(val,format) - int val; - unsigned format; -#endif { int whole,frac; char * buf; @@ -808,13 +707,7 @@ char * buf; } char * -#if NeedFunctionPrototypes XkbDoodadTypeText(unsigned type,unsigned format) -#else -XkbDoodadTypeText(type,format) - unsigned type; - unsigned format; -#endif { char * buf; if (format==XkbCFile) { @@ -854,13 +747,7 @@ static char *actionTypeNames[XkbSA_NumActions]= { }; char * -#if NeedFunctionPrototypes XkbActionTypeText(unsigned type,unsigned format) -#else -XkbActionTypeText(type,format) - unsigned type; - unsigned format; -#endif { static char buf[32]; char *rtrn; @@ -880,14 +767,7 @@ char *rtrn; /***====================================================================***/ static int -#if NeedFunctionPrototypes TryCopyStr(char *to,char *from,int *pLeft) -#else -TryCopyStr(to,from,pLeft) - char * to; - char * from; - int * pLeft; -#endif { register int len; if (*pLeft>0) { @@ -904,32 +784,14 @@ register int len; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopyNoActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int*sz) -#else -CopyNoActionArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { return True; } static Bool -#if NeedFunctionPrototypes CopyModActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, int* sz) -#else -CopyModActionArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbModAction * act; unsigned tmp; @@ -956,17 +818,8 @@ unsigned tmp; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopyGroupActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) -#else -CopyGroupActionArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbGroupAction * act; char tbuf[32]; @@ -990,16 +843,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopyMovePtrArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) -#else -CopyMovePtrArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbPtrAction * act; int x,y; @@ -1024,16 +868,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopyPtrBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) -#else -CopyPtrBtnArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbPtrBtnAction * act; char tbuf[32]; @@ -1067,17 +902,8 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopySetPtrDfltArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) -#else -CopySetPtrDfltArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbPtrDfltAction * act; char tbuf[32]; @@ -1094,16 +920,7 @@ char tbuf[32]; } static Bool -#if NeedFunctionPrototypes CopyISOLockArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) -#else -CopyISOLockArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbISOAction * act; char tbuf[64]; @@ -1165,17 +982,8 @@ char tbuf[64]; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopySwitchScreenArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) -#else -CopySwitchScreenArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbSwitchScreenAction * act; char tbuf[32]; @@ -1193,17 +1001,8 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopySetLockControlsArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action, char *buf,int *sz) -#else -CopySetLockControlsArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbCtrlsAction * act; unsigned tmp; @@ -1289,17 +1088,8 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopyActionMessageArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) -#else -CopyActionMessageArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbMessageAction * act; unsigned all; @@ -1325,17 +1115,8 @@ char tbuf[32]; } static Bool -#if NeedFunctionPrototypes CopyRedirectKeyArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) -#else -CopyRedirectKeyArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbRedirectKeyAction * act; char tbuf[32],*tmp; @@ -1381,17 +1162,8 @@ unsigned vmods,vmods_mask; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopyDeviceBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) -#else -CopyDeviceBtnArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbDeviceBtnAction * act; char tbuf[32]; @@ -1423,16 +1195,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes CopyOtherArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) -#else -CopyOtherArgs(dpy,xkb,action,buf,sz) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - char * buf; - int * sz; -#endif { XkbAnyAction * act; char tbuf[32]; @@ -1450,13 +1213,11 @@ char tbuf[32]; } typedef Bool (*actionCopy)( -#if NeedFunctionPrototypes Display * /* dpy */, XkbDescPtr /* xkb */, XkbAction * /* action */, char * /* buf */, int* /* sz */ -#endif ); static actionCopy copyActionArgs[XkbSA_NumActions] = { CopyNoActionArgs /* NoAction */, @@ -1484,15 +1245,7 @@ static actionCopy copyActionArgs[XkbSA_NumActions] = { #define ACTION_SZ 256 char * -#if NeedFunctionPrototypes XkbActionText(Display *dpy,XkbDescPtr xkb,XkbAction *action,unsigned format) -#else -XkbActionText(dpy,xkb,action,format) - Display * dpy; - XkbDescPtr xkb; - XkbAction * action; - unsigned format; -#endif { char buf[ACTION_SZ],*tmp; int sz; @@ -1520,14 +1273,7 @@ int sz; } char * -#if NeedFunctionPrototypes XkbBehaviorText(XkbDescPtr xkb,XkbBehavior *behavior,unsigned format) -#else -XkbBehaviorText(xkb,behavior,format) - XkbDescPtr xkb; - XkbBehavior * behavior; - unsigned format; -#endif { char buf[256],*tmp; @@ -1584,12 +1330,7 @@ char buf[256],*tmp; /***====================================================================***/ char * -#if NeedFunctionPrototypes XkbIndentText(unsigned size) -#else -XkbIndentText(size) - unsigned size; -#endif { static char buf[32]; register int i; @@ -1611,13 +1352,7 @@ register int i; #define PIXEL_MAX 65535 Bool -#if NeedFunctionPrototypes XkbLookupCanonicalRGBColor(char *def,XColor *color) -#else -XkbLookupCanonicalRGBColor(def,color) - char * def; - XColor * color; -#endif { int tmp; |