summaryrefslogtreecommitdiff
path: root/src/SetLocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/SetLocale.c')
-rw-r--r--src/SetLocale.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/SetLocale.c b/src/SetLocale.c
index ac33f029..c44c3bc3 100644
--- a/src/SetLocale.c
+++ b/src/SetLocale.c
@@ -55,12 +55,15 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
-/* $XFree86: xc/lib/X11/SetLocale.c,v 3.17 2002/05/31 18:45:41 dawes Exp $ */
+/* $XFree86: xc/lib/X11/SetLocale.c,v 3.20 2003/11/17 22:20:08 dawes Exp $ */
#include "Xlibint.h"
#include "Xlcint.h"
#include <X11/Xlocale.h>
#include <X11/Xos.h>
+#include "XlcPubI.h"
+
+#define MAXLOCALE 64 /* buffer size of locale name */
#define MAXLOCALE 64 /* buffer size of locale name */
@@ -68,18 +71,11 @@ from The Open Group.
/* alternative setlocale() for when the OS does not provide one */
-#if NeedFunctionPrototypes
char *
_Xsetlocale(
int category,
_Xconst char *name
)
-#else
-char *
-_Xsetlocale(category, name)
- int category;
- char *name;
-#endif
{
static char *xsl_name;
char *old_name;
@@ -99,7 +95,7 @@ _Xsetlocale(category, name)
name = getenv("LANG");
if (name && strlen(name) >= MAXLOCALE)
name = NULL;
- if (!name || !*name || !_XOpenLC(name))
+ if (!name || !*name || !_XOpenLC((char *) name))
name = "C";
old_name = xsl_name;
xsl_name = (char *)name;
@@ -140,9 +136,9 @@ _Xsetlocale(category, name)
*/
char *
-_XlcMapOSLocaleName(osname, siname)
- char *osname;
- char *siname;
+_XlcMapOSLocaleName(
+ char *osname,
+ char *siname)
{
#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(__UNIXOS2__) || defined(linux)
# ifdef hpux