User: olivierg
Date: 05/09/24 18:31:41
Modified: xemacs/src ChangeLog intl.c
Log:
2005-09-17 Olivier Galibert <galibert(a)xemacs.org>
* intl.c (Fset_current_locale): setlocale return string is valid
only until the next setlocale call.
Revision Changes Path
1.857 +5 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.856
retrieving revision 1.857
diff -u -p -r1.856 -r1.857
--- ChangeLog 2005/09/16 08:51:25 1.856
+++ ChangeLog 2005/09/24 16:31:37 1.857
@@ -1,3 +1,8 @@
+2005-09-17 Olivier Galibert <galibert(a)xemacs.org>
+
+ * intl.c (Fset_current_locale): setlocale return string is valid
+ only until the next setlocale call.
+
2005-09-12 Mike Alexander <mta(a)arbortext.com>
* intl-win32.c (mswindows_current_locale): Define in non-MULE
1.10 +7 -2 XEmacs/xemacs/src/intl.c
Index: intl.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/intl.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- intl.c 2002/05/28 08:44:55 1.9
+++ intl.c 2005/09/24 16:31:39 1.10
@@ -70,26 +70,31 @@ Otherwise, returns the locale, or possib
(locale))
{
Extbyte *loc;
+ Lisp_Object str;
CHECK_STRING (locale);
/* RedHat 6.2 contains a locale called "Francais" with the C-cedilla
encoded in ISO2022! */
LISP_STRING_TO_EXTERNAL (locale, loc, Qctext);
loc = setlocale (LC_ALL, loc);
- setlocale (LC_NUMERIC, "C");
if (!loc)
return Qnil;
+ loc = xstrdup (loc);
+ setlocale (LC_NUMERIC, "C");
#ifdef HAVE_X_WINDOWS
if (!init_x_locale (locale))
{
/* Locale not supported under X. Put it back. */
setlocale (LC_ALL, loc);
setlocale (LC_NUMERIC, "C");
+ free (loc);
return Qnil;
}
#endif
- return build_ext_string (loc, Qctext);
+ str = build_ext_string (loc, Qctext);
+ xfree (loc, Extbyte *);
+ return str;
}
#if 0
Show replies by date