diff options
author | Kristian Høgsberg <krh@redhat.com> | 2005-09-01 19:56:14 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2005-09-01 19:56:14 +0000 |
commit | 287336f3c9e5023acbfba6508b05a68ccca9ddf0 (patch) | |
tree | 0c176c59fd8e8eaf5614bada8de7d816f8a69aea /xkb | |
parent | 94fbdb5c6d2cdc7b70ecdabe22a9de8b9aabeced (diff) |
Teach xkb how to optionally run xkbcomp from $bindir instead of
$datadir/xkb.
Diffstat (limited to 'xkb')
-rw-r--r-- | xkb/ddxList.c | 2 | ||||
-rw-r--r-- | xkb/ddxLoad.c | 13 | ||||
-rw-r--r-- | xkb/xkbInit.c | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/xkb/ddxList.c b/xkb/ddxList.c index 3cb4be09d..9c961e934 100644 --- a/xkb/ddxList.c +++ b/xkb/ddxList.c @@ -176,7 +176,7 @@ char tmpname[PATH_MAX]; haveDir= False; buf = Xprintf( "'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg, - XkbBaseDirectory,XkbBaseDirectory,componentDirs[what],(long) + XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long) ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:xkbDebugFlags)), file W32_tmpfile ); diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 71c742163..e355b1796 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -243,16 +243,21 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; if (XkbBaseDirectory!=NULL) { #ifndef __UNIXOS2__ char *xkbbasedir = XkbBaseDirectory; + char *xkbbindir = XkbBinDirectory; #else /* relocate the basedir and replace the slashes with backslashes */ char *xkbbasedir = (char*)__XOS2RedirRoot(XkbBaseDirectory); + char *xkbbindir = (char*)__XOS2RedirRoot(XkbBinDirectory); int i; + for (i=0; i<strlen(xkbbasedir); i++) if (xkbbasedir[i]=='/') xkbbasedir[i]='\\'; + for (i=0; i<strlen(xkbbindir); i++) + if (xkbbindir[i]=='/') xkbbindir[i]='\\'; #endif cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", - xkbbasedir, + xkbbindir, ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), xkbbasedir,(map?"-m ":""),(map?map:""), PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file, @@ -337,16 +342,20 @@ char tmpname[PATH_MAX]; #endif #ifndef __UNIXOS2__ char *xkbbasedir = XkbBaseDirectory; + char *xkbbindir = XkbBinDirectory; #else int i; char *xkbbasedir = (char*)__XOS2RedirRoot(XkbBaseDirectory); + char *xkbbindir = (char*)__XOS2RedirRoot(XkbBinDirectory); for (i=0; i<strlen(xkbbasedir); i++) if (xkbbasedir[i]=='/') xkbbasedir[i]='\\'; + for (i=0; i<strlen(xkbbindir); i++) + if (xkbbindir[i]=='/') xkbbindir[i]='\\'; #endif buf = Xprintf( "\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm \"%s\" -em1 %s -emp %s -eml %s \"%s%s.xkm\"", - xkbbasedir, + xkbbindir, ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), xkbbasedir, xkmfile, PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1, diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 7816573c0..a02cf0119 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -100,6 +100,9 @@ typedef struct _SrvXkmInfo { #ifndef XKB_BASE_DIRECTORY #define XKB_BASE_DIRECTORY "/usr/lib/X11/xkb" #endif +#ifndef XKB_BIN_DIRECTORY +#define XKB_BIN_DIRECTORY XKB_BASE_DIRECTORY +#endif #ifndef XKB_DFLT_RULES_FILE #define XKB_DFLT_RULES_FILE "rules" #endif @@ -123,6 +126,7 @@ typedef struct _SrvXkmInfo { #endif char * XkbBaseDirectory= XKB_BASE_DIRECTORY; +char * XkbBinDirectory= XKB_BIN_DIRECTORY; char * XkbInitialMap= NULL; int XkbWantAccessX= 0; static XkbFileInfo * _XkbInitFileInfo= NULL; |