summaryrefslogtreecommitdiff
path: root/xkb/ddxConfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkb/ddxConfig.c')
-rw-r--r--xkb/ddxConfig.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xkb/ddxConfig.c b/xkb/ddxConfig.c
index f3635902f..58fc138bd 100644
--- a/xkb/ddxConfig.c
+++ b/xkb/ddxConfig.c
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/programs/Xserver/xkb/ddxConfig.c,v 3.8 2002/12/20 20:18:35 paulo Exp $ */
#include <stdio.h>
#define NEED_EVENTS 1
@@ -106,7 +107,6 @@ char buf[PATH_MAX];
char * dName;
FILE * file;
XkbConfigRtrnPtr rtrn;
-extern char * display;
#if defined(MetroLink)
if (dev && dev->name)
@@ -142,6 +142,9 @@ extern char * display;
sprintf(buf,"X%s-config%s%s",display,(dName[0]?".":""),dName);
}
#endif
+#ifdef __UNIXOS2__
+ strcpy(buf,(char*)__XOS2RedirRoot(buf));
+#endif
#ifdef DEBUG
ErrorF("Looking for keyboard configuration in %s...",buf);
#endif
@@ -190,24 +193,29 @@ extern char * display;
XkbSetRulesUsed(defs);
if (rtrn->keycodes!=NULL) {
+ if (names->keycodes) _XkbFree(names->keycodes);
names->keycodes= rtrn->keycodes;
rtrn->keycodes= NULL;
}
if (rtrn->geometry!=NULL) {
+ if (names->geometry) _XkbFree(names->geometry);
names->geometry= rtrn->geometry;
rtrn->geometry= NULL;
}
if (rtrn->symbols!=NULL) {
if (rtrn->phys_symbols==NULL)
rtrn->phys_symbols= _XkbDupString(names->symbols);
+ if (names->symbols) _XkbFree(names->symbols);
names->symbols= rtrn->symbols;
rtrn->symbols= NULL;
}
if (rtrn->types!=NULL) {
+ if (names->types) _XkbFree(names->types);
names->types= rtrn->types;
rtrn->types= NULL;
}
if (rtrn->compat!=NULL) {
+ if (names->compat) _XkbFree(names->compat);
names->compat= rtrn->compat;
rtrn->compat= NULL;
}