summaryrefslogtreecommitdiff
path: root/libc/include/ctype.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-02-05 11:06:07 -0800
committerPixel <pixel@nobis-crew.org>2011-02-05 11:06:07 -0800
commit8b1fadd6a89f12cbc81c5d621a75b91dd9eedec2 (patch)
tree0b130b02101391e206c07cb0a1c9031bb4d27f21 /libc/include/ctype.h
parent4830af498e2d3a5440e65c63a3595b91f1cd4ac9 (diff)
Adding Sun's fdlibm, and libnix's scanf, tweaked to become an xscanf. Adding a few more libc inlined also.
Diffstat (limited to 'libc/include/ctype.h')
-rw-r--r--libc/include/ctype.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/include/ctype.h b/libc/include/ctype.h
index 22e3e81..b57abbb 100644
--- a/libc/include/ctype.h
+++ b/libc/include/ctype.h
@@ -16,5 +16,7 @@ static inline int isgraph(int c) { return !iscntrl(c) && !isspace(c); }
static inline int isprint(int c) { return !iscntrl(c); }
static inline int ispunct(int c) { return !iscntrl(c) && !isspace(c) && !isalnum(c); }
+static inline int toupper(int c) { return islower(c) ? c & ~0x20 : c; }
+static inline int tolower(int c) { return isupper(c) ? c | 0x20 : c; }
#endif