#include <ctype.h>
+#include "libc.h"
int isalnum(int c)
{
return isalpha(c) || isdigit(c);
}
+
+int __isalnum_l(int c, locale_t l)
+{
+ return isalnum(c);
+}
+
+weak_alias(__isalnum_l, isalnum_l);
#include <ctype.h>
+#include "libc.h"
#undef isalpha
int isalpha(int c)
{
return ((unsigned)c|32)-'a' < 26;
}
+
+int __isalpha_l(int c, locale_t l)
+{
+ return isalpha(c);
+}
+
+weak_alias(__isalpha_l, isalpha_l);
#include <ctype.h>
+#include "libc.h"
int isblank(int c)
{
return (c == ' ' || c == '\t');
}
+
+int __isblank_l(int c, locale_t l)
+{
+ return isblank(c);
+}
+
+weak_alias(__isblank_l, isblank_l);
#include <ctype.h>
+#include "libc.h"
int iscntrl(int c)
{
return (unsigned)c < 0x20 || c == 0x7f;
}
+
+int __iscntrl_l(int c, locale_t l)
+{
+ return iscntrl(c);
+}
+
+weak_alias(__iscntrl_l, iscntrl_l);
#include <ctype.h>
+#include "libc.h"
#undef isdigit
int isdigit(int c)
{
return (unsigned)c-'0' < 10;
}
+
+int __isdigit_l(int c, locale_t l)
+{
+ return isdigit(c);
+}
+
+weak_alias(__isdigit_l, isdigit_l);
+#include <ctype.h>
+#include "libc.h"
+#undef isgraph
+
int isgraph(int c)
{
return (unsigned)c-0x21 < 0x5e;
}
+
+int __isgraph_l(int c, locale_t l)
+{
+ return isgraph(c);
+}
+
+weak_alias(__isgraph_l, isgraph_l);
#include <ctype.h>
+#include "libc.h"
#undef islower
int islower(int c)
{
return (unsigned)c-'a' < 26;
}
+
+int __islower_l(int c, locale_t l)
+{
+ return islower(c);
+}
+
+weak_alias(__islower_l, islower_l);
+#include <ctype.h>
+#include "libc.h"
+#undef isprint
+
int isprint(int c)
{
return (unsigned)c-0x20 < 0x5f;
}
+
+int __isprint_l(int c, locale_t l)
+{
+ return isprint(c);
+}
+
+weak_alias(__isprint_l, isprint_l);
#include <ctype.h>
+#include "libc.h"
int ispunct(int c)
{
return isgraph(c) && !isalnum(c);
}
+
+int __ispunct_l(int c, locale_t l)
+{
+ return ispunct(c);
+}
+
+weak_alias(__ispunct_l, ispunct_l);
#include <ctype.h>
+#include "libc.h"
int isspace(int c)
{
return c == ' ' || (unsigned)c-'\t' < 5;
}
+
+int __isspace_l(int c, locale_t l)
+{
+ return isspace(c);
+}
+
+weak_alias(__isspace_l, isspace_l);
#include <ctype.h>
+#include "libc.h"
#undef isupper
int isupper(int c)
{
return (unsigned)c-'A' < 26;
}
+
+int __isupper_l(int c, locale_t l)
+{
+ return isupper(c);
+}
+
+weak_alias(__isupper_l, isupper_l);
-#include <wchar.h>
#include <wctype.h>
+#include "libc.h"
int iswalnum(wint_t wc)
{
return iswdigit(wc) || iswalpha(wc);
}
+
+int __iswalnum_l(wint_t c, locale_t l)
+{
+ return iswalnum(c);
+}
+
+weak_alias(__iswalnum_l, iswalnum_l);
#include <wctype.h>
+#include "libc.h"
static const unsigned char table[] = {
#include "alpha.h"
return 1;
return 0;
}
+
+int __iswalpha_l(wint_t c, locale_t l)
+{
+ return iswalpha(c);
+}
+
+weak_alias(__iswalpha_l, iswalpha_l);
-#include <wchar.h>
#include <wctype.h>
#include <ctype.h>
+#include "libc.h"
int iswblank(wint_t wc)
{
return isblank(wc);
}
+
+int __iswblank_l(wint_t c, locale_t l)
+{
+ return iswblank(c);
+}
+
+weak_alias(__iswblank_l, iswblank_l);
-#include <wchar.h>
#include <wctype.h>
+#include "libc.h"
int iswcntrl(wint_t wc)
{
|| (unsigned)(wc-0x2028) < 2
|| (unsigned)(wc-0xfff9) < 3;
}
+
+int __iswcntrl_l(wint_t c, locale_t l)
+{
+ return iswcntrl(c);
+}
+
+weak_alias(__iswcntrl_l, iswcntrl_l);
-#include <wchar.h>
#include <wctype.h>
#include <string.h>
+#include "libc.h"
#define WCTYPE_ALNUM 1
#define WCTYPE_ALPHA 2
return i;
return 0;
}
+
+int __iswctype_l(wint_t c, wctype_t t, locale_t l)
+{
+ return iswctype(c, t);
+}
+
+wctype_t __wctype_l(const char *s, locale_t l)
+{
+ return wctype(s);
+}
+
+weak_alias(__iswctype_l, iswctype_l);
+weak_alias(__wctype_l, wctype_l);
-#include <wchar.h>
#include <wctype.h>
+#include "libc.h"
#undef iswdigit
{
return (unsigned)wc-'0' < 10;
}
+
+int __iswdigit_l(wint_t c, locale_t l)
+{
+ return iswdigit(c);
+}
+
+weak_alias(__iswdigit_l, iswdigit_l);
#include <wctype.h>
+#include "libc.h"
int iswgraph(wint_t wc)
{
/* ISO C defines this function as: */
return !iswspace(wc) && iswprint(wc);
}
+
+int __iswgraph_l(wint_t c, locale_t l)
+{
+ return iswgraph(c);
+}
+
+weak_alias(__iswgraph_l, iswgraph_l);
#include <wctype.h>
+#include "libc.h"
int iswlower(wint_t wc)
{
return towupper(wc) != wc || wc == 0xdf;
}
+
+int __iswlower_l(wint_t c, locale_t l)
+{
+ return iswlower(c);
+}
+
+weak_alias(__iswlower_l, iswlower_l);
#include <wctype.h>
+#include "libc.h"
/* Consider all legal codepoints as printable except for:
* - C0 and C1 control characters
return 0;
return 1;
}
+
+int __iswprint_l(wint_t c, locale_t l)
+{
+ return iswprint(c);
+}
+
+weak_alias(__iswprint_l, iswprint_l);
#include <wctype.h>
+#include "libc.h"
static const unsigned char table[] = {
#include "punct.h"
return (table[table[wc>>8]*32+((wc&255)>>3)]>>(wc&7))&1;
return 0;
}
+
+int __iswpunct_l(wint_t c, locale_t l)
+{
+ return iswpunct(c);
+}
+
+weak_alias(__iswpunct_l, iswpunct_l);
#include <wchar.h>
#include <wctype.h>
-#include <ctype.h>
+#include "libc.h"
/* Our definition of whitespace is the Unicode White_Space property,
* minus non-breaking spaces (U+00A0, U+2007, and U+202F) and script-
};
return wc && wcschr(spaces, wc);
}
+
+int __iswspace_l(wint_t c, locale_t l)
+{
+ return iswspace(c);
+}
+
+weak_alias(__iswspace_l, iswspace_l);
#include <wctype.h>
+#include "libc.h"
int iswupper(wint_t wc)
{
return towlower(wc) != wc;
}
+
+int __iswupper_l(wint_t c, locale_t l)
+{
+ return iswupper(c);
+}
+
+weak_alias(__iswupper_l, iswupper_l);
-#include <wchar.h>
#include <wctype.h>
+#include "libc.h"
int iswxdigit(wint_t wc)
{
return (unsigned)(wc-'0') < 10 || (unsigned)((wc|32)-'a') < 6;
}
+
+int __iswxdigit_l(wint_t c, locale_t l)
+{
+ return iswxdigit(c);
+}
+
+weak_alias(__iswxdigit_l, iswxdigit_l);
#include <ctype.h>
+#include "libc.h"
int isxdigit(int c)
{
return isdigit(c) || ((unsigned)c|32)-'a' < 6;
}
+
+int __isxdigit_l(int c, locale_t l)
+{
+ return isxdigit(c);
+}
+
+weak_alias(__isxdigit_l, isxdigit_l);
#include <ctype.h>
+#include "libc.h"
int tolower(int c)
{
if (isupper(c)) return c | 32;
return c;
}
+
+int __tolower_l(int c, locale_t l)
+{
+ return tolower(c);
+}
+
+weak_alias(__tolower_l, tolower_l);
#include <ctype.h>
+#include "libc.h"
int toupper(int c)
{
if (islower(c)) return c & 0x5f;
return c;
}
+
+int __toupper_l(int c, locale_t l)
+{
+ return toupper(c);
+}
+
+weak_alias(__toupper_l, toupper_l);
-#include <wchar.h>
#include <wctype.h>
-#include <stdio.h>
+#include "libc.h"
#define CASEMAP(u1,u2,l) { (u1), (l)-(u1), (u2)-(u1)+1 }
#define CASELACE(u1,u2) CASEMAP((u1),(u2),(u1)+1)
{
return __towcase(wc, 1);
}
+
+wint_t __towupper_l(wint_t c, locale_t l)
+{
+ return towupper(c);
+}
+
+wint_t __towlower_l(wint_t c, locale_t l)
+{
+ return towlower(c);
+}
+
+weak_alias(__towupper_l, towupper_l);
+weak_alias(__towlower_l, towlower_l);
#include <wctype.h>
#include <string.h>
+#include "libc.h"
wctrans_t wctrans(const char *class)
{
if (trans == (wctrans_t)2) return towlower(wc);
return wc;
}
+
+wctrans_t __wctrans_l(const char *s, locale_t l)
+{
+ return wctrans(s);
+}
+
+wint_t __towctrans_l(wint_t c, wctrans_t t, locale_t l)
+{
+ return towctrans(c, t);
+}
+
+weak_alias(__wctrans_l, wctrans_l);
+weak_alias(__towctrans_l, towctrans_l);
+++ /dev/null
-#include <ctype.h>
-
-int isalnum_l(int c, locale_t l)
-{
- return isalnum(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int isalpha_l(int c, locale_t l)
-{
- return isalpha(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int isblank_l(int c, locale_t l)
-{
- return isblank(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int iscntrl_l(int c, locale_t l)
-{
- return iscntrl(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int isdigit_l(int c, locale_t l)
-{
- return isdigit(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int isgraph_l(int c, locale_t l)
-{
- return isgraph(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int islower_l(int c, locale_t l)
-{
- return islower(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int isprint_l(int c, locale_t l)
-{
- return isprint(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int ispunct_l(int c, locale_t l)
-{
- return ispunct(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int isspace_l(int c, locale_t l)
-{
- return isspace(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int isupper_l(int c, locale_t l)
-{
- return isupper(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswalnum_l(wint_t c, locale_t l)
-{
- return iswalnum(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswalpha_l(wint_t c, locale_t l)
-{
- return iswalpha(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswblank_l(wint_t c, locale_t l)
-{
- return iswblank(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswcntrl_l(wint_t c, locale_t l)
-{
- return iswcntrl(c);
-}
+++ /dev/null
-#include <wctype.h>
-#include "libc.h"
-
-int iswctype_l(wint_t c, wctype_t t, locale_t l)
-{
- return iswctype(c, t);
-}
-
-weak_alias(iswctype_l, __iswctype_l);
+++ /dev/null
-#include <wctype.h>
-
-int iswdigit_l(wint_t c, locale_t l)
-{
- return iswdigit(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswgraph_l(wint_t c, locale_t l)
-{
- return iswgraph(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswlower_l(wint_t c, locale_t l)
-{
- return iswlower(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswprint_l(wint_t c, locale_t l)
-{
- return iswprint(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswpunct_l(wint_t c, locale_t l)
-{
- return iswpunct(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswspace_l(wint_t c, locale_t l)
-{
- return iswspace(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswupper_l(wint_t c, locale_t l)
-{
- return iswupper(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-int iswxdigit_l(wint_t c, locale_t l)
-{
- return iswxdigit(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int isxdigit_l(int c, locale_t l)
-{
- return isxdigit(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int tolower_l(int c, locale_t l)
-{
- return tolower(c);
-}
+++ /dev/null
-#include <ctype.h>
-
-int toupper_l(int c, locale_t l)
-{
- return toupper(c);
-}
+++ /dev/null
-#include <wctype.h>
-
-wint_t towctrans_l(wint_t c, wctrans_t t, locale_t l)
-{
- return towctrans(c, t);
-}
+++ /dev/null
-#include <wctype.h>
-#include "libc.h"
-
-wint_t towlower_l(wint_t c, locale_t l)
-{
- return towlower(c);
-}
-
-weak_alias(towlower_l, __towlower_l);
+++ /dev/null
-#include <wctype.h>
-#include "libc.h"
-
-wint_t towupper_l(wint_t c, locale_t l)
-{
- return towupper(c);
-}
-
-weak_alias(towupper_l, __towupper_l);
+++ /dev/null
-#include <wctype.h>
-
-wctrans_t wctrans_l(const char *s, locale_t l)
-{
- return wctrans(s);
-}
+++ /dev/null
-#include <wctype.h>
-#include "libc.h"
-
-wctype_t wctype_l(const char *s, locale_t l)
-{
- return wctype(s);
-}
-
-weak_alias(wctype_l, __wctype_l);