Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-09-21 00:13:11 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-09-21 00:13:11 +0400
commit1525d127da1d0f5eb197805e6c8e0c27eda9d520 (patch)
treebc47b5ede8ddcfc65d84aa39bfdc5b5f3dd43c89 /newlib/libc/locale
parentda25e61f5998b4ec3e72486cdcd84f6220253ac8 (diff)
2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
* libc/ctype/Makefile.am: Add new files. * libc/ctype/Makefile.in: Regenerated. * libc/ctype/ctype.tex: Add new iswxxxx, towxxxx, wctype, and wctrans functions to documentation index. * libc/ctype/iswalnum.c: New file. * libc/ctype/iswalpha.c: Ditto. * libc/ctype/iswblank.c: Ditto. * libc/ctype/iswcntrl.c: Ditto. * libc/ctype/iswctype.c: Ditto. * libc/ctype/iswdigit.c: Ditto. * libc/ctype/iswgraph.c: Ditto. * libc/ctype/iswlower.c: Ditto. * libc/ctype/iswprint.c: Ditto. * libc/ctype/iswpunct.c: Ditto. * libc/ctype/iswspace.c: Ditto. * libc/ctype/iswupper.c: Ditto. * libc/ctype/iswxdigit.c: Ditto. * libc/ctype/jp2uc.c: Ditto. * libc/ctype/jp2uc.h: Ditto. * libc/ctype/local.h: Ditto. * libc/ctype/towctrans.c: Ditto. * libc/ctype/towlower.c: Ditto. * libc/ctype/towupper.c: Ditto. * libc/ctype/utf8alpha.h: Ditto. * libc/ctype/utf8print.h: Ditto. * libc/ctype/utf8punct.h: Ditto. * libc/ctype/wctrans.c: Ditto. * libc/ctype/wctype.c: Ditto. * libc/locale/locale.c (__lc_ctype): New external array to replace static lc_ctype array. * libc/stdlib/mbtowc_r.c: Use __lc_ctype to check current lc_ctype rather than reentrancy structure's _current_locale field. * libc/stdlib/wctomb_r.c: Ditto.
Diffstat (limited to 'newlib/libc/locale')
-rw-r--r--newlib/libc/locale/locale.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 691ff9f80..772f150fc 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -112,6 +112,7 @@ static _CONST struct lconv lconv =
char * _EXFUN(__locale_charset,(_VOID));
static char *charset = "ISO-8859-1";
+char __lc_ctype[12] = "C";
char *
_DEFUN(_setlocale_r, (p, category, locale),
@@ -129,7 +130,6 @@ _DEFUN(_setlocale_r, (p, category, locale),
}
return "C";
#else
- static char lc_ctype[12] = "C";
static char last_lc_ctype[12] = "C";
static char lc_messages[12] = "C";
static char last_lc_messages[12] = "C";
@@ -143,8 +143,8 @@ _DEFUN(_setlocale_r, (p, category, locale),
return 0;
if (category == LC_ALL)
{
- strcpy (last_lc_ctype, lc_ctype);
- strcpy (lc_ctype, "C");
+ strcpy (last_lc_ctype, __lc_ctype);
+ strcpy (__lc_ctype, "C");
strcpy (last_lc_messages, lc_messages);
strcpy (lc_messages, "C");
__mb_cur_max = 1;
@@ -189,8 +189,8 @@ _DEFUN(_setlocale_r, (p, category, locale),
if (category == LC_CTYPE)
{
- strcpy (last_lc_ctype, lc_ctype);
- strcpy (lc_ctype, locale_name);
+ strcpy (last_lc_ctype, __lc_ctype);
+ strcpy (__lc_ctype, locale_name);
__mb_cur_max = 1;
if (locale[1] == '-')
@@ -257,7 +257,7 @@ _DEFUN(_setlocale_r, (p, category, locale),
else
{
if (category == LC_CTYPE)
- return lc_ctype;
+ return __lc_ctype;
else if (category == LC_MESSAGES)
return lc_messages;
}