X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flib%2Fctype.h;h=adc96be2ead8c05213c3d256b38fdbfa3592c2a5;hb=4419844a889e14a9d7b08205a41b7d97fe4b2bfc;hp=71b432cb00942477f15fde9b6cf03fa897f2d203;hpb=c4e51cf599d385832ea60b1cc1813212b569c854;p=pintos-anon 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 */