diff options
author | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-03-18 16:31:19 -0400 |
---|---|---|
committer | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-03-20 18:37:02 -0400 |
commit | 021fc5cb2cb4a7972b4a6fcb570c1da92787d68d (patch) | |
tree | 58063be57aef43d15f51822264d4a7a789ee7c77 /xkb/xkbtext.c | |
parent | 9398d62f27ee1b287e4458fd8b011c10f7b59efd (diff) |
Static markup and dead code cull over xkb/.
The former <X11/extensions/XKBsrv.h> has been pulled into the server now as
include/xkbsrv.h, and the world updated to look for it in the new place,
since it made no sense to define server API in an extension header. Any
further work along this line will need to do similar things with XKBgeom.h
and friends.
Diffstat (limited to 'xkb/xkbtext.c')
-rw-r--r-- | xkb/xkbtext.c | 96 |
1 files changed, 1 insertions, 95 deletions
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c index defd45a64..3a5037150 100644 --- a/xkb/xkbtext.c +++ b/xkb/xkbtext.c @@ -44,7 +44,7 @@ #include "dix.h" #include <X11/extensions/XKBstr.h> #define XKBSRV_NEED_FILE_FUNCS 1 -#include <X11/extensions/XKBsrv.h> +#include <xkbsrv.h> #include <X11/extensions/XKBgeom.h> /***====================================================================***/ @@ -448,100 +448,6 @@ char * buf; return buf; } -char * -XkbAccessXDetailText(unsigned state,unsigned format) -{ -char *buf,*prefix; - - buf= tbGetBuffer(32); - if (format==XkbMessage) prefix= ""; - else prefix= "XkbAXN_"; - switch (state){ - case XkbAXN_SKPress: sprintf(buf,"%sSKPress",prefix); break; - case XkbAXN_SKAccept: sprintf(buf,"%sSKAccept",prefix); break; - case XkbAXN_SKRelease: sprintf(buf,"%sSKRelease",prefix); break; - case XkbAXN_SKReject: sprintf(buf,"%sSKReject",prefix); break; - case XkbAXN_BKAccept: sprintf(buf,"%sBKAccept",prefix); break; - case XkbAXN_BKReject: sprintf(buf,"%sBKReject",prefix); break; - case XkbAXN_AXKWarning: sprintf(buf,"%sAXKWarning",prefix); break; - default: sprintf(buf,"ILLEGAL"); break; - } - return buf; -} - -static char *nknNames[] = { - "keycodes", "geometry", "deviceID" -}; -#define NUM_NKN (sizeof(nknNames)/sizeof(char *)) - -char * -XkbNKNDetailMaskText(unsigned detail,unsigned format) -{ -char *buf,*prefix,*suffix; -register int i; -register unsigned bit; -int len,plen,slen; - - - if ((detail&XkbAllNewKeyboardEventsMask)==0) { - char *tmp = ""; - if (format==XkbCFile) tmp= "0"; - else if (format==XkbMessage) tmp= "none"; - buf= tbGetBuffer(strlen(tmp)+1); - strcpy(buf,tmp); - return buf; - } - else if ((detail&XkbAllNewKeyboardEventsMask)==XkbAllNewKeyboardEventsMask){ - char * tmp; - if (format==XkbCFile) tmp= "XkbAllNewKeyboardEventsMask"; - else tmp= "all"; - buf= tbGetBuffer(strlen(tmp)+1); - strcpy(buf,tmp); - return buf; - } - if (format==XkbMessage) { - prefix= ""; - suffix= ""; - slen= plen= 0; - } - else { - prefix= "XkbNKN_"; - plen= 7; - if (format==XkbCFile) - suffix= "Mask"; - else suffix= ""; - slen= strlen(suffix); - } - for (len=0,i=0,bit=1;i<NUM_NKN;i++,bit<<=1) { - if (detail&bit) { - if (len!=0) len+= 1; /* room for '+' or '|' */ - len+= plen+slen+strlen(nknNames[i]); - } - } - buf= tbGetBuffer(len+1); - buf[0]= '\0'; - for (len=0,i=0,bit=1;i<NUM_NKN;i++,bit<<=1) { - if (detail&bit) { - if (len!=0) { - if (format==XkbCFile) buf[len++]= '|'; - else buf[len++]= '+'; - } - if (plen) { - strcpy(&buf[len],prefix); - len+= plen; - } - strcpy(&buf[len],nknNames[i]); - len+= strlen(nknNames[i]); - if (slen) { - strcpy(&buf[len],suffix); - len+= slen; - } - } - } - buf[len++]= '\0'; - return buf; -} - static char *ctrlNames[] = { "repeatKeys", "slowKeys", |