summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/core/include/ctype.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/core/include/ctype.h')
-rw-r--r--contrib/syslinux-4.02/core/include/ctype.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/core/include/ctype.h b/contrib/syslinux-4.02/core/include/ctype.h
new file mode 100644
index 0000000..5c6d4cb
--- /dev/null
+++ b/contrib/syslinux-4.02/core/include/ctype.h
@@ -0,0 +1,25 @@
+#ifndef CTYPE_H
+#define CTYPE_H
+
+/*
+ * Small subset of <ctype.h> for parsing uses, only handles ASCII
+ * and passes the rest through.
+ */
+
+static inline int toupper(int c)
+{
+ if (c >= 'a' && c <= 'z')
+ c -= 0x20;
+
+ return c;
+}
+
+static inline int tolower(int c)
+{
+ if (c >= 'A' && c <= 'Z')
+ c += 0x20;
+
+ return c;
+}
+
+#endif /* CTYPE_H */