aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules/im/ximcp/imLcPrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/modules/im/ximcp/imLcPrs.c')
-rw-r--r--libX11/modules/im/ximcp/imLcPrs.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/libX11/modules/im/ximcp/imLcPrs.c b/libX11/modules/im/ximcp/imLcPrs.c
index aa52c20eb..c0801722a 100644
--- a/libX11/modules/im/ximcp/imLcPrs.c
+++ b/libX11/modules/im/ximcp/imLcPrs.c
@@ -1,4 +1,3 @@
-/* $Xorg: imLcPrs.c,v 1.3 2000/08/17 19:45:14 cpqbld Exp $ */
/******************************************************************
Copyright 1992 by Oki Technosystems Laboratory, Inc.
@@ -30,7 +29,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/lib/X11/imLcPrs.c,v 1.10 2003/09/06 14:06:32 pascal Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -44,6 +42,13 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <sys/stat.h>
#include <stdio.h>
+#define XLC_BUFSIZE 256
+
+extern void xlocaledir(
+ char *buf,
+ int buf_len
+);
+
extern int _Xmbstowcs(
wchar_t *wstr,
char *str,
@@ -304,6 +309,7 @@ static char*
TransFileName(Xim im, char *name)
{
char *home = NULL, *lcCompose = NULL;
+ char dir[XLC_BUFSIZE];
char *i = name, *ret, *j;
int l = 0;
@@ -324,6 +330,10 @@ TransFileName(Xim im, char *name)
if (lcCompose)
l += strlen(lcCompose);
break;
+ case 'S':
+ xlocaledir(dir, XLC_BUFSIZE);
+ l += strlen(dir);
+ break;
}
} else {
l++;
@@ -355,6 +365,10 @@ TransFileName(Xim im, char *name)
Xfree(lcCompose);
}
break;
+ case 'S':
+ strcpy(j, dir);
+ j += strlen(dir);
+ break;
}
i++;
} else {