[hackers] [scc] Revert "[libc] Implement ctype function-style" || Quentin Rameau

From: <git_AT_suckless.org>
Date: Sat, 18 Feb 2017 18:42:58 +0100 (CET)

commit 38586fa8fa99443e61b7f9ae12de448cbe97a98f
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sat Feb 18 13:01:28 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Sat Feb 18 18:38:48 2017 +0100

    Revert "[libc] Implement ctype function-style"
    
    This reverts commit 88da94f56db2db1c405c2f80a4fed7e961b54f78.
    
    My bad, I didn't see those were already here.

diff --git a/libc/src/ctype.c b/libc/src/ctype.c
index c348384..2ee3e94 100644
--- a/libc/src/ctype.c
+++ b/libc/src/ctype.c
_AT_@ -1,6 +1,5 @@
-#include <ctype.h>
 
-#ifdef __USE_MACROS
+#include <ctype.h>
 
 unsigned char _ctype[255] = {
         _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */
_AT_@ -20,93 +19,3 @@ unsigned char _ctype[255] = {
         _L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */
         _L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */
 };
-
-#else
-
-int
-isblank(int c)
-{
- return (c == ' ') || (c == '\t');
-}
-
-int
-iscntrl(int c)
-{
- return (unsigned)c < ' ' || c == 0x7f;
-}
-
-int
-isdigit(int c)
-{
- return (unsigned)c - '0' < 10;
-}
-
-int
-islower(int c)
-{
- return (unsigned)c - 'a' < 26;
-}
-
-int
-isupper(int c)
-{
- return (unsigned)c - 'A' < 26;
-}
-
-int
-isprint(int c)
-{
- return (unsigned)c - ' ' < 95;
-}
-
-int
-isspace(int c)
-{
- return (c == ' ') || ((unsigned)c - '\t' < 5);
-}
-
-int
-isxdigit(int c)
-{
- return isdigit(c) ||
- ((unsigned)c - 'a' < 6) ||
- ((unsigned)c - 'A' < 6);
-}
-
-int
-isgraph(int c)
-{
- return isprint(c) && c != ' ';
-}
-
-int
-isalpha(int c)
-{
- return islower(c) || isupper(c);
-}
-
-int
-isalnum(int c)
-{
- return isalpha(c) || isdigit(c);
-}
-
-int
-ispunct(int c)
-{
- return isprint(c) && !isspace(c) && !isalnum(c);
-}
-
-int
-tolower(int c)
-{
- return (isupper(c) ? (unsigned)c + ' ' : c);
-}
-
-int
-toupper(int c)
-{
- return (islower(c) ? (unsigned)c - ' ' : c);
-}
-
-#endif // __USE_MACROS
Received on Sat Feb 18 2017 - 18:42:58 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 18 2017 - 18:48:23 CET