From b30b093dee7671ccb8c30218d78449c542a6bfec Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 7 Sep 2004 23:47:31 +0000 Subject: [PATCH] Add tolower(), toupper(). --- src/lib/ctype.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/ctype.h b/src/lib/ctype.h index 71b432c..adc96be 100644 --- a/src/lib/ctype.h +++ b/src/lib/ctype.h @@ -22,4 +22,7 @@ static inline int ispunct (int c) { return isprint (c) && !isalnum (c) && !isspace (c); } +static inline int tolower (int c) { return isupper (c) ? c - 'A' + 'a' : c; } +static inline int toupper (int c) { return islower (c) ? c - 'a' + 'A' : c; } + #endif /* lib/ctype.h */ -- 2.30.2