aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/SetLocale.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-19 22:15:01 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-19 22:15:01 +0200
commit70ac75f4ab184c21d11b9840a47362610aaef481 (patch)
tree183b9ec7e6897fb2cea7296b461a35ca93dfce6e /nx-X11/lib/X11/SetLocale.c
parent6c303d9e4ffd162b8c7f59a4b135e592d923a656 (diff)
parent70e9d346fe34af127d2c827c3678e53d0f4312ae (diff)
downloadnx-libs-70ac75f4ab184c21d11b9840a47362610aaef481.tar.gz
nx-libs-70ac75f4ab184c21d11b9840a47362610aaef481.tar.bz2
nx-libs-70ac75f4ab184c21d11b9840a47362610aaef481.zip
Merge branch 'uli42-pr/libX11_further_backports' into 3.6.x
Attributes GH PR #222: https://github.com/ArcticaProject/nx-libs/pull/222
Diffstat (limited to 'nx-X11/lib/X11/SetLocale.c')
-rw-r--r--nx-X11/lib/X11/SetLocale.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/nx-X11/lib/X11/SetLocale.c b/nx-X11/lib/X11/SetLocale.c
index cf068403b..f4d2aca21 100644
--- a/nx-X11/lib/X11/SetLocale.c
+++ b/nx-X11/lib/X11/SetLocale.c
@@ -66,57 +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 = Xmalloc(strlen(name) + 1);
- if (!xsl_name) {
- xsl_name = old_name;
- (*methods->destroy)(state);
- return NULL;
- }
- strcpy(xsl_name, name);
- if (old_name)
- Xfree(old_name);
- (*methods->destroy)(state);
- return xsl_name;
-}
-
-#else /* X_LOCALE */
#if defined(__DARWIN__) || defined(__APPLE__) || defined(__CYGWIN__)
char *
@@ -251,4 +200,3 @@ _XlcMapOSLocaleName(
return osname;
}
-#endif /* X_LOCALE */