Add tolower and toupper
This commit is contained in:
parent
c2ba116026
commit
7697e5d947
|
@ -3,7 +3,7 @@ LIBLINUXHEADERS=
|
|||
LIBLINUXDIR=
|
||||
LIBLINUXFILE=liblinux.a
|
||||
CFILES=stdio.c string.c
|
||||
OBJFILES=../builds/olibc/stdio.o ../builds/olibc/stdlib.o ../builds/olibc/string.o
|
||||
OBJFILES=../builds/olibc/stdio.o ../builds/olibc/stdlib.o ../builds/olibc/string.o ../builds/olibc/ctype.o
|
||||
LIBFILE=../builds/olibc.a
|
||||
OLIBCHEADERS=include/
|
||||
OLIBCDIR=../builds
|
||||
|
|
|
@ -43,3 +43,11 @@ int isprint(int c) {
|
|||
int isgraph(int c) {
|
||||
return (unsigned)c-0x21 < 0x5e;
|
||||
}
|
||||
|
||||
int tolower(int c) {
|
||||
return isupper(c) ? (c | 32) : c;
|
||||
}
|
||||
|
||||
int toupper(int c) {
|
||||
return islower(c) ? c & 0x5f : c;
|
||||
}
|
||||
|
|
|
@ -12,5 +12,7 @@ int isalnum(int c);
|
|||
int iscntrl(int c);
|
||||
int isprint(int c);
|
||||
int isgraph(int c);
|
||||
int tolower(int c);
|
||||
int toupper(int c);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue