From e6584db26da34572fb13aa236e16e19f71c8e976 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 26 Aug 2022 14:16:16 +0200 Subject: user/libc: prepare for OpenED port --- src/user/lib/ctype.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/user/lib/ctype.c') diff --git a/src/user/lib/ctype.c b/src/user/lib/ctype.c index b702703..7d3a707 100644 --- a/src/user/lib/ctype.c +++ b/src/user/lib/ctype.c @@ -29,3 +29,12 @@ int isupper(int c) { return 'A' <= c && c <= 'Z'; } +int tolower(int c) { + if (isupper(c)) return c - 'A' + 'a'; + return c; +} + +int toupper(int c) { + if (islower(c)) return c - 'a' + 'A'; + return c; +} -- cgit v1.2.3