Fix #6740:
* remove declaration of ctype-..._l() functions, as we do not provide them and they are not really needed by our hacked glibc * replace remaining invocations of isspace_l() and isupper_l() in glibc with isspace() and isupper() respectively This allows libroot to be built in DEBUG mode, again. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39380 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ea75a051ad
commit
bd13a264f7
@ -192,87 +192,6 @@ toupper (int __c) __THROW
|
||||
|
||||
#endif /* Not __NO_CTYPE. */
|
||||
|
||||
|
||||
#ifdef __USE_GNU
|
||||
/* The concept of one static locale per category is not very well
|
||||
thought out. Many applications will need to process its data using
|
||||
information from several different locales. Another application is
|
||||
the implementation of the internationalization handling in the
|
||||
upcoming ISO C++ standard library. To support this another set of
|
||||
the functions using locale data exist which have an additional
|
||||
argument.
|
||||
|
||||
Attention: all these functions are *not* standardized in any form.
|
||||
This is a proof-of-concept implementation. */
|
||||
|
||||
/* Structure for reentrant locale using functions. This is an
|
||||
(almost) opaque type for the user level programs. */
|
||||
# include <xlocale.h>
|
||||
|
||||
/* These definitions are similar to the ones above but all functions
|
||||
take as an argument a handle for the locale which shall be used. */
|
||||
# define __isctype_l(c, type, locale) \
|
||||
((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)
|
||||
|
||||
# define __exctype_l(name) extern int name (int, __locale_t) __THROW
|
||||
|
||||
/* The following names are all functions:
|
||||
int isCHARACTERISTIC(int c, locale_t *locale);
|
||||
which return nonzero iff C has CHARACTERISTIC.
|
||||
For the meaning of the characteristic names, see the `enum' above. */
|
||||
__exctype_l (__isalnum_l);
|
||||
__exctype_l (__isalpha_l);
|
||||
__exctype_l (__iscntrl_l);
|
||||
__exctype_l (__isdigit_l);
|
||||
__exctype_l (__islower_l);
|
||||
__exctype_l (__isgraph_l);
|
||||
__exctype_l (__isprint_l);
|
||||
__exctype_l (__ispunct_l);
|
||||
__exctype_l (__isspace_l);
|
||||
__exctype_l (__isupper_l);
|
||||
__exctype_l (__isxdigit_l);
|
||||
|
||||
__exctype_l (__isblank_l);
|
||||
|
||||
|
||||
/* Return the lowercase version of C in locale L. */
|
||||
extern int __tolower_l (int __c, __locale_t __l) __THROW;
|
||||
|
||||
/* Return the uppercase version of C in locale L. */
|
||||
extern int __toupper_l (int __c, __locale_t __l) __THROW;
|
||||
|
||||
# if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus
|
||||
# define __tolower_l(c, locale) \
|
||||
__tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale))
|
||||
# define __toupper_l(c, locale) \
|
||||
__tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale))
|
||||
# endif /* Optimizing gcc */
|
||||
|
||||
|
||||
# ifndef __NO_CTYPE
|
||||
# define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l))
|
||||
# define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l))
|
||||
# define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l))
|
||||
# define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l))
|
||||
# define __islower_l(c,l) __isctype_l((c), _ISlower, (l))
|
||||
# define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l))
|
||||
# define __isprint_l(c,l) __isctype_l((c), _ISprint, (l))
|
||||
# define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l))
|
||||
# define __isspace_l(c,l) __isctype_l((c), _ISspace, (l))
|
||||
# define __isupper_l(c,l) __isctype_l((c), _ISupper, (l))
|
||||
# define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l))
|
||||
|
||||
# define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))
|
||||
|
||||
# if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
|
||||
# define __isascii_l(c,l) __isascii(c)
|
||||
# define __toascii_l(c,l) __toascii(c)
|
||||
# endif
|
||||
|
||||
# endif /* Not __NO_CTYPE. */
|
||||
|
||||
#endif /* Use GNU. */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* ctype.h */
|
||||
|
@ -29,9 +29,9 @@ strip (char *wp, const char *s)
|
||||
|
||||
while (*s != '\0')
|
||||
{
|
||||
if (__isalnum_l (*s, &_nl_C_locobj)
|
||||
if (isalnum(*s)
|
||||
|| *s == '_' || *s == '-' || *s == '.')
|
||||
*wp++ = __toupper_l (*s, &_nl_C_locobj);
|
||||
*wp++ = toupper(*s);
|
||||
else if (*s == '/')
|
||||
{
|
||||
if (++slash_count == 3)
|
||||
@ -52,7 +52,7 @@ static inline char * __attribute__ ((unused))
|
||||
upstr (char *dst, const char *str)
|
||||
{
|
||||
char *cp = dst;
|
||||
while ((*cp++ = __toupper_l (*str++, &_nl_C_locobj)) != '\0')
|
||||
while ((*cp++ = toupper(*str++)) != '\0')
|
||||
/* nothing */;
|
||||
return dst;
|
||||
}
|
||||
|
@ -132,20 +132,20 @@ add_alias (char *rp, void *modules)
|
||||
struct gconv_alias *new_alias;
|
||||
char *from, *to, *wp;
|
||||
|
||||
while (__isspace_l (*rp, &_nl_C_locobj))
|
||||
while (isspace(*rp))
|
||||
++rp;
|
||||
from = wp = rp;
|
||||
while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
|
||||
*wp++ = __toupper_l (*rp++, &_nl_C_locobj);
|
||||
while (*rp != '\0' && !isspace(*rp))
|
||||
*wp++ = toupper (*rp++);
|
||||
if (*rp == '\0')
|
||||
/* There is no `to' string on the line. Ignore it. */
|
||||
return;
|
||||
*wp++ = '\0';
|
||||
to = ++rp;
|
||||
while (__isspace_l (*rp, &_nl_C_locobj))
|
||||
while (isspace(*rp))
|
||||
++rp;
|
||||
while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
|
||||
*wp++ = __toupper_l (*rp++, &_nl_C_locobj);
|
||||
while (*rp != '\0' && !isspace(*rp))
|
||||
*wp++ = toupper (*rp++);
|
||||
if (to == wp)
|
||||
/* No `to' string, ignore the line. */
|
||||
return;
|
||||
@ -253,30 +253,30 @@ add_module (char *rp, const char *directory, size_t dir_len, void **modules,
|
||||
int need_ext;
|
||||
int cost_hi;
|
||||
|
||||
while (__isspace_l (*rp, &_nl_C_locobj))
|
||||
while (isspace(*rp))
|
||||
++rp;
|
||||
from = rp;
|
||||
while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
|
||||
while (*rp != '\0' && !isspace(*rp))
|
||||
{
|
||||
*rp = __toupper_l (*rp, &_nl_C_locobj);
|
||||
*rp = toupper(*rp);
|
||||
++rp;
|
||||
}
|
||||
if (*rp == '\0')
|
||||
return;
|
||||
*rp++ = '\0';
|
||||
to = wp = rp;
|
||||
while (__isspace_l (*rp, &_nl_C_locobj))
|
||||
while (isspace(*rp))
|
||||
++rp;
|
||||
while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
|
||||
*wp++ = __toupper_l (*rp++, &_nl_C_locobj);
|
||||
while (*rp != '\0' && !isspace(*rp))
|
||||
*wp++ = toupper(*rp++);
|
||||
if (*rp == '\0')
|
||||
return;
|
||||
*wp++ = '\0';
|
||||
do
|
||||
++rp;
|
||||
while (__isspace_l (*rp, &_nl_C_locobj));
|
||||
while (isspace(*rp));
|
||||
module = wp;
|
||||
while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
|
||||
while (*rp != '\0' && !isspace(*rp))
|
||||
*wp++ = *rp++;
|
||||
if (*rp == '\0')
|
||||
{
|
||||
@ -389,7 +389,7 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
|
||||
if (rp[n - 1] == '\n')
|
||||
rp[n - 1] = '\0';
|
||||
|
||||
while (__isspace_l (*rp, &_nl_C_locobj))
|
||||
while (isspace(*rp))
|
||||
++rp;
|
||||
|
||||
/* If this is an empty line go on with the next one. */
|
||||
@ -397,7 +397,7 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
|
||||
continue;
|
||||
|
||||
word = rp;
|
||||
while (*rp != '\0' && !__isspace_l (*rp, &_nl_C_locobj))
|
||||
while (*rp != '\0' && !isspace(*rp))
|
||||
++rp;
|
||||
|
||||
if (rp - word == sizeof ("alias") - 1
|
||||
|
@ -142,7 +142,7 @@ extern const char *__gconv_path_envvar attribute_hidden;
|
||||
tmp = result = __alloca (cp - (str) + 3 + suffix_len); \
|
||||
cp = (str); \
|
||||
while (*cp != '\0') \
|
||||
*tmp++ = __toupper_l (*cp++, &_nl_C_locobj); \
|
||||
*tmp++ = toupper(*cp++); \
|
||||
if (cnt < 2) \
|
||||
{ \
|
||||
*tmp++ = '/'; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user