summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/gpxe/src/include/ctype.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/gpxe/src/include/ctype.h')
-rw-r--r--contrib/syslinux-4.02/gpxe/src/include/ctype.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/gpxe/src/include/ctype.h b/contrib/syslinux-4.02/gpxe/src/include/ctype.h
new file mode 100644
index 0000000..ed4d884
--- /dev/null
+++ b/contrib/syslinux-4.02/gpxe/src/include/ctype.h
@@ -0,0 +1,31 @@
+#ifndef _CTYPE_H
+#define _CTYPE_H
+
+/** @file
+ *
+ * Character types
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+#define isdigit(c) ((c) >= '0' && (c) <= '9')
+#define islower(c) ((c) >= 'a' && (c) <= 'z')
+#define isupper(c) ((c) >= 'A' && (c) <= 'Z')
+
+static inline unsigned char tolower(unsigned char c)
+{
+ if (isupper(c))
+ c -= 'A'-'a';
+ return c;
+}
+
+static inline unsigned char toupper(unsigned char c)
+{
+ if (islower(c))
+ c -= 'a'-'A';
+ return c;
+}
+
+extern int isspace ( int c );
+
+#endif /* _CTYPE_H */