summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ctype.h121
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_ctype.h23
2 files changed, 63 insertions, 81 deletions
diff --git a/include/ctype.h b/include/ctype.h
index 4b73111fd..0cae94101 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -27,6 +27,69 @@
#include <features.h>
#include <bits/types.h>
+__BEGIN_DECLS
+__BEGIN_NAMESPACE_STD
+
+/* The following names are all functions:
+ int isCHARACTERISTIC(int c);
+ which return nonzero iff C has CHARACTERISTIC.
+ For the meaning of the characteristic names, see the `enum' above. */
+extern int isalnum(int __c) __THROW;
+libc_hidden_proto(isalnum)
+extern int isalpha(int __c) __THROW;
+libc_hidden_proto(isalpha)
+extern int iscntrl(int __c) __THROW;
+libc_hidden_proto(iscntrl)
+extern int isdigit(int __c) __THROW;
+libc_hidden_proto(isdigit)
+extern int islower(int __c) __THROW;
+libc_hidden_proto(islower)
+extern int isgraph(int __c) __THROW;
+libc_hidden_proto(isgraph)
+extern int isprint(int __c) __THROW;
+libc_hidden_proto(isprint)
+extern int ispunct(int __c) __THROW;
+libc_hidden_proto(ispunct)
+extern int isspace(int __c) __THROW;
+libc_hidden_proto(isspace)
+extern int isupper(int __c) __THROW;
+libc_hidden_proto(isupper)
+extern int isxdigit(int __c) __THROW;
+libc_hidden_proto(isxdigit)
+
+
+/* Return the lowercase version of C. */
+extern int tolower(int __c) __THROW;
+libc_hidden_proto(tolower)
+
+/* Return the uppercase version of C. */
+extern int toupper(int __c) __THROW;
+libc_hidden_proto(toupper)
+
+#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+/* Return nonzero iff C is in the ASCII set
+ (i.e., is no more than 7 bits wide). */
+extern int isascii(int __c) __THROW;
+libc_hidden_proto(isascii)
+/* Return the part of C that is in the ASCII set
+ (i.e., the low-order 7 bits of C). */
+extern int toascii(int __c) __THROW;
+#endif
+
+__END_NAMESPACE_STD
+
+
+/* ISO C99 introduced one new function. */
+#ifdef __USE_ISOC99
+__BEGIN_NAMESPACE_C99
+
+extern int isblank(int __c) __THROW;
+libc_hidden_proto(isblank)
+
+__END_NAMESPACE_C99
+#endif
+__END_DECLS
+
#ifndef __UCLIBC_HAS_CTYPE_TABLES__
/* "Stub locale": we are permanently in C/POSIX locale.
@@ -150,70 +213,12 @@ libc_hidden_proto(__ctype_tolower)
#define __isdigit_int(C) (((unsigned int)((C) - '0')) <= 9)
#endif
-__BEGIN_NAMESPACE_STD
-
-/* The following names are all functions:
- int isCHARACTERISTIC(int c);
- which return nonzero iff C has CHARACTERISTIC.
- For the meaning of the characteristic names, see the `enum' above. */
-extern int isalnum(int __c) __THROW;
-libc_hidden_proto(isalnum)
-extern int isalpha(int __c) __THROW;
-libc_hidden_proto(isalpha)
-extern int iscntrl(int __c) __THROW;
-libc_hidden_proto(iscntrl)
-extern int isdigit(int __c) __THROW;
-libc_hidden_proto(isdigit)
-extern int islower(int __c) __THROW;
-libc_hidden_proto(islower)
-extern int isgraph(int __c) __THROW;
-libc_hidden_proto(isgraph)
-extern int isprint(int __c) __THROW;
-libc_hidden_proto(isprint)
-extern int ispunct(int __c) __THROW;
-libc_hidden_proto(ispunct)
-extern int isspace(int __c) __THROW;
-libc_hidden_proto(isspace)
-extern int isupper(int __c) __THROW;
-libc_hidden_proto(isupper)
-extern int isxdigit(int __c) __THROW;
-libc_hidden_proto(isxdigit)
-
-
-/* Return the lowercase version of C. */
-extern int tolower(int __c) __THROW;
-libc_hidden_proto(tolower)
-
-/* Return the uppercase version of C. */
-extern int toupper(int __c) __THROW;
-libc_hidden_proto(toupper)
-
-__END_NAMESPACE_STD
-
-
-/* ISO C99 introduced one new function. */
-#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
-
-extern int isblank(int __c) __THROW;
-libc_hidden_proto(isblank)
-
-__END_NAMESPACE_C99
-#endif
-
#ifdef __USE_GNU
/* Test C for a set of character classes according to MASK. */
extern int isctype(int __c, int __mask) __THROW;
#endif
#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
-/* Return nonzero iff C is in the ASCII set
- (i.e., is no more than 7 bits wide). */
-extern int isascii(int __c) __THROW;
-libc_hidden_proto(isascii)
-/* Return the part of C that is in the ASCII set
- (i.e., the low-order 7 bits of C). */
-extern int toascii(int __c) __THROW;
/* These are the same as `toupper' and `tolower' except that they do not
check the argument for being in the range of a `char'. */
extern int _toupper(int __c) __THROW;
diff --git a/libc/sysdeps/linux/common/bits/uClibc_ctype.h b/libc/sysdeps/linux/common/bits/uClibc_ctype.h
index 9150b4870..9fe1f5fc4 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_ctype.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_ctype.h
@@ -95,29 +95,6 @@
/**********************************************************************/
__BEGIN_DECLS
-extern int isalnum(int c) __THROW;
-extern int isalpha(int c) __THROW;
-#ifdef __USE_ISOC99
-extern int isblank(int c) __THROW;
-#endif
-extern int iscntrl(int c) __THROW;
-extern int isdigit(int c) __THROW;
-extern int isgraph(int c) __THROW;
-extern int islower(int c) __THROW;
-extern int isprint(int c) __THROW;
-extern int ispunct(int c) __THROW;
-extern int isspace(int c) __THROW;
-extern int isupper(int c) __THROW;
-extern int isxdigit(int c) __THROW;
-
-extern int tolower(int c) __THROW;
-extern int toupper(int c) __THROW;
-
-#if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
-extern int isascii(int c) __THROW;
-extern int toascii(int c) __THROW;
-#endif
-
#if defined _LIBC && (defined NOT_IN_libc || defined IS_IN_libc)
/* These are uClibc-specific. */
# define __isdigit_char(c) ((unsigned char)((c) - '0') <= 9)