projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dd8ec2
)
Add tolower(), toupper().
author
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 7 Sep 2004 23:47:31 +0000
(23:47 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 7 Sep 2004 23:47:31 +0000
(23:47 +0000)
src/lib/ctype.h
patch
|
blob
|
history
diff --git
a/src/lib/ctype.h
b/src/lib/ctype.h
index 71b432cb00942477f15fde9b6cf03fa897f2d203..adc96be2ead8c05213c3d256b38fdbfa3592c2a5 100644
(file)
--- 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 */