summaryrefslogtreecommitdiff
path: root/lib/libX11/src/SetLocale.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2015-04-06 20:58:00 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2015-04-06 20:58:00 +0000
commit3f119a90b2d43af7b51a26204614151cca6b734f (patch)
tree123bbe87be55c594f0b016cbf0bfc33d9a3e73d0 /lib/libX11/src/SetLocale.c
parent8cff8cd363e78b03bb70b26d1a1faa80ac9f8885 (diff)
update to libX11 1.6.3
Diffstat (limited to 'lib/libX11/src/SetLocale.c')
-rw-r--r--lib/libX11/src/SetLocale.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/lib/libX11/src/SetLocale.c b/lib/libX11/src/SetLocale.c
index c49cb2e4e..69c25c2c3 100644
--- a/lib/libX11/src/SetLocale.c
+++ b/lib/libX11/src/SetLocale.c
@@ -66,56 +66,6 @@ from The Open Group.
#define MAXLOCALE 64 /* buffer size of locale name */
-#ifdef X_LOCALE
-
-/* alternative setlocale() for when the OS does not provide one */
-
-char *
-_Xsetlocale(
- int category,
- _Xconst char *name
-)
-{
- static char *xsl_name;
- char *old_name;
- XrmMethods methods;
- XPointer state;
-
- if (category != LC_CTYPE && category != LC_ALL)
- return NULL;
- if (!name) {
- if (xsl_name)
- return xsl_name;
- return "C";
- }
- if (!*name)
- name = getenv("LC_CTYPE");
- if (!name || !*name)
- name = getenv("LANG");
- if (name && strlen(name) >= MAXLOCALE)
- name = NULL;
- if (!name || !*name || !_XOpenLC((char *) name))
- name = "C";
- old_name = xsl_name;
- xsl_name = (char *)name;
- methods = _XrmInitParseInfo(&state);
- xsl_name = old_name;
- if (!methods)
- return NULL;
- name = (*methods->lcname)(state);
- xsl_name = strdup(name);
- if (!xsl_name) {
- xsl_name = old_name;
- (*methods->destroy)(state);
- return NULL;
- }
- if (old_name)
- Xfree(old_name);
- (*methods->destroy)(state);
- return xsl_name;
-}
-
-#else /* X_LOCALE */
#if defined(__APPLE__) || defined(__CYGWIN__)
char *
@@ -250,4 +200,3 @@ _XlcMapOSLocaleName(
return osname;
}
-#endif /* X_LOCALE */