Update.
2000-02-12 Ulrich Drepper <drepper@redhat.com> * locale/nl_langinfo.h: Add casts to prevent warnings. * wctype/iswctype_l.c: Use correct types for mapped data. * wctype/wcfuncs.c: Add one more comment for clarification. * wctype/wcfuncs_l.c: Use __ctype32_tolower and __ctype32_toupper. * wctype/wctrans.c: Likewise.
This commit is contained in:
parent
65580ca855
commit
b02b9253e0
|
@ -1,3 +1,12 @@
|
||||||
|
2000-02-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* locale/nl_langinfo.h: Add casts to prevent warnings.
|
||||||
|
|
||||||
|
* wctype/iswctype_l.c: Use correct types for mapped data.
|
||||||
|
* wctype/wcfuncs.c: Add one more comment for clarification.
|
||||||
|
* wctype/wcfuncs_l.c: Use __ctype32_tolower and __ctype32_toupper.
|
||||||
|
* wctype/wctrans.c: Likewise.
|
||||||
|
|
||||||
2000-02-12 Andreas Jaeger <aj@suse.de>
|
2000-02-12 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* sysdeps/mips/dl-machine.h (__start): Rewritten for 2.2 startup
|
* sysdeps/mips/dl-machine.h (__start): Rewritten for 2.2 startup
|
||||||
|
|
|
@ -35,13 +35,13 @@ nl_langinfo (item)
|
||||||
|
|
||||||
if (category < 0 || category >= LC_ALL)
|
if (category < 0 || category >= LC_ALL)
|
||||||
/* Bogus category: bogus item. */
|
/* Bogus category: bogus item. */
|
||||||
return "";
|
return (char *) "";
|
||||||
|
|
||||||
data = *_nl_current[category];
|
data = *_nl_current[category];
|
||||||
|
|
||||||
if (index >= data->nstrings)
|
if (index >= data->nstrings)
|
||||||
/* Bogus index for this category: bogus item. */
|
/* Bogus index for this category: bogus item. */
|
||||||
return "";
|
return (char *) "";
|
||||||
|
|
||||||
/* Return the string for the specified item. */
|
/* Return the string for the specified item. */
|
||||||
return (char *) data->values[index].string;
|
return (char *) data->values[index].string;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
||||||
|
|
||||||
|
@ -27,14 +27,14 @@
|
||||||
int
|
int
|
||||||
__iswctype_l (wint_t wc, wctype_t desc, __locale_t locale)
|
__iswctype_l (wint_t wc, wctype_t desc, __locale_t locale)
|
||||||
{
|
{
|
||||||
const unsigned int *class32_b;
|
const uint32_t *class32_b;
|
||||||
size_t idx;
|
size_t idx;
|
||||||
|
|
||||||
idx = cname_lookup (wc, locale);
|
idx = cname_lookup (wc, locale);
|
||||||
if (idx == ~((size_t) 0))
|
if (idx == ~((size_t) 0))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
class32_b = (u_int32_t *)
|
class32_b = (uint32_t *)
|
||||||
locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS32)].string;
|
locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS32)].string;
|
||||||
|
|
||||||
return class32_b[idx] & desc;
|
return class32_b[idx] & desc;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -25,6 +25,8 @@
|
||||||
/* If the program is compiled without optimization the following declaration
|
/* If the program is compiled without optimization the following declaration
|
||||||
is not visible in the header. */
|
is not visible in the header. */
|
||||||
extern unsigned int *__ctype32_b;
|
extern unsigned int *__ctype32_b;
|
||||||
|
|
||||||
|
/* These are not exported. */
|
||||||
extern const uint32_t *__ctype32_toupper;
|
extern const uint32_t *__ctype32_toupper;
|
||||||
extern const uint32_t *__ctype32_tolower;
|
extern const uint32_t *__ctype32_tolower;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -18,6 +18,10 @@
|
||||||
|
|
||||||
#define __NO_WCTYPE
|
#define __NO_WCTYPE
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define USE_IN_EXTENDED_LOCALE_MODEL
|
||||||
|
#include "cname-lookup.h"
|
||||||
|
|
||||||
/* Provide real-function versions of all the wctype macros. */
|
/* Provide real-function versions of all the wctype macros. */
|
||||||
|
|
||||||
|
@ -40,11 +44,31 @@ func (__iswxdigit_l, _ISwxdigit)
|
||||||
wint_t
|
wint_t
|
||||||
(__towlower_l) (wint_t wc, __locale_t locale)
|
(__towlower_l) (wint_t wc, __locale_t locale)
|
||||||
{
|
{
|
||||||
return __towctrans_l (wc, locale->__ctype_tolower, locale);
|
const int32_t *class32_tolower;
|
||||||
|
size_t idx;
|
||||||
|
|
||||||
|
idx = cname_lookup (wc, locale);
|
||||||
|
if (idx == ~((size_t) 0))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
class32_tolower = (const int32_t *)
|
||||||
|
locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_TOLOWER32)].string;
|
||||||
|
|
||||||
|
return class32_tolower[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
wint_t
|
wint_t
|
||||||
(__towupper_l) (wint_t wc, __locale_t locale)
|
(__towupper_l) (wint_t wc, __locale_t locale)
|
||||||
{
|
{
|
||||||
return __towctrans_l (wc, locale->__ctype_toupper, locale);
|
const int32_t *class32_toupper;
|
||||||
|
size_t idx;
|
||||||
|
|
||||||
|
idx = cname_lookup (wc, locale);
|
||||||
|
if (idx == ~((size_t) 0))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
class32_toupper = (const int32_t *)
|
||||||
|
locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_TOUPPER32)].string;
|
||||||
|
|
||||||
|
return class32_toupper[idx];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ wctrans (const char *property)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (cnt == 0)
|
if (cnt == 0)
|
||||||
return (wctrans_t) __ctype_toupper;
|
return (wctrans_t) __ctype32_toupper;
|
||||||
else if (cnt == 1)
|
else if (cnt == 1)
|
||||||
return (wctrans_t) __ctype_tolower;
|
return (wctrans_t) __ctype32_tolower;
|
||||||
|
|
||||||
/* We have to search the table. */
|
/* We have to search the table. */
|
||||||
result = (int32_t *) _NL_CURRENT (LC_CTYPE, _NL_NUM_LC_CTYPE + cnt - 2);
|
result = (int32_t *) _NL_CURRENT (LC_CTYPE, _NL_NUM_LC_CTYPE + cnt - 2);
|
||||||
|
|
Loading…
Reference in New Issue