diff options
Diffstat (limited to 'lib/libxkbfile/src')
-rw-r--r-- | lib/libxkbfile/src/Makefile.in | 31 | ||||
-rw-r--r-- | lib/libxkbfile/src/XKBfileInt.h | 19 | ||||
-rw-r--r-- | lib/libxkbfile/src/cout.c | 18 | ||||
-rw-r--r-- | lib/libxkbfile/src/maprules.c | 44 | ||||
-rw-r--r-- | lib/libxkbfile/src/srvmisc.c | 18 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkbatom.c | 30 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkbbells.c | 2 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkbconfig.c | 56 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkbdraw.c | 18 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkberrs.c | 4 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkbmisc.c | 40 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkbout.c | 30 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkbtext.c | 46 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkmout.c | 26 | ||||
-rw-r--r-- | lib/libxkbfile/src/xkmread.c | 24 |
15 files changed, 206 insertions, 200 deletions
diff --git a/lib/libxkbfile/src/Makefile.in b/lib/libxkbfile/src/Makefile.in index e4333e304..e4627b711 100644 --- a/lib/libxkbfile/src/Makefile.in +++ b/lib/libxkbfile/src/Makefile.in @@ -24,9 +24,9 @@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c +install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 +install_sh_PROGRAM = ${SHELL} $(install_sh) -c +install_sh_SCRIPT = ${SHELL} $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -94,6 +94,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -101,24 +102,20 @@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ @@ -127,23 +124,30 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +NM = @NM@ NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -156,18 +160,17 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XKBFILE_CFLAGS = @XKBFILE_CFLAGS@ XKBFILE_LIBS = @XKBFILE_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ diff --git a/lib/libxkbfile/src/XKBfileInt.h b/lib/libxkbfile/src/XKBfileInt.h index 71d78343e..e810e6131 100644 --- a/lib/libxkbfile/src/XKBfileInt.h +++ b/lib/libxkbfile/src/XKBfileInt.h @@ -9,19 +9,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -75,6 +75,7 @@ char *_XkbDupString(const char *s) extern int _XkbStrCaseCmp(char *s1, char *s2); #else #define _XkbStrCaseCmp strcasecmp +#include <strings.h> #endif _XFUNCPROTOEND diff --git a/lib/libxkbfile/src/cout.c b/lib/libxkbfile/src/cout.c index 9048031b4..399512f0e 100644 --- a/lib/libxkbfile/src/cout.c +++ b/lib/libxkbfile/src/cout.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/lib/libxkbfile/src/maprules.c b/lib/libxkbfile/src/maprules.c index 29f13a447..81102a3e1 100644 --- a/lib/libxkbfile/src/maprules.c +++ b/lib/libxkbfile/src/maprules.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -238,8 +238,8 @@ Bool endOfFile,spacePending,slashPending,inComment; #define PART_MASK 0x000F #define COMPONENT_MASK 0x03F0 -static char * cname[MAX_WORDS] = { - "model", "layout", "variant", "option", +static const char * cname[MAX_WORDS] = { + "model", "layout", "variant", "option", "keycodes", "symbols", "types", "compat", "geometry", "keymap" }; @@ -554,7 +554,7 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec)); mdefs->model = defs->model; mdefs->options = _XkbDupString(defs->options); - if (mdefs->options) squeeze_spaces(mdefs->options); + if (mdefs->options) squeeze_spaces(mdefs->options); if (defs->layout) { if (!strchr(defs->layout, ',')) { @@ -902,7 +902,7 @@ XkbRF_GetComponents( XkbRF_RulesPtr rules, if (names->keycodes) names->keycodes= XkbRF_SubstituteVars(names->keycodes, &mdefs); - if (names->symbols) + if (names->symbols) names->symbols= XkbRF_SubstituteVars(names->symbols, &mdefs); if (names->types) names->types= XkbRF_SubstituteVars(names->types, &mdefs); @@ -910,7 +910,7 @@ XkbRF_GetComponents( XkbRF_RulesPtr rules, names->compat= XkbRF_SubstituteVars(names->compat, &mdefs); if (names->geometry) names->geometry= XkbRF_SubstituteVars(names->geometry, &mdefs); - if (names->keymap) + if (names->keymap) names->keymap= XkbRF_SubstituteVars(names->keymap, &mdefs); FreeMultiDefs(&mdefs); @@ -1072,7 +1072,7 @@ XkbRF_VarDescPtr nd; return nd; } -XkbRF_DescribeVarsPtr +XkbRF_DescribeVarsPtr XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name) { if (rules->sz_extra<1) { @@ -1252,14 +1252,14 @@ XkbRF_RulesPtr rules; } XkbRF_RulesPtr -XkbRF_Create(int szRules,int szExtra) +XkbRF_Create(int szRules,int szExtra) { XkbRF_RulesPtr rules; if ((rules=_XkbTypedCalloc(1,XkbRF_RulesRec))==NULL) return NULL; if (szRules>0) { - rules->sz_rules= szRules; + rules->sz_rules= szRules; rules->rules= _XkbTypedCalloc(rules->sz_rules,XkbRF_RuleRec); if (!rules->rules) { _XkbFree(rules); @@ -1267,7 +1267,7 @@ XkbRF_RulesPtr rules; } } if (szExtra>0) { - rules->sz_extra= szExtra; + rules->sz_extra= szExtra; rules->extra= _XkbTypedCalloc(rules->sz_extra,XkbRF_DescribeVarsRec); if (!rules->extra) { if (rules->rules) @@ -1285,7 +1285,7 @@ static void XkbRF_ClearVarDescriptions(XkbRF_DescribeVarsPtr var) { register int i; - + for (i=0;i<var->num_desc;i++) { if (var->desc[i].name) _XkbFree(var->desc[i].name); @@ -1355,7 +1355,7 @@ XkbRF_GroupPtr group; #ifndef XKB_IN_SERVER -Bool +Bool XkbRF_GetNamesProp(Display *dpy,char **rf_rtrn,XkbRF_VarDefsPtr vd_rtrn) { Atom rules_atom,actual_type; @@ -1367,7 +1367,7 @@ Status rtrn; rules_atom= XInternAtom(dpy,_XKB_RF_NAMES_PROP_ATOM,True); if (rules_atom==None) /* property cannot exist */ - return False; + return False; rtrn= XGetWindowProperty(dpy,DefaultRootWindow(dpy),rules_atom, 0L,_XKB_RF_NAMES_PROP_MAXLEN,False, XA_STRING,&actual_type, @@ -1417,7 +1417,7 @@ Status rtrn; return True; } -Bool +Bool XkbRF_SetNamesProp(Display *dpy,char *rules_file,XkbRF_VarDefsPtr var_defs) { int len,out; diff --git a/lib/libxkbfile/src/srvmisc.c b/lib/libxkbfile/src/srvmisc.c index 8624c1bb5..478d37346 100644 --- a/lib/libxkbfile/src/srvmisc.c +++ b/lib/libxkbfile/src/srvmisc.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/lib/libxkbfile/src/xkbatom.c b/lib/libxkbfile/src/xkbatom.c index 8abfddb07..b60e90ee8 100644 --- a/lib/libxkbfile/src/xkbatom.c +++ b/lib/libxkbfile/src/xkbatom.c @@ -27,13 +27,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -53,19 +53,19 @@ SOFTWARE. fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -102,7 +102,7 @@ static NodePtr atomRoot = (NodePtr)NULL; static unsigned long tableLength; static NodePtr *nodeTable; -static Atom +static Atom _XkbMakeAtom(char *string,unsigned len,Bool makeit) { register NodePtr * np; @@ -188,7 +188,7 @@ _XkbInitAtoms(void) nodeTable = (NodePtr *)_XkbAlloc(InitialTableSize*sizeof(NodePtr)); nodeTable[None] = (NodePtr)NULL; } - + /***====================================================================***/ char * diff --git a/lib/libxkbfile/src/xkbbells.c b/lib/libxkbfile/src/xkbbells.c index 1571d1e0e..10b2725a7 100644 --- a/lib/libxkbfile/src/xkbbells.c +++ b/lib/libxkbfile/src/xkbbells.c @@ -31,7 +31,7 @@ #include <X11/XKBlib.h> #include "XKBbells.h" -static char *_xkbStdBellNames[XkbBI_NumBells] = { +static const char *_xkbStdBellNames[XkbBI_NumBells] = { "Info", "Warning", "MinorError", diff --git a/lib/libxkbfile/src/xkbconfig.c b/lib/libxkbfile/src/xkbconfig.c index 6e92bef6e..b60017fae 100644 --- a/lib/libxkbfile/src/xkbconfig.c +++ b/lib/libxkbfile/src/xkbconfig.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -101,7 +101,7 @@ int ch,nInBuf; else if ( ch == '0' ) { int tmp,stop; ch = stop = 0; - if (((tmp=getc(file))!=EOF) && (isdigit(tmp)) && + if (((tmp=getc(file))!=EOF) && (isdigit(tmp)) && (tmp!='8') && (tmp!='9')) { ch= (ch*8)+(tmp-'0'); } @@ -109,7 +109,7 @@ int ch,nInBuf; stop= 1; ungetc(tmp,file); } - if ((!stop) && ((tmp=getc(file))!=EOF) && (isdigit(tmp)) && + if ((!stop) && ((tmp=getc(file))!=EOF) && (isdigit(tmp)) && (tmp!='8') && (tmp!='9')) { ch= (ch*8)+(tmp-'0'); } @@ -117,7 +117,7 @@ int ch,nInBuf; stop= 1; ungetc(tmp,file); } - if ((!stop) && ((tmp=getc(file))!=EOF) && (isdigit(tmp)) && + if ((!stop) && ((tmp=getc(file))!=EOF) && (isdigit(tmp)) && (tmp!='8') && (tmp!='9')) { ch= (ch*8)+(tmp-'0'); } @@ -130,7 +130,7 @@ int ch,nInBuf; else return XkbCF_EOF; } - if ( nInBuf < XKBCF_MAX_STR_LEN-1 ) + if ( nInBuf < XKBCF_MAX_STR_LEN-1 ) _XkbCF_rtrn[nInBuf++] = ch; } if ( ch == quote ) { @@ -155,7 +155,7 @@ int i; return XkbCF_Unknown; } -int +int XkbCFScan(FILE *file,XkbCFScanResultPtr val_rtrn,XkbConfigRtrnPtr rtrn) { int ch; @@ -220,7 +220,7 @@ int ch; #define _XkbCF_Layout 10 #define _XkbCF_Variant 11 #define _XkbCF_Options 12 - + #define _XkbCF_InitialMods 13 #define _XkbCF_InitialCtrls 14 @@ -732,7 +732,7 @@ unsigned what; } } break; - case _XkbCF_ClickVolume: + case _XkbCF_ClickVolume: if (!pival) { pival= &rtrn->click_volume; onoff= 100; @@ -752,31 +752,31 @@ unsigned what; if (!pival) pival= &rtrn->repeat_delay; case _XkbCF_RepeatInterval: - if (!pival) + if (!pival) pival= &rtrn->repeat_interval; case _XkbCF_SlowKeysDelay: - if (!pival) + if (!pival) pival= &rtrn->slow_keys_delay; case _XkbCF_DebounceDelay: - if (!pival) + if (!pival) pival= &rtrn->debounce_delay; case _XkbCF_MouseKeysDelay: - if (!pival) + if (!pival) pival= &rtrn->mk_delay; case _XkbCF_MouseKeysInterval: - if (!pival) + if (!pival) pival= &rtrn->mk_interval; case _XkbCF_MouseKeysTimeToMax: - if (!pival) + if (!pival) pival= &rtrn->mk_time_to_max; case _XkbCF_MouseKeysMaxSpeed: - if (!pival) + if (!pival) pival= &rtrn->mk_max_speed; case _XkbCF_MouseKeysCurve: - if (!pival) + if (!pival) pival= &rtrn->mk_curve; case _XkbCF_AccessXTimeout: - if (!pival) + if (!pival) pival= &rtrn->ax_timeout; if (tok!=XkbCF_Equals) { rtrn->error= XkbCF_MissingEquals; @@ -852,7 +852,7 @@ unsigned what; default: rtrn->error= XkbCF_ExpectedInteger; goto BAILOUT; - + } return True; BAILOUT: @@ -1171,7 +1171,7 @@ XkbConfigFieldsPtr pNew; return pNew; } -XkbConfigFieldsPtr +XkbConfigFieldsPtr XkbCFFree(XkbConfigFieldsPtr fields,Bool all) { XkbConfigFieldsPtr next; @@ -1307,7 +1307,7 @@ BAILOUT: void XkbCFReportError(FILE *file,char *name,int error,int line) { -char * msg; +const char *msg; switch(error) { case XkbCF_BadAlloc: diff --git a/lib/libxkbfile/src/xkbdraw.c b/lib/libxkbfile/src/xkbdraw.c index c9bcafcfb..179dc7465 100644 --- a/lib/libxkbfile/src/xkbdraw.c +++ b/lib/libxkbfile/src/xkbdraw.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/lib/libxkbfile/src/xkberrs.c b/lib/libxkbfile/src/xkberrs.c index a34417acc..f28f02b09 100644 --- a/lib/libxkbfile/src/xkberrs.c +++ b/lib/libxkbfile/src/xkberrs.c @@ -41,7 +41,7 @@ #include <X11/XKBlib.h> #include <X11/extensions/XKBfile.h> -char * _XkbErrMessages[] = { +const char * _XkbErrMessages[] = { "success", /* _XkbSuccess */ "key names not defined", /* _XkbErrMissingNames */ "key types not defined", /* _XkbErrMissingTypes */ @@ -72,6 +72,6 @@ char * _XkbErrMessages[] = { }; unsigned _XkbErrCode; -char * _XkbErrLocation= NULL; +const char * _XkbErrLocation= NULL; unsigned _XkbErrData; diff --git a/lib/libxkbfile/src/xkbmisc.c b/lib/libxkbfile/src/xkbmisc.c index a74d97805..e0b9bd653 100644 --- a/lib/libxkbfile/src/xkbmisc.c +++ b/lib/libxkbfile/src/xkbmisc.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -218,7 +218,7 @@ int nG,eG; /***===================================================================***/ static Bool -XkbWriteSectionFromName(FILE *file,char *sectionName,char *name) +XkbWriteSectionFromName(FILE *file, const char *sectionName, const char *name) { fprintf(file," xkb_%-20s { include \"%s\" };\n",sectionName,name); return True; @@ -323,7 +323,7 @@ XkbFileInfo finfo; else { wantDflts|= XkmTypesMask; } - complete|= XkmTypesMask; + complete|= XkmTypesMask; } if (wantNames&XkmCompatMapMask) { if (old_names->compat!=None) { @@ -331,14 +331,14 @@ XkbFileInfo finfo; names->compat= tmp; } else wantDflts|= XkmCompatMapMask; - complete|= XkmCompatMapMask; + complete|= XkmCompatMapMask; } if (wantNames&XkmSymbolsMask) { if (old_names->symbols==None) return False; tmp= XkbAtomGetString(dpy,old_names->symbols); names->symbols= tmp; - complete|= XkmSymbolsMask; + complete|= XkmSymbolsMask; } if (wantNames&XkmKeyNamesMask) { if (old_names->keycodes!=None) { @@ -353,7 +353,7 @@ XkbFileInfo finfo; return False; tmp= XkbAtomGetString(dpy,old_names->geometry); names->geometry= tmp; - complete|= XkmGeometryMask; + complete|= XkmGeometryMask; wantNames&= ~XkmGeometryMask; } } @@ -519,7 +519,7 @@ unsigned rtrn; rtrn|= XkbCompatMapMask|XkbIndicatorMapMask; if (orig&XkmSymbolsMask) rtrn|=XkbClientMapMask|XkbServerMapMask; if (orig&XkmIndicatorsMask) rtrn|= XkbIndicatorMapMask; - if (orig&XkmKeyNamesMask) + if (orig&XkmKeyNamesMask) rtrn|= XkbNamesMask|XkbIndicatorMapMask; if (orig&XkmGeometryMask) rtrn|= XkbGeometryMask; } @@ -547,7 +547,7 @@ XkbDescPtr xkb; if (!present) return False; else switch (present) { - case XkmKeyNamesMask: + case XkmKeyNamesMask: finfo->type= XkmKeyNamesIndex; finfo->defined= present; return True; @@ -555,18 +555,18 @@ XkbDescPtr xkb; finfo->type= XkmTypesIndex; finfo->defined= present; return True; - case XkmCompatMapMask: + case XkmCompatMapMask: finfo->type= XkmCompatMapIndex; finfo->defined= present; return True; - case XkmSymbolsMask: + case XkmSymbolsMask: if (format!=XkbXKMFile) { finfo->type= XkmSymbolsIndex; finfo->defined= present; return True; } break; - case XkmGeometryMask: + case XkmGeometryMask: finfo->type= XkmGeometryIndex; finfo->defined= present; return True; @@ -662,7 +662,7 @@ _X_HIDDEN int _XkbStrCaseCmp(char *str1,char *str2) { const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2; - + while (tolower(*us1) == tolower(*us2)) { if (*us1++ == '\0') return (0); diff --git a/lib/libxkbfile/src/xkbout.c b/lib/libxkbfile/src/xkbout.c index caf599942..91cd1ba42 100644 --- a/lib/libxkbfile/src/xkbout.c +++ b/lib/libxkbfile/src/xkbout.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -129,7 +129,7 @@ Atom kcName; register unsigned i; XkbDescPtr xkb; Display * dpy; -char * alternate; +const char * alternate; xkb= result->xkb; if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) { @@ -156,7 +156,7 @@ char * alternate; } if (xkb->indicators!=NULL) { for (i=0;i<XkbNumIndicators;i++) { - char *type; + const char *type; if (xkb->indicators->phys_indicators&(1<<i)) type= " "; else type= " virtual "; @@ -221,7 +221,7 @@ XkbDescPtr xkb; XkbXKBFile)); entry= type->map; for (n=0;n<type->map_count;n++,entry++) { - char *str; + char *str; str=XkbVModMaskText(dpy,xkb,entry->mods.real_mods,entry->mods.vmods, XkbXKBFile); fprintf(file," map[%s]= Level%d;\n",str,entry->level+1); @@ -328,7 +328,7 @@ XkbDescPtr xkb; fprintf(file," interpret.locking= False;\n"); interp= xkb->compat->sym_interpret; for (i=0;i<xkb->compat->num_si;i++,interp++) { - fprintf(file," interpret %s+%s(%s) {\n", + fprintf(file," interpret %s+%s(%s) {\n", ((interp->sym==NoSymbol)?"Any": XkbKeysymText(interp->sym,XkbXKBFile)), XkbSIMatchText(interp->match,XkbXKBFile), @@ -433,7 +433,7 @@ Bool showActions; (showImplicit)) { int typeNdx,g; Bool multi; - char * comment=" "; + const char * comment=" "; if ((srv->explicit[i]&XkbExplicitKeyTypesMask)==0) comment= "//"; @@ -512,7 +512,7 @@ Bool showActions; ((srv->explicit[i]&XkbExplicitInterpretMask)!=0)) showActions= XkbKeyHasActions(xkb,i); else showActions= False; - + if (((unsigned)XkbKeyNumGroups(xkb,i)>1)||showActions) simple= False; if (simple) { diff --git a/lib/libxkbfile/src/xkbtext.c b/lib/libxkbfile/src/xkbtext.c index 712ba9644..3a82b1744 100644 --- a/lib/libxkbfile/src/xkbtext.c +++ b/lib/libxkbfile/src/xkbtext.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -199,7 +199,7 @@ char *str,buf[BUFFER_SIZE]; str= buf; } else str= NULL; - if (mm) + if (mm) len= strlen(mm); else len= 0; if (str) @@ -229,7 +229,7 @@ char *str,buf[BUFFER_SIZE]; return rtrn; } -static char *modNames[XkbNumModifiers] = { +static const char *modNames[XkbNumModifiers] = { "Shift", "Lock", "Control", "Mod1", "Mod2", "Mod3", "Mod4", "Mod5" }; @@ -423,7 +423,7 @@ char *rtrn; /***====================================================================***/ -static char *imWhichNames[]= { +static const char *imWhichNames[]= { "base", "latched", "locked", @@ -477,7 +477,8 @@ char * buf; char * XkbAccessXDetailText(unsigned state,unsigned format) { -char *buf,*prefix; +char *buf; +const char *prefix; buf= tbGetBuffer(32); if (format==XkbMessage) prefix= ""; @@ -495,7 +496,7 @@ char *buf,*prefix; return buf; } -static char *nknNames[] = { +static const char *nknNames[] = { "keycodes", "geometry", "deviceID" }; #define NUM_NKN (sizeof(nknNames)/sizeof(char *)) @@ -503,14 +504,15 @@ static char *nknNames[] = { char * XkbNKNDetailMaskText(unsigned detail,unsigned format) { -char *buf,*prefix,*suffix; +char *buf; +const char *prefix,*suffix; register int i; register unsigned bit; int len,plen,slen; if ((detail&XkbAllNewKeyboardEventsMask)==0) { - char *tmp = ""; + const char *tmp = ""; if (format==XkbCFile) tmp= "0"; else if (format==XkbMessage) tmp= "none"; buf= tbGetBuffer(strlen(tmp)+1); @@ -518,7 +520,7 @@ int len,plen,slen; return buf; } else if ((detail&XkbAllNewKeyboardEventsMask)==XkbAllNewKeyboardEventsMask){ - char * tmp; + const char * tmp; if (format==XkbCFile) tmp= "XkbAllNewKeyboardEventsMask"; else tmp= "all"; buf= tbGetBuffer(strlen(tmp)+1); @@ -568,7 +570,7 @@ int len,plen,slen; return buf; } -static char *ctrlNames[] = { +static const char *ctrlNames[] = { "repeatKeys", "slowKeys", "bounceKeys", @@ -737,14 +739,14 @@ char * buf; } static char *actionTypeNames[XkbSA_NumActions]= { - "NoAction", - "SetMods", "LatchMods", "LockMods", + "NoAction", + "SetMods", "LatchMods", "LockMods", "SetGroup", "LatchGroup", "LockGroup", "MovePtr", "PtrBtn", "LockPtrBtn", "SetPtrDflt", "ISOLock", - "Terminate", "SwitchScreen", + "Terminate", "SwitchScreen", "SetControls", "LockControls", "ActionMessage", "RedirectKey", @@ -772,7 +774,7 @@ char *rtrn; /***====================================================================***/ static int -TryCopyStr(char *to,char *from,int *pLeft) +TryCopyStr(char *to,const char *from,int *pLeft) { register int len; if (*pLeft>0) { diff --git a/lib/libxkbfile/src/xkmout.c b/lib/libxkbfile/src/xkmout.c index 79d86efe1..1e4315703 100644 --- a/lib/libxkbfile/src/xkmout.c +++ b/lib/libxkbfile/src/xkmout.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -241,7 +241,7 @@ unsigned tmp,size= 0; dpy= xkb->dpy; kcName= xkb->names->keycodes; start= xkb->names->keys[xkb->min_key_code].name; - + size+= xkmPutCountedString(file,XkbAtomGetString(dpy,kcName)); size+= xkmPutCARD8(file,xkb->min_key_code); size+= xkmPutCARD8(file,xkb->max_key_code); @@ -660,7 +660,7 @@ register unsigned i,nLEDs; if ((map->flags!=0)||(map->which_groups!=0)||(map->groups!=0)|| (map->which_mods!=0)|| (map->mods.real_mods!=0)||(map->mods.vmods!=0)|| - (map->ctrls!=0) || + (map->ctrls!=0) || (xkb->names && (xkb->names->indicators[i]!=None))) { char *name; if (xkb->names && xkb->names->indicators[i]!=None) { @@ -938,7 +938,7 @@ unsigned tmp,size= 0; size+= tmp*SIZEOF(xkmOverlayKeyDesc); } } - return size; + return size; } static unsigned @@ -1259,7 +1259,7 @@ WriteXKMFile( FILE * file, { register int i; unsigned tmp,size,total= 0; - + for (i=0;i<num_toc;i++) { tmp= fwrite(&toc[i],SIZEOF(xkmSectionInfo),1,file); total+= tmp*SIZEOF(xkmSectionInfo); diff --git a/lib/libxkbfile/src/xkmread.c b/lib/libxkbfile/src/xkmread.c index ae056617b..5df95aa8b 100644 --- a/lib/libxkbfile/src/xkmread.c +++ b/lib/libxkbfile/src/xkmread.c @@ -6,19 +6,19 @@ fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability + Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -302,7 +302,7 @@ XkbDescPtr xkb; if ((tmp= XkmGetCountedString(file,buf,100))<1) { _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0); return -1; - } + } nRead+= tmp; if (buf[0]!='\0') { if (XkbAllocNames(xkb,XkbTypesNameMask,0,0)!=Success) { @@ -624,7 +624,7 @@ XkbDescPtr xkb; Atom name; name= XkbInternAtom(xkb->dpy,buf,0); xkb->names->groups[i]= name; - } + } else xkb->names->groups[i]= None; } } @@ -689,7 +689,7 @@ XkbDescPtr xkb; if (XkbNumGroups(wireMap.num_groups)>0) { KeySym *sym; int nSyms; - + if (XkbNumGroups(wireMap.num_groups)>xkb->ctrls->num_groups) xkb->ctrls->num_groups= wireMap.num_groups; nSyms= XkbNumGroups(wireMap.num_groups)*wireMap.width; |