summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGreg Watson <jarrah@users.sourceforge.net>2004-03-17 17:02:28 +0000
committerGreg Watson <jarrah@users.sourceforge.net>2004-03-17 17:02:28 +0000
commitf6d05f501ec6a28fdc53e3876cab872c11e0ab73 (patch)
treee291981b5a1d0db70a463f04250d41d04bba15cd /src
parent9a795cfc8dad97f71a41a3ba6a4574a4f2e223cf (diff)
downloadcoreboot-f6d05f501ec6a28fdc53e3876cab872c11e0ab73.tar.xz
added funcs
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1418 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/include/string.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/string.h b/src/include/string.h
index 1c07af0ca5..3d056818cc 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -104,6 +104,11 @@ static inline int isxdigit(int c)
(c >= 'A' && c <= 'F'));
}
+static inline int isupper(int c)
+{
+ return (c >= 'A' && c <= 'Z');
+}
+
static inline int islower(int c)
{
return (c >= 'a' && c <= 'z');
@@ -115,4 +120,11 @@ static inline int toupper(int c)
c -= 'a'-'A';
return c;
}
+
+static inline int tolower(int c)
+{
+ if (isupper(c))
+ c -= 'A'-'a';
+ return c;
+}
#endif /* STRING_H */