diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:40 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:40 +0000 |
commit | 2eadcf4eb451a125e9fc7c5fc9b4d09024019316 (patch) | |
tree | bdbda91d988ad3e7d19d4184c2d2930be9d3d26f /src | |
parent | 452889aad6eca008ccba92e98eb8139dccea94d8 (diff) |
merge latest (4.3.99.16) from XFree86 (vendor) branchXORG-RELEASE-1-BASEXEVIE-MERGEXEVIE-BASE
Diffstat (limited to 'src')
-rw-r--r-- | src/XKBfileInt.h | 5 | ||||
-rw-r--r-- | src/cout.c | 221 | ||||
-rw-r--r-- | src/maprules.c | 218 | ||||
-rw-r--r-- | src/srvmisc.c | 21 | ||||
-rw-r--r-- | src/xkbatom.c | 43 | ||||
-rw-r--r-- | src/xkbbells.c | 17 | ||||
-rw-r--r-- | src/xkbconfig.c | 148 | ||||
-rw-r--r-- | src/xkbdraw.c | 20 | ||||
-rw-r--r-- | src/xkbmisc.c | 95 | ||||
-rw-r--r-- | src/xkbout.c | 154 | ||||
-rw-r--r-- | src/xkbtext.c | 267 | ||||
-rw-r--r-- | src/xkmout.c | 243 | ||||
-rw-r--r-- | src/xkmread.c | 173 |
13 files changed, 20 insertions, 1605 deletions
diff --git a/src/XKBfileInt.h b/src/XKBfileInt.h index 67ef319..04a143c 100644 --- a/src/XKBfileInt.h +++ b/src/XKBfileInt.h @@ -27,6 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/xkbfile/XKBfileInt.h,v 3.4 2003/11/17 22:20:23 dawes Exp $ */ #include "XKBfile.h" @@ -64,16 +65,12 @@ _XFUNCPROTOBEGIN extern char * _XkbDupString( -#if NeedFunctionPrototypes char * /* old_str */ -#endif ); extern int _XkbStrCaseCmp( -#if NeedFunctionPrototypes char * /* str1 */, char * /* str2 */ -#endif ); #define _XkbStrCaseEqual(s1,s2) (_XkbStrCaseCmp(s1,s2)==0) @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ - /* $XFree86: xc/lib/xkbfile/cout.c,v 3.8 2003/02/03 20:12:00 paulo Exp $ */ + /* $XFree86: xc/lib/xkbfile/cout.c,v 3.9 2003/11/17 22:20:23 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -40,14 +40,7 @@ #define lowbit(x) ((x) & (-(x))) static Bool -#if NeedFunctionPrototypes WriteCHdrVMods(FILE *file,Display *dpy,XkbDescPtr xkb) -#else -WriteCHdrVMods(file,dpy,xkb) - FILE * file; - Display * dpy; - XkbDescPtr xkb; -#endif { register int i,nOut; @@ -76,13 +69,7 @@ register int i,nOut; } static Bool -#if NeedFunctionPrototypes WriteCHdrKeycodes(FILE *file,XkbDescPtr xkb) -#else -WriteCHdrKeycodes(file,xkb) - FILE * file; - XkbDescPtr xkb; -#endif { Atom kcName; register unsigned i; @@ -114,20 +101,11 @@ char buf[8]; } static void -#if NeedFunctionPrototypes WriteTypePreserve( FILE * file, Display * dpy, char * prefix, XkbDescPtr xkb, XkbKeyTypePtr type) -#else -WriteTypePreserve(file,dpy,prefix,xkb,type) - FILE * file; - Display * dpy; - char * prefix; - XkbDescPtr xkb; - XkbKeyTypePtr type; -#endif { register unsigned i; XkbModsPtr pre; @@ -146,23 +124,16 @@ XkbModsPtr pre; } static void -#if NeedFunctionPrototypes WriteTypeInitFunc(FILE *file,Display *dpy,XkbDescPtr xkb) -#else -WriteTypeInitFunc(file,dpy,xkb) - FILE * file; - Display * dpy; - XkbDescPtr xkb; -#endif { register unsigned i,n; XkbKeyTypePtr type; Atom * names; char prefix[32]; - fprintf(file,"\n\nstatic void\n#if NeedFunctionPrototypes\n"); - fprintf(file,"initTypeNames(DPYTYPE dpy)\n#else\n"); - fprintf(file,"initTypeNames(dpy)\nDPYTYPE dpy;\n#endif\n{\n"); + fprintf(file,"\n\nstatic void\n"); + fprintf(file,"initTypeNames(DPYTYPE dpy)\n"); + fprintf(file,"{\n"); for (i=0,type=xkb->map->types;i<xkb->map->num_types;i++,type++) { strcpy(prefix,XkbAtomText(dpy,type->name,XkbCFile)); if (type->name!=None) @@ -187,14 +158,7 @@ char prefix[32]; } static Bool -#if NeedFunctionPrototypes WriteCHdrKeyTypes(FILE *file,Display *dpy,XkbDescPtr xkb) -#else -WriteCHdrKeyTypes(file,dpy,xkb) - FILE * file; - Display * dpy; - XkbDescPtr xkb; -#endif { register unsigned i,n; XkbClientMapPtr map; @@ -270,14 +234,7 @@ char prefix[32]; } static Bool -#if NeedFunctionPrototypes WriteCHdrCompatMap(FILE *file,Display *dpy,XkbDescPtr xkb) -#else -WriteCHdrCompatMap(file,dpy,xkb) - FILE * file; - Display * dpy; - XkbDescPtr xkb; -#endif { register unsigned i; XkbCompatMapPtr compat; @@ -328,13 +285,7 @@ XkbSymInterpretPtr interp; } static Bool -#if NeedFunctionPrototypes WriteCHdrSymbols(FILE *file,XkbDescPtr xkb) -#else -WriteCHdrSymbols(file,xkb) - FILE * file; - XkbDescPtr xkb; -#endif { register unsigned i; @@ -372,14 +323,7 @@ register unsigned i; } static Bool -#if NeedFunctionPrototypes WriteCHdrClientMap(FILE *file,Display *dpy,XkbDescPtr xkb) -#else -WriteCHdrClientMap(file,dpy,xkb) - FILE * file; - Display * dpy; - XkbDescPtr xkb; -#endif { if ((!xkb)||(!xkb->map)||(!xkb->map->syms)||(!xkb->map->key_sym_map)) { _XkbLibError(_XkbErrMissingSymbols,"WriteCHdrClientMap",0); @@ -397,14 +341,7 @@ WriteCHdrClientMap(file,dpy,xkb) } static Bool -#if NeedFunctionPrototypes WriteCHdrServerMap(FILE *file,Display *dpy,XkbDescPtr xkb) -#else -WriteCHdrServerMap(file,dpy,xkb) - FILE * file; - Display * dpy; - XkbDescPtr xkb; -#endif { register unsigned i; @@ -481,14 +418,7 @@ register unsigned i; } static Bool -#if NeedFunctionPrototypes WriteCHdrIndicators(FILE *file,Display *dpy,XkbDescPtr xkb) -#else -WriteCHdrIndicators(file,dpy,xkb) - FILE * file; - Display * dpy; - XkbDescPtr xkb; -#endif { register int i,nNames; XkbIndicatorMapPtr imap; @@ -515,11 +445,9 @@ XkbIndicatorMapPtr imap; } fprintf(file,"\n }\n};\n"); if (nNames>0) { - fprintf(file,"static void\n#if NeedFunctionPrototypes\n"); + fprintf(file,"static void\n"); fprintf(file,"initIndicatorNames(DPYTYPE dpy,XkbDescPtr xkb)\n"); - fprintf(file,"#else\ninitIndicatorNames(dpy,xkb)\n"); - fprintf(file," DPYTYPE dpy;\n"); - fprintf(file," XkbDescPtr xkb;\n#endif\n{\n"); + fprintf(file,"{\n"); for (i=0;i<XkbNumIndicators;i++) { Atom name; if (xkb->names->indicators[i]==None) @@ -535,14 +463,7 @@ XkbIndicatorMapPtr imap; } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomProps(FILE *file,XkbDescPtr xkb,XkbGeometryPtr geom) -#else -WriteCHdrGeomProps(file,xkb,geom) - FILE * file; - XkbDescPtr xkb; - XkbGeometryPtr geom; -#endif { if (geom->num_properties>0) { register int i; @@ -559,14 +480,7 @@ WriteCHdrGeomProps(file,xkb,geom) } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomColors(FILE *file,XkbDescPtr xkb,XkbGeometryPtr geom) -#else -WriteCHdrGeomColors(file,xkb,geom) - FILE * file; - XkbDescPtr xkb; - XkbGeometryPtr geom; -#endif { if (geom->num_colors>0) { register int i; @@ -582,15 +496,7 @@ WriteCHdrGeomColors(file,xkb,geom) } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomOutlines(FILE *file,int nOL,XkbOutlinePtr ol,int shapeNdx) -#else -WriteCHdrGeomOutlines(file,nOL,ol,shapeNdx) - FILE * file; - int nOL; - XkbOutlinePtr ol; - int shapeNdx; -#endif { register int o,p; @@ -618,14 +524,7 @@ register int o,p; } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomShapes(FILE *file,XkbDescPtr xkb,XkbGeometryPtr geom) -#else -WriteCHdrGeomShapes(file,xkb,geom) - FILE * file; - XkbDescPtr xkb; - XkbGeometryPtr geom; -#endif { register int s; register XkbShapePtr shape; @@ -657,20 +556,11 @@ register XkbShapePtr shape; } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomDoodads( FILE * file, XkbDescPtr xkb, XkbGeometryPtr geom, XkbSectionPtr section, int section_num) -#else -WriteCHdrGeomDoodads(file,xkb,geom,section,section_num) - FILE * file; - XkbDescPtr xkb; - XkbGeometryPtr geom; - XkbSectionPtr section; - int section_num; -#endif { int nd,d; XkbDoodadPtr doodad; @@ -683,13 +573,7 @@ Display * dpy; geom->num_doodads); } fprintf(file,"static void\n"); - fprintf(file,"#if NeedFunctionPrototypes\n"); fprintf(file,"_InitGeomDoodads(DPYTYPE dpy,XkbGeometryPtr geom)\n"); - fprintf(file,"#else\n"); - fprintf(file,"_InitGeomDoodads(dpy,geom)\n"); - fprintf(file," DPYTYPE dpy;\n"); - fprintf(file," XkbGeometryPtr geom;\n"); - fprintf(file,"#endif\n"); fprintf(file,"{\n"); fprintf(file,"register XkbDoodadPtr doodads;\n\n"); fprintf(file," doodads= geom->doodads;\n"); @@ -702,17 +586,10 @@ Display * dpy; section_num,section->num_doodads); } fprintf(file,"static void\n"); - fprintf(file,"#if NeedFunctionPrototypes\n"); fprintf(file,"_InitS%02dDoodads(",section_num); fprintf(file," DPYTYPE dpy,\n"); fprintf(file," XkbGeometryPtr geom,\n"); fprintf(file," XkbSectionPtr section)\n"); - fprintf(file,"#else\n"); - fprintf(file,"_InitS%02dDoodads(dpy,geom,section)\n",section_num); - fprintf(file," DPYTYPE dpy;\n"); - fprintf(file," XkbGeometryPtr geom;\n"); - fprintf(file," XkbSectionPtr section;\n"); - fprintf(file,"#endif\n"); fprintf(file,"{\n"); fprintf(file,"register XkbDoodadPtr doodads;\n\n"); fprintf(file," doodads= section->doodads;\n"); @@ -773,18 +650,10 @@ Display * dpy; } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomOverlays( FILE * file, XkbDescPtr xkb, XkbSectionPtr section, int section_num) -#else -WriteCHdrGeomOverlays(file,xkb,section,section_num) - FILE * file; - XkbDescPtr xkb; - XkbSectionPtr section; - int section_num; -#endif { register int o,r,k; XkbOverlayPtr ol; @@ -829,17 +698,10 @@ XkbOverlayKeyPtr key; } fprintf(file,"\n};\n"); fprintf(file,"static void\n"); - fprintf(file,"#if NeedFunctionPrototypes\n"); fprintf(file,"_InitS%02dOverlay(",section_num); fprintf(file," DPYTYPE dpy,\n"); fprintf(file," XkbGeometryPtr geom,\n"); fprintf(file," XkbSectionPtr section)\n"); - fprintf(file,"#else\n"); - fprintf(file,"_InitS%02dOverlay(dpy,geom,section)\n",section_num); - fprintf(file," DPYTYPE dpy;\n"); - fprintf(file," XkbGeometryPtr geom;\n"); - fprintf(file," XkbSectionPtr section;\n"); - fprintf(file,"#endif\n"); fprintf(file,"{\n"); fprintf(file,"XkbOverlayPtr ol;\n\n"); fprintf(file," ol= section->overlays;\n"); @@ -853,18 +715,10 @@ XkbOverlayKeyPtr key; } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomRows( FILE * file, XkbDescPtr xkb, XkbSectionPtr section, int section_num) -#else -WriteCHdrGeomRows(file,xkb,section,section_num) - FILE * file; - XkbDescPtr xkb; - XkbSectionPtr section; - int section_num; -#endif { register int k,r; register XkbRowPtr row; @@ -896,14 +750,7 @@ register XkbKeyPtr key; } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomSections(FILE *file,XkbDescPtr xkb,XkbGeometryPtr geom) -#else -WriteCHdrGeomSections(file,xkb,geom) - FILE * file; - XkbDescPtr xkb; - XkbGeometryPtr geom; -#endif { register int s; register XkbSectionPtr section; @@ -950,12 +797,7 @@ register XkbSectionPtr section; } fprintf(file,"\n};\n"); fprintf(file,"\nstatic Bool\n"); - fprintf(file,"#if NeedFunctionPrototypes\n"); fprintf(file,"_InitSections(DPYTYPE dpy,XkbGeometryPtr geom)\n"); - fprintf(file,"#else\n"); - fprintf(file,"_InitSections(dpy,geom)\n"); - fprintf(file," DPYTYPE dpy;\n XkbGeometryPtr geom;\n"); - fprintf(file,"#endif\n"); fprintf(file,"{\nXkbSectionPtr sections;\n\n"); fprintf(file," sections= geom->sections;\n"); for (s=0,section=geom->sections;s<geom->num_sections;s++,section++) { @@ -973,14 +815,7 @@ register XkbSectionPtr section; } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomAliases(FILE *file,XkbDescPtr xkb,XkbGeometryPtr geom) -#else -WriteCHdrGeomAliases(file,xkb,geom) - FILE * file; - XkbDescPtr xkb; - XkbGeometryPtr geom; -#endif { if (geom->num_key_aliases>0) { register int i; @@ -997,13 +832,7 @@ WriteCHdrGeomAliases(file,xkb,geom) } static Bool -#if NeedFunctionPrototypes WriteCHdrGeometry(FILE *file,XkbDescPtr xkb) -#else -WriteCHdrGeometry(file,xkb) - FILE * file; - XkbDescPtr xkb; -#endif { XkbGeometryPtr geom; register int i; @@ -1060,12 +889,7 @@ register int i; (geom->num_key_aliases>0?"g_aliases":"NULL")); fprintf(file,"};\n\n"); fprintf(file,"static Bool\n"); - fprintf(file,"#if NeedFunctionPrototypes\n"); fprintf(file,"_InitHdrGeom(DPYTYPE dpy,XkbGeometryPtr geom)\n"); - fprintf(file,"#else\n"); - fprintf(file,"_InitHdrGeom(dpy,geom)\n"); - fprintf(file," DPYTYPE dpy;\n XkbGeometryPtr geom;\n"); - fprintf(file,"#endif\n"); fprintf(file,"{\n"); if (geom->name!=None) { fprintf(file," geom->name= GET_ATOM(dpy,\"%s\");\n", @@ -1083,13 +907,7 @@ register int i; } static Bool -#if NeedFunctionPrototypes WriteCHdrGeomFile(FILE *file,XkbFileInfo *result) -#else -WriteCHdrGeomFile(file,result) - FILE * file; - XkbFileInfo * result; -#endif { Bool ok; @@ -1098,13 +916,7 @@ Bool ok; } static Bool -#if NeedFunctionPrototypes WriteCHdrLayout(FILE *file,XkbFileInfo *result) -#else -WriteCHdrLayout(file,result) - FILE * file; - XkbFileInfo * result; -#endif { Bool ok; XkbDescPtr xkb; @@ -1118,13 +930,7 @@ XkbDescPtr xkb; } static Bool -#if NeedFunctionPrototypes WriteCHdrSemantics(FILE *file,XkbFileInfo *result) -#else -WriteCHdrSemantics(file,result) - FILE * file; - XkbFileInfo * result; -#endif { Bool ok; XkbDescPtr xkb; @@ -1138,13 +944,7 @@ XkbDescPtr xkb; } static Bool -#if NeedFunctionPrototypes WriteCHdrKeymap(FILE *file,XkbFileInfo *result) -#else -WriteCHdrKeymap(file,result) - FILE * file; - XkbFileInfo * result; -#endif { Bool ok; XkbDescPtr xkb; @@ -1161,22 +961,13 @@ XkbDescPtr xkb; } Bool -#if NeedFunctionPrototypes XkbWriteCFile(FILE *out,char *name,XkbFileInfo *result) -#else -XkbWriteCFile(out,name,result) - FILE * out; - char * name; - XkbFileInfo * result; -#endif { Bool ok; XkbDescPtr xkb; Bool (*func)( -#if NeedFunctionPrototypes FILE * /* file*/, XkbFileInfo * /* result */ -#endif ); switch (result->type) { diff --git a/src/maprules.c b/src/maprules.c index 8c5ce1a..c588ae3 100644 --- a/src/maprules.c +++ b/src/maprules.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.17 2002/11/26 01:43:25 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/maprules.c,v 3.18 2003/11/17 22:20:23 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -89,12 +89,7 @@ typedef struct { } InputLine; static void -#if NeedFunctionPrototypes InitInputLine(InputLine *line) -#else -InitInputLine(line) - InputLine * line; -#endif { line->line_num= 1; line->num_line= 0; @@ -104,12 +99,7 @@ InitInputLine(line) } static void -#if NeedFunctionPrototypes FreeInputLine(InputLine *line) -#else -FreeInputLine(line) - InputLine *line; -#endif { if (line->line!=line->buf) _XkbFree(line->line); @@ -121,13 +111,7 @@ FreeInputLine(line) } static int -#if NeedFunctionPrototypes InputLineAddChar(InputLine *line,int ch) -#else -InputLineAddChar(line,ch) - InputLine * line; - int ch; -#endif { if (line->num_line>=line->sz_line) { if (line->line==line->buf) { @@ -148,14 +132,7 @@ InputLineAddChar(line,ch) InputLineAddChar(l,c)) static Bool -#if NeedFunctionPrototypes GetInputLine(FILE *file,InputLine *line,Bool checkbang) -#else -GetInputLine(file,line,checkbang) - FILE * file; - InputLine * line; - Bool checkbang; -#endif { int ch; Bool endOfFile,spacePending,slashPending,inComment; @@ -279,13 +256,7 @@ typedef struct { /***====================================================================***/ static char* -#if NeedFunctionPrototypes get_index(char *str, int *ndx) -#else -get_index(str, ndx) - char *str; - int *ndx; -#endif { char ndx_buf[NDX_BUFF_SIZE]; char *end; @@ -311,13 +282,7 @@ get_index(str, ndx) } static void -#if NeedFunctionPrototypes SetUpRemap(InputLine *line,RemapSpec *remap) -#else -SetUpRemap(line,remap) - InputLine * line; - RemapSpec * remap; -#endif { char * tok,*str; unsigned present, l_ndx_present, v_ndx_present; @@ -426,13 +391,7 @@ Bool found; } static Bool -#if NeedFunctionPrototypes MatchOneOf(char *wanted,char *vals_defined) -#else -MatchOneOf(wanted,vals_defined) - char * wanted; - char * vals_defined; -#endif { char *str,*next; int want_len= strlen(wanted); @@ -456,18 +415,10 @@ int want_len= strlen(wanted); /***====================================================================***/ static Bool -#if NeedFunctionPrototypes CheckLine( InputLine * line, RemapSpec * remap, XkbRF_RulePtr rule, XkbRF_GroupPtr group) -#else -CheckLine(line,remap,rule,group) - InputLine * line; - RemapSpec * remap; - XkbRF_RulePtr rule; - XkbRF_GroupsPtr group; -#endif { char * str,*tok; register int nread, i; @@ -566,13 +517,7 @@ Bool append = False; } static char * -#if NeedFunctionPrototypes _Concat(char *str1,char *str2) -#else -_Concat(str1,str2) - char * str1; - char * str2; -#endif { int len; @@ -586,12 +531,7 @@ int len; } static void -#if NeedFunctionPrototypes squeeze_spaces(char *p1) -#else -squeeze_spaces(p1) - char *p1; -#endif { char *p2; for (p2 = p1; *p2; p2++) { @@ -602,13 +542,7 @@ squeeze_spaces(p1) } static Bool -#if NeedFunctionPrototypes MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) -#else -MakeMultiDefs(mdefs, defs) - XkbRF_MultiDefsPtr mdefs - XkbRF_VarDefsPtr defs; -#endif { bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec)); @@ -667,12 +601,7 @@ MakeMultiDefs(mdefs, defs) } static void -#if NeedFunctionPrototypes FreeMultiDefs(XkbRF_MultiDefsPtr defs) -#else -FreeMultiDefs(defs) - XkbRF_MultiDefsPtr defs; -#endif { if (defs->options) _XkbFree(defs->options); if (defs->layout[1]) _XkbFree(defs->layout[1]); @@ -680,13 +609,7 @@ FreeMultiDefs(defs) } static void -#if NeedFunctionPrototypes Apply(char *src, char **dst) -#else -Apply(src, dst) - char *src; - char *dst; -#endif { if (src) { if (*src == '+' || *src == '!') { @@ -699,14 +622,8 @@ Apply(src, dst) } static void -#if NeedFunctionPrototypes XkbRF_ApplyRule( XkbRF_RulePtr rule, XkbComponentNamesPtr names) -#else -XkbRF_ApplyRule(rule,names) - XkbRF_RulePtr rule; - XkbComponentNamesPtr names; -#endif { rule->flags&= ~XkbRF_PendingMatch; /* clear the flag because it's applied */ @@ -719,16 +636,9 @@ XkbRF_ApplyRule(rule,names) } static Bool -#if NeedFunctionPrototypes CheckGroup( XkbRF_RulesPtr rules, char * group_name, char * name) -#else -XkbRF_CheckApplyRule(rules,group,name) - XkbRF_RulesPtr rules; - char * group_name; - char * name; -#endif { int i; char *p; @@ -750,18 +660,10 @@ XkbRF_CheckApplyRule(rules,group,name) } static int -#if NeedFunctionPrototypes XkbRF_CheckApplyRule( XkbRF_RulePtr rule, XkbRF_MultiDefsPtr mdefs, XkbComponentNamesPtr names, XkbRF_RulesPtr rules) -#else -XkbRF_CheckApplyRule(rule,mdefs,names) - XkbRF_RulePtr rule; - XkbRF_MultiDefsPtr mdefs; - XkbComponentNamesPtr names; - XkbRF_RulesPtr rules; -#endif { Bool pending = False; @@ -832,12 +734,7 @@ XkbRF_CheckApplyRule(rule,mdefs,names) } static void -#if NeedFunctionPrototypes XkbRF_ClearPartialMatches(XkbRF_RulesPtr rules) -#else -XkbRF_ClearPartialMatches(rules) - XkbRF_RulesPtr rules; -#endif { register int i; XkbRF_RulePtr rule; @@ -848,13 +745,7 @@ XkbRF_RulePtr rule; } static void -#if NeedFunctionPrototypes XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,XkbComponentNamesPtr names) -#else -XkbRF_ApplyPartialMatches(rules,names) - XkbRF_RulesPtr rules; - XkbComponentNamesPtr names; -#endif { int i; XkbRF_RulePtr rule; @@ -867,18 +758,10 @@ XkbRF_RulePtr rule; } static void -#if NeedFunctionPrototypes XkbRF_CheckApplyRules( XkbRF_RulesPtr rules, XkbRF_MultiDefsPtr mdefs, XkbComponentNamesPtr names, int flags) -#else -XkbRF_CheckApplyRules(rules, mdefs, names, flags) - XkbRF_RulesPtr rules; - XkbRF_MultiDefsPtr mdefs; - XkbComponentNamesPtr names; - int flags; -#endif { int i; XkbRF_RulePtr rule; @@ -899,13 +782,7 @@ int skip; /***====================================================================***/ static char * -#if NeedFunctionPrototypes XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs) -#else -XkbRF_SubstituteVars(name, mdefs) - char * name; - XkbRF_MultiDefsPtr mdefs; -#endif { char *str, *outstr, *orig, *var; int len, ndx; @@ -1000,16 +877,9 @@ int len, ndx; /***====================================================================***/ Bool -#if NeedFunctionPrototypes XkbRF_GetComponents( XkbRF_RulesPtr rules, XkbRF_VarDefsPtr defs, XkbComponentNamesPtr names) -#else -XkbRF_GetComponents(rules,defs,names) - XkbRF_RulesPtr rules; - XkbRF_VarDefsPtr defs; - XkbComponentNamesPtr names; -#endif { XkbRF_MultiDefsRec mdefs; @@ -1042,12 +912,7 @@ XkbRF_GetComponents(rules,defs,names) } XkbRF_RulePtr -#if NeedFunctionPrototypes XkbRF_AddRule(XkbRF_RulesPtr rules) -#else -XkbRF_AddRule(rules) - XkbRF_RulesPtr rules; -#endif { if (rules->sz_rules<1) { rules->sz_rules= 16; @@ -1071,12 +936,7 @@ XkbRF_AddRule(rules) } XkbRF_GroupPtr -#if NeedFunctionPrototypes XkbRF_AddGroup(XkbRF_RulesPtr rules) -#else -XkbRF_AddGroup(rules) - XkbRF_RulesPtr rules; -#endif { if (rules->sz_groups<1) { rules->sz_groups= 16; @@ -1098,13 +958,7 @@ XkbRF_AddGroup(rules) } Bool -#if NeedFunctionPrototypes XkbRF_LoadRules(FILE *file, XkbRF_RulesPtr rules) -#else -XkbRF_LoadRules(file,rules) - FILE * file; - XkbRF_RulesPtr rules; -#endif { InputLine line; RemapSpec remap; @@ -1137,14 +991,7 @@ XkbRF_GroupRec tgroup,*group; } Bool -#if NeedFunctionPrototypes XkbRF_LoadRulesByName(char *base,char *locale,XkbRF_RulesPtr rules) -#else -XkbRF_LoadRulesByName(base,locale,rules) - char * base; - char * locale; - XkbRF_RulesPtr rules; -#endif { FILE * file; char buf[PATH_MAX]; @@ -1185,12 +1032,7 @@ Bool ok; #define HEAD_EXTRA 5 XkbRF_VarDescPtr -#if NeedFunctionPrototypes XkbRF_AddVarDesc(XkbRF_DescribeVarsPtr vars) -#else -XkbRF_AddVarDesc(vars) - XkbRF_DescribeVarsPtr vars; -#endif { if (vars->sz_desc<1) { vars->sz_desc= 16; @@ -1212,13 +1054,7 @@ XkbRF_AddVarDesc(vars) } XkbRF_VarDescPtr -#if NeedFunctionPrototypes XkbRF_AddVarDescCopy(XkbRF_DescribeVarsPtr vars,XkbRF_VarDescPtr from) -#else -XkbRF_AddVarDescCopy(vars,from) - XkbRF_DescribeVarsPtr vars; - XkbRF_VarDescPtr from; -#endif { XkbRF_VarDescPtr nd; @@ -1230,13 +1066,7 @@ XkbRF_VarDescPtr nd; } XkbRF_DescribeVarsPtr -#if NeedFunctionPrototypes XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name) -#else -XkbRF_AddVarToDescribe(rules,name) - XkbRF_RulesPtr rules; - char * name; -#endif { if (rules->sz_extra<1) { rules->num_extra= 0; @@ -1264,13 +1094,7 @@ XkbRF_AddVarToDescribe(rules,name) } Bool -#if NeedFunctionPrototypes XkbRF_LoadDescriptions(FILE *file,XkbRF_RulesPtr rules) -#else -XkbRF_LoadDescriptions(file,rules) - FILE * file; - XkbRF_RulesPtr rules; -#endif { InputLine line; XkbRF_VarDescRec tmp; @@ -1366,14 +1190,7 @@ int len,headingtype,extra_ndx = 0; } Bool -#if NeedFunctionPrototypes XkbRF_LoadDescriptionsByName(char *base,char *locale,XkbRF_RulesPtr rules) -#else -XkbRF_LoadDescriptionsByName(base,locale,rules) - char * base; - char * locale; - XkbRF_RulesPtr rules; -#endif { FILE * file; char buf[PATH_MAX]; @@ -1408,15 +1225,7 @@ Bool ok; /***====================================================================***/ XkbRF_RulesPtr -#if NeedFunctionPrototypes XkbRF_Load(char *base,char *locale,Bool wantDesc,Bool wantRules) -#else -XkbRF_Load(base,locale,wantDesc,wantRules) - char *base; - char *locale; - Bool wantDesc; - Bool wantRules; -#endif { XkbRF_RulesPtr rules; @@ -1466,12 +1275,7 @@ XkbRF_RulesPtr rules; /***====================================================================***/ static void -#if NeedFunctionPrototypes XkbRF_ClearVarDescriptions(XkbRF_DescribeVarsPtr var) -#else -XkbRF_ClearVarDescriptions(var) - XkbRF_DescribeVarsPtr var; -#endif { register int i; @@ -1489,13 +1293,7 @@ register int i; } void -#if NeedFunctionPrototypes XkbRF_Free(XkbRF_RulesPtr rules,Bool freeRules) -#else -XkbRF_Free(rules,freeRules) - XkbRF_RulesPtr rules; - Bool freeRules; -#endif { int i; XkbRF_RulePtr rule; @@ -1551,14 +1349,7 @@ XkbRF_GroupPtr group; #ifndef XKB_IN_SERVER Bool -#if NeedFunctionPrototypes XkbRF_GetNamesProp(Display *dpy,char **rf_rtrn,XkbRF_VarDefsPtr vd_rtrn) -#else -XkbRF_GetNamesProp(dpy,rf_rtrn,vd_rtrn) - Display * dpy; - char ** rf_rtrn; - XkbRF_VarDefsPtr vd_rtrn; -#endif { Atom rules_atom,actual_type; int fmt; @@ -1618,14 +1409,7 @@ Status rtrn; } Bool -#if NeedFunctionPrototypes XkbRF_SetNamesProp(Display *dpy,char *rules_file,XkbRF_VarDefsPtr var_defs) -#else -XkbRF_SetNamesProp(dpy,rules_file,var_defs) - Display * dpy; - char * rules_file; - XkbRF_VarDefsPtr var_defs; -#endif { int len,out; Atom name; diff --git a/src/srvmisc.c b/src/srvmisc.c index 9a47333..6eae0f1 100644 --- a/src/srvmisc.c +++ b/src/srvmisc.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/srvmisc.c,v 3.4 2001/10/28 03:32:47 tsi Exp $ */ +/* $XFree86: xc/lib/xkbfile/srvmisc.c,v 3.5 2003/11/17 22:20:23 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -37,12 +37,7 @@ #include "XKBfileInt.h" Bool -#if NeedFunctionPrototypes XkbWriteToServer(XkbFileInfo *result) -#else -XkbWriteToServer(result) - XkbFileInfo * result; -#endif { XkbDescPtr xkb; Display * dpy; @@ -88,15 +83,7 @@ Display * dpy; } unsigned -#if NeedFunctionPrototypes XkbReadFromServer(Display *dpy,unsigned need,unsigned want,XkbFileInfo *result) -#else -XkbReadFromServer(dpy,need,want,result) - Display * dpy; - unsigned need; - unsigned want; - XkbFileInfo * result; -#endif { unsigned which= need|want; unsigned tmp = 0; @@ -133,13 +120,7 @@ unsigned tmp = 0; } Status -#if NeedFunctionPrototypes XkbChangeKbdDisplay(Display *newDpy,XkbFileInfo *result) -#else -XkbChangeKbdDisplay(newDpy,result) - Display * newDpy; - XkbFileInfo * result; -#endif { register int i; XkbDescPtr xkb; diff --git a/src/xkbatom.c b/src/xkbatom.c index 2883cac..f152e78 100644 --- a/src/xkbatom.c +++ b/src/xkbatom.c @@ -71,7 +71,7 @@ SOFTWARE. THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbatom.c,v 3.8 2001/12/14 19:57:03 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbatom.c,v 3.9 2003/11/17 22:20:23 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -102,14 +102,7 @@ static unsigned long tableLength; static NodePtr *nodeTable; static Atom -#if NeedFunctionPrototypes _XkbMakeAtom(char *string,unsigned len,Bool makeit) -#else -_XkbMakeAtom(string, len, makeit) - char *string; - unsigned len; - Bool makeit; -#endif { register NodePtr * np; unsigned i; @@ -179,12 +172,7 @@ _XkbMakeAtom(string, len, makeit) } static char * -#if NeedFunctionPrototypes _XkbNameForAtom(Atom atom) -#else -_XkbNameForAtom(atom) - Atom atom; -#endif { NodePtr node; if (atom > lastAtom) return 0; @@ -193,11 +181,7 @@ _XkbNameForAtom(atom) } static void -#if NeedFunctionPrototypes _XkbInitAtoms(void) -#else -_XkbInitAtoms() -#endif { tableLength = InitialTableSize; nodeTable = (NodePtr *)_XkbAlloc(InitialTableSize*sizeof(NodePtr)); @@ -207,13 +191,7 @@ _XkbInitAtoms() /***====================================================================***/ char * -#if NeedFunctionPrototypes XkbAtomGetString(Display *dpy,Atom atm) -#else -XkbAtomGetString(dpy,atm) - Display * dpy; - Atom atm; -#endif { if (atm==None) return NULL; @@ -225,14 +203,7 @@ XkbAtomGetString(dpy,atm) /***====================================================================***/ Atom -#if NeedFunctionPrototypes XkbInternAtom(Display *dpy,char *name,Bool onlyIfExists) -#else -XkbInternAtom(dpy,name,onlyIfExists) - Display * dpy; - char * name; - Bool onlyIfExists; -#endif { if (name==NULL) return None; @@ -245,14 +216,7 @@ XkbInternAtom(dpy,name,onlyIfExists) /***====================================================================***/ Atom -#if NeedFunctionPrototypes XkbChangeAtomDisplay(Display *oldDpy,Display *newDpy,Atom atm) -#else -XkbChangeAtomDisplay(oldDpy,newDpy,atm) - Display * oldDpy; - Display * newDpy; - Atom atm; -#endif { char *tmp; @@ -267,12 +231,7 @@ char *tmp; /***====================================================================***/ void -#if NeedFunctionPrototypes XkbInitAtoms(Display *dpy) -#else -XkbInitAtoms(dpy) - Display *dpy; -#endif { static int been_here= 0; if ((dpy==NULL)&&(!been_here)) { diff --git a/src/xkbbells.c b/src/xkbbells.c index 8214eed..f425b93 100644 --- a/src/xkbbells.c +++ b/src/xkbbells.c @@ -24,6 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ +/* $XFree86: xc/lib/xkbfile/xkbbells.c,v 1.2 2003/11/17 22:20:23 dawes Exp $ */ #include <X11/Xlib.h> #include <X11/XKBlib.h> @@ -80,15 +81,7 @@ static char *_xkbStdBellNames[XkbBI_NumBells] = { static Atom _xkbStdBellAtoms[XkbBI_NumBells]; Bool -#if NeedFunctionPrototypes XkbStdBell(Display *dpy,Window win,int percent,int bellDef) -#else -XkbStdBell(dpy,win,percent,bellDef) - Display * dpy; - Window win; - int percent; - int bellDef; -#endif { if ((bellDef<0)||(bellDef>=XkbBI_NumBells)) bellDef= XkbBI_Info; @@ -98,15 +91,7 @@ XkbStdBell(dpy,win,percent,bellDef) } Bool -#if NeedFunctionPrototypes XkbStdBellEvent(Display *dpy,Window win,int percent,int bellDef) -#else -XkbStdBellEvent(dpy,win,percent,bellDef) - Display * dpy; - Window win; - int percent; - int bellDef; -#endif { if ((bellDef<0)||(bellDef>=XkbBI_NumBells)) bellDef= XkbBI_Info; diff --git a/src/xkbconfig.c b/src/xkbconfig.c index c94b06f..0e480b4 100644 --- a/src/xkbconfig.c +++ b/src/xkbconfig.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbconfig.c,v 3.7 2001/11/30 12:11:51 eich Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbconfig.c,v 3.8 2003/11/17 22:20:23 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -63,14 +63,7 @@ static char _XkbCF_rtrn[XKBCF_MAX_STR_LEN+1]; static int -#if NeedFunctionPrototypes ScanIdent(FILE *file,int ch,XkbCFScanResultPtr val_rtrn) -#else -ScanIdent(file,ch,val_rtrn) - FILE * file; - int ch; - XkbCFScanResultPtr val_rtrn; -#endif { register int i; char * str; @@ -87,14 +80,7 @@ char * str; } static int -#if NeedFunctionPrototypes ScanString(FILE *file,int quote,XkbCFScanResultPtr val_rtrn) -#else -ScanString(file,quote,val_rtrn) - FILE * file; - int quote; - XkbCFScanResultPtr val_rtrn; -#endif { int ch,nInBuf; @@ -153,14 +139,7 @@ int ch,nInBuf; } static int -#if NeedFunctionPrototypes ScanInteger(FILE *file,int ch,XkbCFScanResultPtr val_rtrn) -#else -ScanInteger(file,ch,val_rtrn) - FILE * file; - int ch; - XkbCFScanResultPtr val_rtrn; -#endif { int i; @@ -174,14 +153,7 @@ int i; } int -#if NeedFunctionPrototypes XkbCFScan(FILE *file,XkbCFScanResultPtr val_rtrn,XkbConfigRtrnPtr rtrn) -#else -XkbCFScan(file,val_rtrn,rtrn) - FILE * file; - XkbCFScanResultPtr val_rtrn; - XkbConfigRtrnPtr rtrn; -#endif { int ch; @@ -276,14 +248,7 @@ int ch; #define _XkbCF_InitialFeedback 37 static Bool -#if NeedFunctionPrototypes AddCtrlByName(XkbConfigRtrnPtr rtrn,char *name,unsigned long *ctrls_rtrn) -#else -AddCtrlByName(rtrn,name,ctrls_rtrn) - XkbConfigRtrnPtr rtrn; - char * name; - unsigned long * ctrls_rtrn; -#endif { if ((_XkbStrCaseCmp(name,"repeat")==0)|| (_XkbStrCaseCmp(name,"repeatkeys")==0)) @@ -320,16 +285,9 @@ AddCtrlByName(rtrn,name,ctrls_rtrn) } static Bool -#if NeedFunctionPrototypes AddAXTimeoutOptByName( XkbConfigRtrnPtr rtrn, char * name, unsigned short * opts_rtrn) -#else -AddAXTimeoutOptByName(rtrn,name,opts_rtrn) - XkbConfigRtrnPtr rtrn; - char * name; - unsigned short * opts_rtrn; -#endif { if (_XkbStrCaseCmp(name,"slowkeyspress")==0) *opts_rtrn= XkbAX_SKPressFBMask; @@ -363,20 +321,11 @@ AddAXTimeoutOptByName(rtrn,name,opts_rtrn) } XkbConfigUnboundModPtr -#if NeedFunctionPrototypes XkbCFAddModByName( XkbConfigRtrnPtr rtrn, int what, char * name, Bool merge, XkbConfigUnboundModPtr last) -#else -XkbCFAddModByName(rtrn,what,name,merge,last) - XkbConfigRtrnPtr rtrn; - int what; - char * name; - Bool merge; - XkbConfigUnboundModPtr last; -#endif { if (rtrn->num_unbound_mods>=rtrn->sz_unbound_mods) { rtrn->sz_unbound_mods+= 5; @@ -428,13 +377,7 @@ XkbCFAddModByName(rtrn,what,name,merge,last) } int -#if NeedFunctionPrototypes XkbCFBindMods(XkbConfigRtrnPtr rtrn,XkbDescPtr xkb) -#else -XkbCFBindMods(rtrn,xkb) - XkbConfigRtrnPtr rtrn; - XkbDescPtr xkb; -#endif { register int n,v; Atom name; @@ -468,14 +411,7 @@ int missing; } Bool -#if NeedFunctionPrototypes XkbCFApplyMods(XkbConfigRtrnPtr rtrn,int what,XkbConfigModInfoPtr info) -#else -XkbCFApplyMods(rtrn,what,info) - XkbConfigRtrnPtr rtrn; - int what; - XkbConfigModInfoPtr info; -#endif { register int n; XkbConfigUnboundModPtr mod; @@ -509,20 +445,11 @@ XkbConfigUnboundModPtr mod; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes DefaultParser( FILE * file, XkbConfigFieldsPtr fields, XkbConfigFieldPtr field, XkbDescPtr xkb, XkbConfigRtrnPtr rtrn) -#else -DefaultParser(file,fields,field,xkb,rtrn) - FILE * file; - XkbConfigFieldsPtr fields; - XkbConfigFieldPtr field; - XkbDescPtr xkb; - XkbConfigRtrnPtr rtrn; -#endif { int tok; XkbCFScanResultRec val; @@ -930,12 +857,7 @@ BAILOUT: } static Bool -#if NeedFunctionPrototypes DefaultCleanUp(XkbConfigRtrnPtr rtrn) -#else -DefaultCleanUp(rtrn) - XkbConfigRtrnPtr rtrn; -#endif { if (rtrn->keymap) _XkbFree(rtrn->keymap); if (rtrn->keycodes) _XkbFree(rtrn->keycodes); @@ -964,13 +886,7 @@ DefaultCleanUp(rtrn) } static Bool -#if NeedFunctionPrototypes DefaultApplyNames(XkbConfigRtrnPtr rtrn,XkbDescPtr xkb) -#else -DefaultApplyNames(rtrn,xkb) - XkbConfigRtrnPtr rtrn; - XkbDescPtr xkb; -#endif { char *str; @@ -1010,13 +926,7 @@ char *str; } static Bool -#if NeedFunctionPrototypes DefaultApplyControls(XkbConfigRtrnPtr rtrn,XkbDescPtr xkb) -#else -DefaultApplyControls(rtrn,xkb) - XkbConfigRtrnPtr rtrn; - XkbDescPtr xkb; -#endif { unsigned on,off; XkbControlsPtr ctrls; @@ -1135,18 +1045,10 @@ unsigned int mask; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes DefaultFinish( XkbConfigFieldsPtr fields, XkbDescPtr xkb, XkbConfigRtrnPtr rtrn, int what) -#else -DefaultFinish(fields,xkb,rtrn,what) - XkbConfigFieldsPtr fields; - XkbDescPtr xkb; - XkbConfigRtrnPtr rtrn; - int what; -#endif { if ((what==XkbCF_Destroy)||(what==XkbCF_CleanUp)) return DefaultCleanUp(rtrn); @@ -1239,12 +1141,7 @@ XkbConfigFieldsPtr XkbCFDflts= &_XkbCFDflts; /***====================================================================***/ XkbConfigFieldsPtr -#if NeedFunctionPrototypes XkbCFDup(XkbConfigFieldsPtr fields) -#else -XkbCFDup(fields) - XkbConfigFieldsPtr fields; -#endif { XkbConfigFieldsPtr pNew; @@ -1272,13 +1169,7 @@ XkbConfigFieldsPtr pNew; } XkbConfigFieldsPtr -#if NeedFunctionPrototypes XkbCFFree(XkbConfigFieldsPtr fields,Bool all) -#else -XkbCFFree(fields,all) - XkbConfigFieldsPtr fields; - Bool all; -#endif { XkbConfigFieldsPtr next; @@ -1299,16 +1190,9 @@ XkbConfigFieldsPtr next; } Bool -#if NeedFunctionPrototypes XkbCFApplyRtrnValues( XkbConfigRtrnPtr rtrn, XkbConfigFieldsPtr fields, XkbDescPtr xkb) -#else -XkbCFApplyRtrnValues(rtrn,fields,xkb) - XkbConfigRtrnPtr rtrn; - XkbConfigFieldsPtr fields; - XkbDescPtr xkb; -#endif { Bool ok; @@ -1322,16 +1206,9 @@ Bool ok; } XkbConfigRtrnPrivPtr -#if NeedFunctionPrototypes XkbCFAddPrivate( XkbConfigRtrnPtr rtrn, XkbConfigFieldsPtr fields, XPointer ptr) -#else -XkbCFAddPrivate(rtrn,fields,ptr) - XkbConfigRtrnPtr rtrn; - XkbConfigFieldsPtr fields; - XPointer ptr; -#endif { XkbConfigRtrnPrivPtr priv; @@ -1348,16 +1225,9 @@ XkbConfigRtrnPrivPtr priv; } void -#if NeedFunctionPrototypes XkbCFFreeRtrn( XkbConfigRtrnPtr rtrn, XkbConfigFieldsPtr fields, XkbDescPtr xkb) -#else -XkbCFFreeRtrn(rtrn,fields,xkb) - XkbConfigRtrnPtr rtrn; - XkbConfigFieldsPtr fields; - XkbDescPtr xkb; -#endif { XkbConfigRtrnPrivPtr tmp,next; @@ -1378,18 +1248,10 @@ XkbConfigRtrnPrivPtr tmp,next; } Bool -#if NeedFunctionPrototypes XkbCFParse( FILE * file, XkbConfigFieldsPtr fields, XkbDescPtr xkb, XkbConfigRtrnPtr rtrn) -#else -XkbCFParse(file,fields,xkb,rtrn) - FILE * file; - XkbConfigFieldsPtr fields; - XkbDescPtr xkb; - XkbConfigRtrnPtr rtrn; -#endif { int tok; XkbCFScanResultRec val; @@ -1440,15 +1302,7 @@ BAILOUT: /*ARGSUSED*/ void -#if NeedFunctionPrototypes XkbCFReportError(FILE *file,char *name,int error,int line) -#else -XkbCFReportError(file,name,error,line) - FILE * file; - char * name; - int error; - int line; -#endif { char * msg; diff --git a/src/xkbdraw.c b/src/xkbdraw.c index bbd2519..9218bc5 100644 --- a/src/xkbdraw.c +++ b/src/xkbdraw.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbdraw.c,v 1.3 2001/07/29 05:01:13 tsi Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbdraw.c,v 1.4 2003/11/17 22:20:23 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -40,14 +40,7 @@ #include "XKBfileInt.h" static void -#if NeedFunctionPrototypes _XkbAddDrawable(XkbDrawablePtr *pfirst,XkbDrawablePtr *plast,XkbDrawablePtr tmp) -#else -_XkbAddDrawable(pfirst,plast,tmp) - XkbDrawablePtr * pfirst; - XkbDrawablePtr * plast; - XkbDrawablePtr tmp; -#endif { XkbDrawablePtr old; @@ -74,13 +67,7 @@ XkbDrawablePtr old; } XkbDrawablePtr -#if NeedFunctionPrototypes XkbGetOrderedDrawables(XkbGeometryPtr geom,XkbSectionPtr section) -#else -XkbGetOrderedDrawables(geom,section) - XkbGeometryPtr geom; - XkbSectionPtr section; -#endif { XkbDrawablePtr first,last,tmp; int i; @@ -133,12 +120,7 @@ int i; } void -#if NeedFunctionPrototypes XkbFreeOrderedDrawables(XkbDrawablePtr draw) -#else -XkbFreeOrderedDrawables(draw) - XkbDrawablePtr draw; -#endif { XkbDrawablePtr tmp; diff --git a/src/xkbmisc.c b/src/xkbmisc.c index 8246390..2a6d836 100644 --- a/src/xkbmisc.c +++ b/src/xkbmisc.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.4 2002/12/20 20:18:35 paulo Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbmisc.c,v 1.8 2003/11/17 22:20:24 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -55,16 +55,12 @@ #define XKBSRV_NEED_FILE_FUNCS 1 #include "XKBsrv.h" #include <X11/extensions/XKBgeom.h> +#include "xkb.h" #endif unsigned -#if NeedFunctionPrototypes _XkbKSCheckCase(KeySym ks) -#else -_XkbKSCheckCase(ks) - KeySym ks; -#endif { unsigned set,rtrn; @@ -149,13 +145,7 @@ unsigned set,rtrn; /***===================================================================***/ int -#if NeedFunctionPrototypes _XkbStrCaseCmp(char *str1,char *str2) -#else -_XkbStrCaseCmp(str1,str2) - char * str1; - char * str2; -#endif { char buf1[512],buf2[512]; char c, *s; @@ -183,20 +173,11 @@ _XkbStrCaseCmp(str1,str2) /***===================================================================***/ Bool -#if NeedFunctionPrototypes XkbLookupGroupAndLevel( XkbDescPtr xkb, int key, int * mods_inout, int * grp_inout, int * lvl_rtrn) -#else -XkbLookupGroupAndLevel(xkb,key,mods_inout,grp_inout,lvl_rtrn) - XkbDescPtr xkb; - int key; - int * mods_inout; - int * grp_inout; - int * lvl_rtrn; -#endif { int nG,eG; @@ -262,14 +243,7 @@ int nG,eG; /***===================================================================***/ static Bool -#if NeedFunctionPrototypes XkbWriteSectionFromName(FILE *file,char *sectionName,char *name) -#else -XkbWriteSectionFromName(file,sectionName,name) - FILE * file; - char * sectionName; - char * name; -#endif { fprintf(file," xkb_%-20s { include \"%s\" };\n",sectionName,name); return True; @@ -280,45 +254,25 @@ XkbWriteSectionFromName(file,sectionName,name) /* ARGSUSED */ static void -#if NeedFunctionPrototypes _AddIncl( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, int index, void * priv) -#else -_AddIncl(file,result,topLevel,showImplicit,index,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - int index; - void * priv; -#endif { - if ((priv)&&(strcmp(priv,"%")!=0)) + if ((priv)&&(strcmp((char *)priv,"%")!=0)) fprintf(file," include \"%s\"\n",(char *)priv); return; } Bool -#if NeedFunctionPrototypes XkbWriteXKBKeymapForNames( FILE * file, XkbComponentNamesPtr names, Display * dpy, XkbDescPtr xkb, unsigned want, unsigned need) -#else -XkbWriteXKBKeymapForNames(file,names,dpy,xkb,want,need) - FILE * file; - XkbComponentNamesPtr names; - Display * dpy; - XkbDescPtr xkb; - unsigned want; - unsigned need; -#endif { char * name,*tmp; unsigned complete; @@ -503,13 +457,7 @@ XkbFileInfo finfo; /*ARGSUSED*/ Status -#if NeedFunctionPrototypes XkbMergeFile(XkbDescPtr xkb,XkbFileInfo finfo) -#else -XkbMergeFile(xkb,finfo) - XkbDescPtr xkb; - XkbFileInfo *finfo; -#endif { return BadImplementation; } @@ -517,14 +465,7 @@ XkbMergeFile(xkb,finfo) /***====================================================================***/ int -#if NeedFunctionPrototypes XkbFindKeycodeByName(XkbDescPtr xkb,char *name,Bool use_aliases) -#else -XkbFindKeycodeByName(xkb,name,use_aliases) - XkbDescPtr xkb; - char * name; - Bool use_aliases; -#endif { register int i; @@ -557,13 +498,7 @@ register int i; unsigned -#if NeedFunctionPrototypes XkbConvertGetByNameComponents(Bool toXkm,unsigned orig) -#else -XkbConvertGetByNameComponents(toXkm,orig) - Bool toXkm; - unsigned orig; -#endif { unsigned rtrn; @@ -589,13 +524,7 @@ unsigned rtrn; } unsigned -#if NeedFunctionPrototypes XkbConvertXkbComponents(Bool toXkm,unsigned orig) -#else -XkbConvertXkbComponents(toXkm,orig) - Bool toXkm; - unsigned orig; -#endif { unsigned rtrn; @@ -623,14 +552,7 @@ unsigned rtrn; } Bool -#if NeedFunctionPrototypes XkbDetermineFileType(XkbFileInfoPtr finfo,int format,int *opts_missing) -#else -XkbDetermineFileType(finfo,format,opts_missing) - XkbFileInfoPtr finfo; - int format; - int * opts_missing; -#endif { unsigned present; XkbDescPtr xkb; @@ -715,12 +637,7 @@ static unsigned char componentSpecLegal[] = { }; void -#if NeedFunctionPrototypes XkbEnsureSafeMapName(char *name) -#else -XkbEnsureSafeMapName(name) - char *name; -#endif { if (name==NULL) return; @@ -737,13 +654,7 @@ XkbEnsureSafeMapName(name) #define UNMATCHABLE(c) (((c)=='(')||((c)==')')||((c)=='/')) Bool -#if NeedFunctionPrototypes XkbNameMatchesPattern(char *name,char *ptrn) -#else -XkbNameMatchesPattern(name,ptrn) - char * name; - char * ptrn; -#endif { while (ptrn[0]!='\0') { if (name[0]=='\0') { diff --git a/src/xkbout.c b/src/xkbout.c index fd7603b..d688aca 100644 --- a/src/xkbout.c +++ b/src/xkbout.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkbout.c,v 3.9 2001/10/28 03:32:47 tsi Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkbout.c,v 3.10 2003/11/17 22:20:24 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -63,15 +63,7 @@ #define VMOD_COMMENT_VALUE 2 static Bool -#if NeedFunctionPrototypes WriteXKBVModDecl(FILE *file,Display *dpy,XkbDescPtr xkb,int showValue) -#else -WriteXKBVModDecl(file,dpy,xkb,showValue) - FILE * file; - Display * dpy; - XkbDescPtr xkb; - int showValue; -#endif { register int i,nMods; Atom * vmodNames; @@ -109,14 +101,7 @@ Atom * vmodNames; /***====================================================================***/ static Bool -#if NeedFunctionPrototypes WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action) -#else -WriteXKBAction(file,result,action) - FILE * file; - XkbFileInfo * result; - XkbAnyAction * action; -#endif { XkbDescPtr xkb; Display * dpy; @@ -130,22 +115,12 @@ Display * dpy; /***====================================================================***/ Bool -#if NeedFunctionPrototypes XkbWriteXKBKeycodes( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBKeycodes(file,result,topLevel,showImplicit,addOn,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Atom kcName; register unsigned i; @@ -204,22 +179,12 @@ char * alternate; } Bool -#if NeedFunctionPrototypes XkbWriteXKBKeyTypes( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBKeyTypes(file,result,topLevel,showImplicit,addOn,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Display * dpy; register unsigned i,n; @@ -284,22 +249,12 @@ XkbDescPtr xkb; } static Bool -#if NeedFunctionPrototypes WriteXKBIndicatorMap( FILE * file, XkbFileInfo * result, Atom name, XkbIndicatorMapPtr led, XkbFileAddOnFunc addOn, void * priv) -#else -WriteXKBIndicatorMap(file,result,name,led,addOn,priv) - FILE * file; - XkbFileInfo * result; - Atom name; - XkbIndicatorMapPtr led; - XkbFileAddOnFunc addOn; - void * priv; -#endif { XkbDescPtr xkb; @@ -337,22 +292,12 @@ XkbDescPtr xkb; } Bool -#if NeedFunctionPrototypes XkbWriteXKBCompatMap( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBCompatMap(file,result,topLevel,showImplicit,addOn,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Display * dpy; register unsigned i; @@ -426,22 +371,12 @@ XkbDescPtr xkb; } Bool -#if NeedFunctionPrototypes XkbWriteXKBSymbols( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBSymbols(file,result,topLevel,showImplicit,addOn,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Display * dpy; register unsigned i,tmp; @@ -638,22 +573,12 @@ Bool showActions; } static Bool -#if NeedFunctionPrototypes WriteXKBOutline( FILE * file, XkbShapePtr shape, XkbOutlinePtr outline, int lastRadius, int first, int indent) -#else -WriteXKBOutline(file,shape,outline,lastRadius,first,indent) - FILE * file; - XkbShapePtr shape; - XkbOutlinePtr outline; - int lastRadius; - int first; - int indent; -#endif { register int i; XkbPointPtr pt; @@ -688,20 +613,11 @@ char * iStr; } static Bool -#if NeedFunctionPrototypes WriteXKBDoodad( FILE * file, Display * dpy, unsigned indent, XkbGeometryPtr geom, XkbDoodadPtr doodad) -#else -WriteXKBDoodad(file,dpy,indent,geom,doodad) - FILE * file; - Display * dpy; - unsigned indent; - XkbGeometryPtr geom; - XkbDoodadPtr doodad; -#endif { register char * i_str; XkbShapePtr shape; @@ -789,20 +705,11 @@ XkbColorPtr color; /*ARGSUSED*/ static Bool -#if NeedFunctionPrototypes WriteXKBOverlay( FILE * file, Display * dpy, unsigned indent, XkbGeometryPtr geom, XkbOverlayPtr ol) -#else -WriteXKBOverlay(file,dpy,indent,geom,ol) - FILE * file; - Display * dpy; - unsigned indent; - XkbGeometryPtr geom; - XkbOverlayPtr ol; -#endif { register char * i_str; int r,k,nOut; @@ -833,18 +740,10 @@ XkbOverlayKeyPtr key; } static Bool -#if NeedFunctionPrototypes WriteXKBSection( FILE * file, Display * dpy, XkbSectionPtr s, XkbGeometryPtr geom) -#else -WriteXKBSection(file,dpy,s,geom) - FILE * file; - Display * dpy; - XkbSectionPtr s; - XkbGeometryPtr geom; -#endif { register int i; XkbRowPtr row; @@ -930,22 +829,12 @@ int dfltKeyColor = 0; } Bool -#if NeedFunctionPrototypes XkbWriteXKBGeometry( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBGeometry(file,result,topLevel,showImplicit,addOn,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Display * dpy; register unsigned i,n; @@ -1048,22 +937,12 @@ XkbGeometryPtr geom; /*ARGSUSED*/ Bool -#if NeedFunctionPrototypes XkbWriteXKBSemantics( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBSemantics(file,result,topLevel,showImplicit,addOn,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Bool ok; @@ -1076,22 +955,12 @@ Bool ok; /*ARGSUSED*/ Bool -#if NeedFunctionPrototypes XkbWriteXKBLayout( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBLayout(file,result,topLevel,showImplicit,addOn,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Bool ok; XkbDescPtr xkb; @@ -1109,22 +978,12 @@ XkbDescPtr xkb; /*ARGSUSED*/ Bool -#if NeedFunctionPrototypes XkbWriteXKBKeymap( FILE * file, XkbFileInfo * result, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBKeymap(file,result,topLevel,showImplicit,addOn,priv) - FILE * file; - XkbFileInfo * result; - Bool topLevel; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Bool ok; XkbDescPtr xkb; @@ -1142,31 +1001,20 @@ XkbDescPtr xkb; } Bool -#if NeedFunctionPrototypes XkbWriteXKBFile( FILE * out, XkbFileInfo * result, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) -#else -XkbWriteXKBFile(out,result,showImplicit,addOn,priv) - FILE * out; - XkbFileInfo * result; - Bool showImplicit; - XkbFileAddOnFunc addOn; - void * priv; -#endif { Bool ok = False; Bool (*func)( -#if NeedFunctionPrototypes FILE * /* file */, XkbFileInfo * /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, void * /* priv */ -#endif ) = NULL; switch (result->type) { diff --git a/src/xkbtext.c b/src/xkbtext.c index d233af0..fc593e7 100644 --- a/src/xkbtext.c +++ b/src/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; diff --git a/src/xkmout.c b/src/xkmout.c index 18418f1..45c9147 100644 --- a/src/xkmout.c +++ b/src/xkmout.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkmout.c,v 1.5 2001/07/25 15:04:58 dawes Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkmout.c,v 1.6 2003/11/17 22:20:24 dawes Exp $ */ #include <stdio.h> #include <ctype.h> @@ -52,13 +52,7 @@ typedef struct _XkmInfo { #define xkmPutCARD8(f,v) (putc(v,f),1) static int -#if NeedFunctionPrototypes xkmPutCARD16(FILE *file,unsigned val) -#else -xkmPutCARD16(file,val) - FILE * file; - unsigned val; -#endif { CARD16 tmp= val; @@ -67,13 +61,7 @@ CARD16 tmp= val; } static int -#if NeedFunctionPrototypes xkmPutCARD32(FILE *file,unsigned long val) -#else -xkmPutCARD32(file,val) - FILE * file; - unsigned long val; -#endif { CARD32 tmp= val; @@ -82,13 +70,7 @@ CARD32 tmp= val; } static int -#if NeedFunctionPrototypes xkmPutPadding(FILE *file,unsigned pad) -#else -xkmPutPadding(file,pad) - FILE * file; - unsigned pad; -#endif { int i; for (i=0;i<pad;i++) { @@ -98,14 +80,7 @@ int i; } static int -#if NeedFunctionPrototypes xkmPutCountedBytes(FILE *file,char *ptr,unsigned count) -#else -xkmPutCountedBytes(file,ptr,count) - FILE * file; - char * ptr; - unsigned count; -#endif { register int nOut; register unsigned pad; @@ -125,12 +100,7 @@ register unsigned pad; } static unsigned -#if NeedFunctionPrototypes xkmSizeCountedString(char *str) -#else -xkmSizeCountedString(str) - char * str; -#endif { if (str==NULL) return 4; @@ -138,13 +108,7 @@ xkmSizeCountedString(str) } static int -#if NeedFunctionPrototypes xkmPutCountedString(FILE *file,char *str) -#else -xkmPutCountedString(file,str) - FILE * file; - char * str; -#endif { if (str==NULL) return xkmPutCARD32(file,(unsigned long)0); @@ -160,18 +124,10 @@ xkmPutCountedString(file,str) /***====================================================================***/ static unsigned -#if NeedFunctionPrototypes SizeXKMVirtualMods( XkbFileInfo * result, XkmInfo * info, xkmSectionInfo * toc, int * offset_inout) -#else -SizeXKMVirtualMods(result,info,toc,offset_inout) - XkbFileInfo * result; - XkmInfo * info; - xkmSectionInfo * toc; - int * offset_inout; -#endif { Display * dpy; XkbDescPtr xkb; @@ -211,14 +167,7 @@ register unsigned i,bit; } static unsigned -#if NeedFunctionPrototypes WriteXKMVirtualMods(FILE *file,XkbFileInfo *result,XkmInfo *info) -#else -WriteXKMVirtualMods(file,result,info) - FILE * file; - XkbFileInfo * result; - XkmInfo * info; -#endif { register unsigned int i,bit; XkbDescPtr xkb; @@ -248,14 +197,7 @@ unsigned size= 0; /***====================================================================***/ static unsigned -#if NeedFunctionPrototypes SizeXKMKeycodes(XkbFileInfo *result,xkmSectionInfo *toc,int *offset_inout) -#else -SizeXKMKeycodes(result,toc,offset_inout) - XkbFileInfo * result; - xkmSectionInfo * toc; - int * offset_inout; -#endif { XkbDescPtr xkb; Atom kcName; @@ -286,13 +228,7 @@ Display * dpy; } static unsigned -#if NeedFunctionPrototypes WriteXKMKeycodes(FILE *file,XkbFileInfo *result) -#else -WriteXKMKeycodes(file,result) - FILE * file; - XkbFileInfo * result; -#endif { XkbDescPtr xkb; Atom kcName; @@ -324,14 +260,7 @@ unsigned tmp,size= 0; /***====================================================================***/ static unsigned -#if NeedFunctionPrototypes SizeXKMKeyTypes(XkbFileInfo *result,xkmSectionInfo *toc,int *offset_inout) -#else -SizeXKMKeyTypes(result,toc,offset_inout) - XkbFileInfo * result; - xkmSectionInfo * toc; - int * offset_inout; -#endif { register unsigned i,n,size; XkbKeyTypePtr type; @@ -376,13 +305,7 @@ char * name; } static unsigned -#if NeedFunctionPrototypes WriteXKMKeyTypes(FILE *file,XkbFileInfo *result) -#else -WriteXKMKeyTypes(file,result) - FILE * file; - XkbFileInfo * result; -#endif { register unsigned i,n; XkbDescPtr xkb; @@ -445,18 +368,10 @@ char * name; /***====================================================================***/ static unsigned -#if NeedFunctionPrototypes SizeXKMCompatMap( XkbFileInfo * result, XkmInfo * info, xkmSectionInfo * toc, int * offset_inout) -#else -SizeXKMCompatMap(result,info,toc,offset_inout) - XkbFileInfo * result; - XkmInfo * info; - xkmSectionInfo * toc; - int * offset_inout; -#endif { XkbDescPtr xkb; char * name; @@ -496,14 +411,7 @@ Display * dpy; } static unsigned -#if NeedFunctionPrototypes WriteXKMCompatMap(FILE *file,XkbFileInfo *result,XkmInfo *info) -#else -WriteXKMCompatMap(file,result,info) - FILE * file; - XkbFileInfo * result; - XkmInfo * info; -#endif { register unsigned i; char * name; @@ -557,18 +465,10 @@ unsigned tmp,size=0; /***====================================================================***/ static unsigned -#if NeedFunctionPrototypes SizeXKMSymbols( XkbFileInfo * result, XkmInfo * info, xkmSectionInfo * toc, int * offset_inout) -#else -SizeXKMSymbols(result,info,toc,offset_inout) - XkbFileInfo * result; - XkmInfo * info; - xkmSectionInfo * toc; - int * offset_inout; -#endif { Display * dpy; XkbDescPtr xkb; @@ -627,14 +527,7 @@ char * name; } static unsigned -#if NeedFunctionPrototypes WriteXKMSymbols(FILE *file,XkbFileInfo *result,XkmInfo *info) -#else -WriteXKMSymbols(file,result,info) - FILE * file; - XkbFileInfo * result; - XkmInfo * info; -#endif { Display * dpy; XkbDescPtr xkb; @@ -744,16 +637,8 @@ unsigned tmp,size= 0; /***====================================================================***/ static unsigned -#if NeedFunctionPrototypes SizeXKMIndicators(XkbFileInfo *result,XkmInfo *info,xkmSectionInfo *toc, int *offset_inout) -#else -SizeXKMIndicators(result,info,toc,offset_inout) - XkbFileInfo * result; - XkmInfo * info; - xkmSectionInfo * toc; - int * offset_inout; -#endif { Display * dpy; XkbDescPtr xkb; @@ -797,14 +682,7 @@ register unsigned i,nLEDs; } static unsigned -#if NeedFunctionPrototypes WriteXKMIndicators(FILE *file,XkbFileInfo *result,XkmInfo *info) -#else -WriteXKMIndicators(file,result,info) - FILE * file; - XkbFileInfo * result; - XkmInfo * info; -#endif { Display * dpy; XkbDescPtr xkb; @@ -850,13 +728,7 @@ unsigned tmp,size= 0; /***====================================================================***/ static unsigned -#if NeedFunctionPrototypes SizeXKMGeomDoodad(XkbFileInfo *result,XkbDoodadPtr doodad) -#else -SizeXKMGeomDoodad(result,doodad) - XkbFileInfo * result; - XkbDoodadPtr doodad; -#endif { unsigned size; @@ -873,13 +745,7 @@ unsigned size; } static unsigned -#if NeedFunctionPrototypes SizeXKMGeomSection(XkbFileInfo *result,XkbSectionPtr section) -#else -SizeXKMGeomSection(result,section) - XkbFileInfo * result; - XkbSectionPtr section; -#endif { register int i; unsigned size; @@ -916,14 +782,7 @@ unsigned size; } static unsigned -#if NeedFunctionPrototypes SizeXKMGeometry(XkbFileInfo *result,xkmSectionInfo *toc,int *offset_inout) -#else -SizeXKMGeometry(result,toc,offset_inout) - XkbFileInfo * result; - xkmSectionInfo * toc; - int * offset_inout; -#endif { register int i; Display * dpy; @@ -989,14 +848,7 @@ unsigned size; } static unsigned -#if NeedFunctionPrototypes WriteXKMGeomDoodad(FILE *file,XkbFileInfo *result,XkbDoodadPtr doodad) -#else -WriteXKMGeomDoodad(file,result,doodad) - FILE * file; - XkbFileInfo * result; - XkbDoodadPtr doodad; -#endif { Display * dpy; XkbDescPtr xkb; @@ -1052,14 +904,7 @@ unsigned tmp,size= 0; } static unsigned -#if NeedFunctionPrototypes WriteXKMGeomOverlay(FILE *file,XkbFileInfo *result,XkbOverlayPtr ol) -#else -WriteXKMGeomOverlay(file,result,ol) - FILE * file; - XkbFileInfo * result; - XkbOverlayPtr ol; -#endif { register int r,k; Display * dpy; @@ -1096,14 +941,7 @@ unsigned tmp,size= 0; } static unsigned -#if NeedFunctionPrototypes WriteXKMGeomSection(FILE *file,XkbFileInfo *result,XkbSectionPtr section) -#else -WriteXKMGeomSection(file,result,section) - FILE * file; - XkbFileInfo * result; - XkbSectionPtr section; -#endif { register int i; Display * dpy; @@ -1164,13 +1002,7 @@ unsigned tmp,size= 0; } static unsigned -#if NeedFunctionPrototypes WriteXKMGeometry(FILE *file,XkbFileInfo *result) -#else -WriteXKMGeometry(file,result) - FILE * file; - XkbFileInfo * result; -#endif { register int i; Display * dpy; @@ -1271,18 +1103,10 @@ unsigned tmp,size= 0; /*ARGSUSED*/ static int -#if NeedFunctionPrototypes GetXKMKeyNamesTOC( XkbFileInfo * result, XkmInfo * info, int max_toc, xkmSectionInfo *toc_rtrn) -#else -GetXKMKeyNamesTOC(result,info,max_toc,toc_rtrn) - XkbFileInfo * result; - XkmInfo * info; - int max_toc; - xkmSectionInfo * toc_rtrn; -#endif { int num_toc; int total_size; @@ -1297,18 +1121,10 @@ int total_size; /*ARGSUSED*/ static int -#if NeedFunctionPrototypes GetXKMTypesTOC( XkbFileInfo * result, XkmInfo * info, int max_toc, xkmSectionInfo *toc_rtrn) -#else -GetXKMTypesTOC(result,info,max_toc,toc_rtrn) - XkbFileInfo * result; - XkmInfo * info; - int max_toc; - xkmSectionInfo * toc_rtrn; -#endif { int num_toc; int total_size; @@ -1323,18 +1139,10 @@ int total_size; /*ARGSUSED*/ static int -#if NeedFunctionPrototypes GetXKMCompatMapTOC( XkbFileInfo * result, XkmInfo * info, int max_toc, xkmSectionInfo *toc_rtrn) -#else -GetXKMCompatMapTOC(result,info,max_toc,toc_rtrn) - XkbFileInfo * result; - XkmInfo * info; - int max_toc; - xkmSectionInfo * toc_rtrn; -#endif { int num_toc; int total_size; @@ -1351,18 +1159,10 @@ int total_size; /*ARGSUSED*/ static int -#if NeedFunctionPrototypes GetXKMSemanticsTOC( XkbFileInfo * result, XkmInfo * info, int max_toc, xkmSectionInfo *toc_rtrn) -#else -GetXKMSemanticsTOC(result,info,max_toc,toc_rtrn) - XkbFileInfo * result; - XkmInfo * info; - int max_toc; - xkmSectionInfo * toc_rtrn; -#endif { int num_toc; int total_size; @@ -1381,18 +1181,10 @@ int total_size; /*ARGSUSED*/ static int -#if NeedFunctionPrototypes GetXKMLayoutTOC( XkbFileInfo * result, XkmInfo * info, int max_toc, xkmSectionInfo *toc_rtrn) -#else -GetXKMLayoutTOC(result,info,max_toc,toc_rtrn) - XkbFileInfo * result; - XkmInfo * info; - int max_toc; - xkmSectionInfo * toc_rtrn; -#endif { int num_toc; int total_size; @@ -1415,18 +1207,10 @@ int total_size; /*ARGSUSED*/ static int -#if NeedFunctionPrototypes GetXKMKeymapTOC( XkbFileInfo * result, XkmInfo * info, int max_toc, xkmSectionInfo *toc_rtrn) -#else -GetXKMKeymapTOC(result,info,max_toc,toc_rtrn) - XkbFileInfo * result; - XkmInfo * info; - int max_toc; - xkmSectionInfo * toc_rtrn; -#endif { int num_toc; int total_size; @@ -1451,18 +1235,10 @@ int total_size; /*ARGSUSED*/ static int -#if NeedFunctionPrototypes GetXKMGeometryTOC( XkbFileInfo * result, XkmInfo * info, int max_toc, xkmSectionInfo *toc_rtrn) -#else -GetXKMGeometryTOC(result,info,max_toc,toc_rtrn) - XkbFileInfo * result; - XkmInfo * info; - int max_toc; - xkmSectionInfo * toc_rtrn; -#endif { int num_toc; int total_size; @@ -1474,20 +1250,11 @@ int total_size; } static Bool -#if NeedFunctionPrototypes WriteXKMFile( FILE * file, XkbFileInfo * result, int num_toc, xkmSectionInfo *toc, XkmInfo * info) -#else -WriteXKMFile(file,result,num_toc,toc,info) - FILE * file; - XkbFileInfo * result; - int num_toc; - xkmSectionInfo * toc; - XkmInfo * info; -#endif { register int i; unsigned tmp,size,total= 0; @@ -1535,13 +1302,7 @@ unsigned tmp,size,total= 0; #define MAX_TOC 16 Bool -#if NeedFunctionPrototypes XkbWriteXKMFile(FILE *out,XkbFileInfo *result) -#else -XkbWriteXKMFile(out,result) - FILE * out; - XkbFileInfo * result; -#endif { Bool ok; XkbDescPtr xkb; @@ -1551,12 +1312,10 @@ unsigned hdr,present; xkmFileInfo fileInfo; xkmSectionInfo toc[MAX_TOC]; int (*getTOC)( -#if NeedFunctionPrototypes XkbFileInfo * /* result */, XkmInfo * /* info */, int /* max_to */, xkmSectionInfo */* toc_rtrn */ -#endif ); switch (result->type) { diff --git a/src/xkmread.c b/src/xkmread.c index af6cc3e..b7a08e2 100644 --- a/src/xkmread.c +++ b/src/xkmread.c @@ -24,7 +24,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.6 2002/02/13 22:09:42 herrb Exp $ */ +/* $XFree86: xc/lib/xkbfile/xkmread.c,v 1.7 2003/11/17 22:20:24 dawes Exp $ */ #include <stdio.h> @@ -57,14 +57,7 @@ #include "XKBgeom.h" Atom -#if NeedFunctionPrototypes XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) -#else -XkbInternAtom(dpy,str,only_if_exists) - Display * dpy; - char * str; - Bool only_if_exists; -#endif { if (str==NULL) return None; @@ -78,12 +71,7 @@ XkbInternAtom(dpy,str,only_if_exists) #endif char * -#if NeedFunctionPrototypes _XkbDupString(char *str) -#else -_XkbDupString(str) - char *str; -#endif { char *new; @@ -98,15 +86,7 @@ char *new; /***====================================================================***/ static XPointer -#if NeedFunctionPrototypes XkmInsureSize(XPointer oldPtr,int oldCount,int *newCountRtrn,int elemSize) -#else -XkmInsureSize(oldPtr,oldCount,newCountRtrn,elemSize) - XPointer oldPtr; - int oldCount; - int * newCountRtrn; - int elemSize; -#endif { int newCount= *newCountRtrn; @@ -131,13 +111,7 @@ int newCount= *newCountRtrn; #define XkmInsureTypedSize(p,o,n,t) ((p)=((t *)XkmInsureSize((char *)(p),(o),(n),sizeof(t)))) static CARD8 -#if NeedFunctionPrototypes XkmGetCARD8(FILE *file,int *pNRead) -#else -XkmGetCARD8(file,pNRead) - FILE * file; - int * pNRead; -#endif { int tmp; tmp= getc(file); @@ -147,13 +121,7 @@ int tmp; } static CARD16 -#if NeedFunctionPrototypes XkmGetCARD16(FILE *file,int *pNRead) -#else -XkmGetCARD16(file,pNRead) - FILE * file; - int * pNRead; -#endif { CARD16 val; @@ -163,13 +131,7 @@ CARD16 val; } static CARD32 -#if NeedFunctionPrototypes XkmGetCARD32(FILE *file,int *pNRead) -#else -XkmGetCARD32(file,pNRead) - FILE * file; - int * pNRead; -#endif { CARD32 val; @@ -179,13 +141,7 @@ CARD32 val; } static int -#if NeedFunctionPrototypes XkmSkipPadding(FILE *file,unsigned pad) -#else -XkmSkipPadding(file,pad) - FILE * file; - unsigned pad; -#endif { register int i,nRead=0; @@ -197,14 +153,7 @@ register int i,nRead=0; } static int -#if NeedFunctionPrototypes XkmGetCountedString(FILE *file,char *str,int max_len) -#else -XkmGetCountedString(file,str,max_len) - FILE * file; - char * str; - int max_len; -#endif { int count,nRead=0; @@ -235,14 +184,7 @@ int count,nRead=0; /***====================================================================***/ static int -#if NeedFunctionPrototypes ReadXkmVirtualMods(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) -#else -ReadXkmVirtualMods(file,result,changes) - FILE * file; - XkbFileInfo * result; - XkbChangesPtr changes; -#endif { register unsigned int i,bit; unsigned int bound,named,tmp; @@ -286,14 +228,7 @@ XkbDescPtr xkb; /***====================================================================***/ static int -#if NeedFunctionPrototypes ReadXkmKeycodes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) -#else -ReadXkmKeycodes(file,result,changes) - FILE * file; - XkbFileInfo * result; - XkbChangesPtr changes; -#endif { register int i; unsigned minKC,maxKC,nAl; @@ -360,14 +295,7 @@ XkbDescPtr xkb; /***====================================================================***/ static int -#if NeedFunctionPrototypes ReadXkmKeyTypes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) -#else -ReadXkmKeyTypes(file,result,changes) - FILE * file; - XkbFileInfo * result; - XkbChangesPtr changes; -#endif { register unsigned i,n; unsigned num_types; @@ -505,14 +433,7 @@ XkbDescPtr xkb; /***====================================================================***/ static int -#if NeedFunctionPrototypes ReadXkmCompatMap(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) -#else -ReadXkmCompatMap(file,result,changes) - FILE * file; - XkbFileInfo * result; - XkbChangesPtr changes; -#endif { register int i; unsigned num_si,groups; @@ -590,14 +511,7 @@ XkbCompatMapPtr compat; } static int -#if NeedFunctionPrototypes ReadXkmIndicators(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) -#else -ReadXkmIndicators(file,result,changes) - FILE * file; - XkbFileInfo * result; - XkbChangesPtr changes; -#endif { register unsigned nLEDs; xkmIndicatorMapDesc wire; @@ -654,15 +568,7 @@ XkbDescPtr xkb; } static XkbKeyTypePtr -#if NeedFunctionPrototypes FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms) -#else -FindTypeForKey(xkb,name,width,syms) - XkbDescPtr xkb; - Atom name; - unsigned width; - KeySym * syms; -#endif { if ((!xkb)||(!xkb->map)) return NULL; @@ -690,13 +596,7 @@ FindTypeForKey(xkb,name,width,syms) } static int -#if NeedFunctionPrototypes ReadXkmSymbols(FILE *file,XkbFileInfo *result) -#else -ReadXkmSymbols(file,result) - FILE * file; - XkbFileInfo * result; -#endif { register int i,g,s,totalVModMaps; xkmKeySymMapDesc wireMap; @@ -851,19 +751,11 @@ XkbDescPtr xkb; } static int -#if NeedFunctionPrototypes ReadXkmGeomDoodad( FILE * file, Display * dpy, XkbGeometryPtr geom, XkbSectionPtr section) -#else -ReadXkmGeomDoodad(file,dpy,geom,section) - FILE * file; - Display * dpy; - XkbGeometryPtr geom; - XkbSectionPtr section; -#endif { XkbDoodadPtr doodad; xkmDoodadDesc doodadWire; @@ -918,18 +810,10 @@ int nRead=0; } static int -#if NeedFunctionPrototypes ReadXkmGeomOverlay( FILE * file, Display * dpy, XkbGeometryPtr geom, XkbSectionPtr section) -#else -ReadXkmGeomOverlay(file,dpy,geom,section) - FILE * file; - Display * dpy; - XkbGeometryPtr geom; - XkbSectionPtr section; -#endif { char buf[100]; unsigned tmp; @@ -969,16 +853,9 @@ register int r; } static int -#if NeedFunctionPrototypes ReadXkmGeomSection( FILE * file, Display * dpy, XkbGeometryPtr geom) -#else -ReadXkmGeomSection(file,dpy,geom) - FILE * file; - Display * dpy; - XkbGeometryPtr geom; -#endif { register int i; XkbSectionPtr section; @@ -1058,13 +935,7 @@ Atom nameAtom; } static int -#if NeedFunctionPrototypes ReadXkmGeometry(FILE *file,XkbFileInfo *result) -#else -ReadXkmGeometry(file,result) - FILE * file; - XkbFileInfo * result; -#endif { register int i; char buf[100]; @@ -1192,12 +1063,7 @@ XkbGeometrySizesRec sizes; } Bool -#if NeedFunctionPrototypes XkmProbe(FILE *file) -#else -XkmProbe(file) - FILE * file; -#endif { unsigned hdr,tmp; int nRead=0; @@ -1214,15 +1080,7 @@ int nRead=0; } Bool -#if NeedFunctionPrototypes XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc) -#else -XkmReadTOC(file,file_info,max_toc,toc) - FILE * file; - xkmFileInfo * file_info; - int max_toc; - xkmSectionInfo * toc; -#endif { unsigned hdr,tmp; int nRead=0; @@ -1255,14 +1113,7 @@ unsigned i,size_toc; } xkmSectionInfo * -#if NeedFunctionPrototypes XkmFindTOCEntry(xkmFileInfo *finfo,xkmSectionInfo *toc,unsigned type) -#else -XkmFindTOCEntry(finfo,toc,type) - xkmFileInfo * finfo; - xkmSectionInfo * toc; - unsigned type; -#endif { register int i; @@ -1274,18 +1125,10 @@ register int i; } Bool -#if NeedFunctionPrototypes XkmReadFileSection( FILE * file, xkmSectionInfo * toc, XkbFileInfo * result, unsigned * loaded_rtrn) -#else -XkmReadFileSection(file,toc,result,loaded_rtrn) - FILE * file; - xkmSectionInfo * toc; - XkbFileInfo * result; - unsigned * loaded_rtrn; -#endif { xkmSectionInfo tmpTOC; int nRead; @@ -1353,13 +1196,7 @@ int nRead; } char * -#if NeedFunctionPrototypes XkmReadFileSectionName(FILE *file,xkmSectionInfo *toc) -#else -XkmReadFileSectionName(file,toc) - FILE * file; - xkmSectionInfo * toc; -#endif { xkmSectionInfo tmpTOC; char name[100]; @@ -1397,15 +1234,7 @@ char name[100]; #define MAX_TOC 16 unsigned -#if NeedFunctionPrototypes XkmReadFile(FILE *file,unsigned need,unsigned want,XkbFileInfo *result) -#else -XkmReadFile(file,need,want,result) - FILE * file; - unsigned need; - unsigned want; - XkbFileInfo * result; -#endif { register unsigned i; xkmSectionInfo toc[MAX_TOC],tmpTOC; |