aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/SetLocale.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-16 20:21:54 -0800
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:29 +0200
commit35dc4784bcee7a42a83cc1dbab13fb82cfcc5803 (patch)
treeb6b5d532cd17665312bcea61337e7f33801e981d /nx-X11/lib/X11/SetLocale.c
parentf04e1a6d1f3cecc041a2495430a960a931bd1d5b (diff)
downloadnx-libs-35dc4784bcee7a42a83cc1dbab13fb82cfcc5803.tar.gz
nx-libs-35dc4784bcee7a42a83cc1dbab13fb82cfcc5803.tar.bz2
nx-libs-35dc4784bcee7a42a83cc1dbab13fb82cfcc5803.zip
Drop X_LOCALE fallback for OS'es without setlocale()
C89 or bust! This was documented as being needed for "only Lynx, Linux-libc5, OS/2" and has never been enabled in modular builds, since none of those platforms have had anyone step up to add support since the X11R7 conversion to autotools. Mostly performed with unifdef -UX_LOCALE, followed by removal of files left without any purpose, and manual cleanup of remaining references. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/SetLocale.c')
-rw-r--r--nx-X11/lib/X11/SetLocale.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/nx-X11/lib/X11/SetLocale.c b/nx-X11/lib/X11/SetLocale.c
index 9ada0fb90..f4d2aca21 100644
--- a/nx-X11/lib/X11/SetLocale.c
+++ b/nx-X11/lib/X11/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(__DARWIN__) || defined(__APPLE__) || defined(__CYGWIN__)
char *
@@ -250,4 +200,3 @@ _XlcMapOSLocaleName(
return osname;
}
-#endif /* X_LOCALE */