It is a subset of <ctype.h> functionality, so name it ctype.h. Also,
reorganize header files so #include statements are clustered near the
top as they should be.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <
4C5752F2.
8030206@kernel.org>
#include "bitops.h"
#include <asm/cpufeature.h>
#include <asm/processor-flags.h>
+#include "ctype.h"
/* Useful macros */
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
return diff;
}
-#include "isdigit.h"
-
/* Heap -- available for dynamic lists. */
extern char _end[];
extern char *HEAP;
#include <asm/bootparam.h>
#define BOOT_BOOT_H
+#include "../ctype.h"
/* misc.c */
extern struct boot_params *real_mode; /* Pointer to real-mode data */
#include "misc.h"
-
-#include "../isdigit.h"
#include "../string.c"
--- /dev/null
+#ifndef BOOT_ISDIGIT_H
+
+#define BOOT_ISDIGIT_H
+
+static inline int isdigit(int ch)
+{
+ return (ch >= '0') && (ch <= '9');
+}
+
+static inline int isxdigit(int ch)
+{
+ if (isdigit(ch))
+ return true;
+
+ if ((ch >= 'a') && (ch <= 'f'))
+ return true;
+
+ return (ch >= 'A') && (ch <= 'F');
+}
+
+#endif
+++ /dev/null
-#ifndef BOOT_ISDIGIT_H
-
-#define BOOT_ISDIGIT_H
-
-static inline int isdigit(int ch)
-{
- return (ch >= '0') && (ch <= '9');
-}
-
-static inline int isxdigit(int ch)
-{
- if (isdigit(ch))
- return true;
-
- if ((ch >= 'a') && (ch <= 'f'))
- return true;
-
- return (ch >= 'A') && (ch <= 'F');
-}
-
-#endif