x86, setup: move isdigit.h to ctype.h, header files on top.
authorH. Peter Anvin <hpa@zytor.com>
Tue, 3 Aug 2010 04:03:46 +0000 (21:03 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 3 Aug 2010 04:07:20 +0000 (21:07 -0700)
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>

arch/x86/boot/boot.h
arch/x86/boot/compressed/misc.h
arch/x86/boot/compressed/string.c
arch/x86/boot/ctype.h [new file with mode: 0644]
arch/x86/boot/isdigit.h [deleted file]

index 00cf51cfc2e68a397ed1919d3a0e4cc1b22bf498..c7093bd9f2d34f834267ccace3557e8f399f154f 100644 (file)
@@ -28,6 +28,7 @@
 #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)]))
@@ -200,8 +201,6 @@ static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
        return diff;
 }
 
-#include "isdigit.h"
-
 /* Heap -- available for dynamic lists. */
 extern char _end[];
 extern char *HEAP;
index a267849ac1c935a8fbe14f519f63f866d5bd78bd..3f19c81a62036c414c29f05807fc9d3bfaa5390a 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/bootparam.h>
 
 #define BOOT_BOOT_H
+#include "../ctype.h"
 
 /* misc.c */
 extern struct boot_params *real_mode;          /* Pointer to real-mode data */
index 7995c6a495094cff1f5a97c8be196c41c47f2734..19b3e693cd72a5f84b6a52a034d9609a3ccbe239 100644 (file)
@@ -1,4 +1,2 @@
 #include "misc.h"
-
-#include "../isdigit.h"
 #include "../string.c"
diff --git a/arch/x86/boot/ctype.h b/arch/x86/boot/ctype.h
new file mode 100644 (file)
index 0000000..25e1340
--- /dev/null
@@ -0,0 +1,21 @@
+#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
diff --git a/arch/x86/boot/isdigit.h b/arch/x86/boot/isdigit.h
deleted file mode 100644 (file)
index 25e1340..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#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
This page took 0.028863 seconds and 5 git commands to generate.