diff options
Diffstat (limited to 'xkb/xkbout.c')
-rw-r--r-- | xkb/xkbout.c | 126 |
1 files changed, 1 insertions, 125 deletions
diff --git a/xkb/xkbout.c b/xkb/xkbout.c index 31cd4fae4..bdec8e7d3 100644 --- a/xkb/xkbout.c +++ b/xkb/xkbout.c @@ -44,7 +44,7 @@ #include "dix.h" #include <X11/extensions/XKBstr.h> #define XKBSRV_NEED_FILE_FUNCS 1 -#include <X11/extensions/XKBsrv.h> +#include <xkbsrv.h> #include <X11/extensions/XKBgeom.h> #include <X11/extensions/XKBfile.h> @@ -925,127 +925,3 @@ XkbGeometryPtr geom; fprintf(file,"};\n\n"); return True; } - -/*ARGSUSED*/ -Bool -XkbWriteXKBSemantics( FILE * file, - XkbFileInfo * result, - Bool topLevel, - Bool showImplicit, - XkbFileAddOnFunc addOn, - void * priv) -{ -Bool ok; - - fprintf(file,"xkb_semantics {\n"); - ok= XkbWriteXKBKeyTypes(file,result,False,False,addOn,priv); - ok= ok&&XkbWriteXKBCompatMap(file,result,False,False,addOn,priv); - fprintf(file,"};\n"); - return ok; -} - -/*ARGSUSED*/ -Bool -XkbWriteXKBLayout( FILE * file, - XkbFileInfo * result, - Bool topLevel, - Bool showImplicit, - XkbFileAddOnFunc addOn, - void * priv) -{ -Bool ok; -XkbDescPtr xkb; - - xkb= result->xkb; - fprintf(file,"xkb_layout {\n"); - ok= XkbWriteXKBKeycodes(file,result,False,showImplicit,addOn,priv); - ok= ok&&XkbWriteXKBKeyTypes(file,result,False,showImplicit,addOn,priv); - ok= ok&&XkbWriteXKBSymbols(file,result,False,showImplicit,addOn,priv); - if (xkb->geom) - ok= ok&&XkbWriteXKBGeometry(file,result,False,showImplicit,addOn,priv); - fprintf(file,"};\n"); - return ok; -} - -/*ARGSUSED*/ -Bool -XkbWriteXKBKeymap( FILE * file, - XkbFileInfo * result, - Bool topLevel, - Bool showImplicit, - XkbFileAddOnFunc addOn, - void * priv) -{ -Bool ok; -XkbDescPtr xkb; - - xkb= result->xkb; - fprintf(file,"xkb_keymap {\n"); - ok= XkbWriteXKBKeycodes(file,result,False,showImplicit,addOn,priv); - ok= ok&&XkbWriteXKBKeyTypes(file,result,False,showImplicit,addOn,priv); - ok= ok&&XkbWriteXKBCompatMap(file,result,False,showImplicit,addOn,priv); - ok= ok&&XkbWriteXKBSymbols(file,result,False,showImplicit,addOn,priv); - if (xkb->geom) - ok= ok&&XkbWriteXKBGeometry(file,result,False,showImplicit,addOn,priv); - fprintf(file,"};\n"); - return ok; -} - -Bool -XkbWriteXKBFile( FILE * out, - XkbFileInfo * result, - Bool showImplicit, - XkbFileAddOnFunc addOn, - void * priv) -{ -Bool ok = False; -Bool (*func)( - FILE * /* file */, - XkbFileInfo * /* result */, - Bool /* topLevel */, - Bool /* showImplicit */, - XkbFileAddOnFunc /* addOn */, - void * /* priv */ -) = NULL; - - switch (result->type) { - case XkmSemanticsFile: - func= XkbWriteXKBSemantics; - break; - case XkmLayoutFile: - func= XkbWriteXKBLayout; - break; - case XkmKeymapFile: - func= XkbWriteXKBKeymap; - break; - case XkmTypesIndex: - func= XkbWriteXKBKeyTypes; - break; - case XkmCompatMapIndex: - func= XkbWriteXKBCompatMap; - break; - case XkmSymbolsIndex: - func= XkbWriteXKBSymbols; - break; - case XkmKeyNamesIndex: - func= XkbWriteXKBKeycodes; - break; - case XkmGeometryFile: - case XkmGeometryIndex: - func= XkbWriteXKBGeometry; - break; - case XkmVirtualModsIndex: - case XkmIndicatorsIndex: - _XkbLibError(_XkbErrBadImplementation, - XkbConfigText(result->type,XkbMessage),0); - return False; - } - if (out==NULL) { - _XkbLibError(_XkbErrFileCannotOpen,"XkbWriteXkbFile",0); - ok= False; - } - else if (func) { - ok= (*func)(out,result,True,showImplicit,addOn,priv); - } - return ok; -} |