Gave vsprintf.c its own header file, and made console.h include it.
authorMichael Brown <mcb30@etherboot.org>
Sun, 17 Apr 2005 10:44:26 +0000 (10:44 +0000)
committerMichael Brown <mcb30@etherboot.org>
Sun, 17 Apr 2005 10:44:26 +0000 (10:44 +0000)
src/core/vsprintf.c
src/include/console.h
src/include/vsprintf.h [new file with mode: 0644]

index b22ae31..414b450 100644 (file)
@@ -1,5 +1,8 @@
-#include "etherboot.h"
 #include <stdarg.h>
+#include "if_ether.h" /* for ETH_ALEN */
+#include "limits.h" /* for CHAR_BIT */
+#include "console.h"
+#include "vsprintf.h"
 
 #define LONG_SHIFT  ((int)((sizeof(unsigned long)*CHAR_BIT) - 4))
 #define INT_SHIFT   ((int)((sizeof(unsigned int)*CHAR_BIT) - 4))
index ce2e539..55ce730 100644 (file)
@@ -2,6 +2,7 @@
 #define CONSOLE_H
 
 #include "stdint.h"
+#include "vsprintf.h"
 
 /*
  * Consoles that cannot be used before their INIT_FN() has completed
diff --git a/src/include/vsprintf.h b/src/include/vsprintf.h
new file mode 100644 (file)
index 0000000..2bf2008
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef VSPRINTF_H
+#define VSPRINTF_H
+
+/*
+ * Note that we cannot use __attribute__ (( format ( printf, ... ) ))
+ * to get automatic type checking on arguments, because we use
+ * non-standard format characters such as "%!" and "%@".
+ *
+ */
+
+extern int sprintf ( char *buf, const char *fmt, ... );
+extern void printf ( const char *fmt, ... );
+
+#endif /* VSPRINTF_H */