From 8b1fadd6a89f12cbc81c5d621a75b91dd9eedec2 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sat, 5 Feb 2011 11:06:07 -0800 Subject: Adding Sun's fdlibm, and libnix's scanf, tweaked to become an xscanf. Adding a few more libc inlined also. --- libc/include/ctype.h | 2 ++ libc/include/math.h | 4 ---- libc/include/stdio.h | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 libc/include/math.h (limited to 'libc/include') 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 diff --git a/libc/include/math.h b/libc/include/math.h deleted file mode 100644 index b41fee0..0000000 --- a/libc/include/math.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __MATH_H__ -#define __MATH_H__ - -#endif diff --git a/libc/include/stdio.h b/libc/include/stdio.h index 1be0c6e..ee6226f 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -7,6 +7,8 @@ #include #include +static const int EOF = -1; + struct _FILE { int fd; }; -- cgit v1.2.3