mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-29 21:46:40 +00:00
Static markup and dead code cull over xkb/.
The former <X11/extensions/XKBsrv.h> has been pulled into the server now as include/xkbsrv.h, and the world updated to look for it in the new place, since it made no sense to define server API in an extension header. Any further work along this line will need to do similar things with XKBgeom.h and friends.
This commit is contained in:
parent
9398d62f27
commit
021fc5cb2c
57 changed files with 1269 additions and 1378 deletions
126
xkb/xkbout.c
126
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue