Quellcode durchsuchen

Gave vsprintf.c its own header file, and made console.h include it.

tags/v0.9.3
Michael Brown vor 19 Jahren
Ursprung
Commit
664ffea697
3 geänderte Dateien mit 19 neuen und 1 gelöschten Zeilen
  1. 4
    1
      src/core/vsprintf.c
  2. 1
    0
      src/include/console.h
  3. 14
    0
      src/include/vsprintf.h

+ 4
- 1
src/core/vsprintf.c Datei anzeigen

@@ -1,5 +1,8 @@
1
-#include "etherboot.h"
2 1
 #include <stdarg.h>
2
+#include "if_ether.h" /* for ETH_ALEN */
3
+#include "limits.h" /* for CHAR_BIT */
4
+#include "console.h"
5
+#include "vsprintf.h"
3 6
 
4 7
 #define LONG_SHIFT  ((int)((sizeof(unsigned long)*CHAR_BIT) - 4))
5 8
 #define INT_SHIFT   ((int)((sizeof(unsigned int)*CHAR_BIT) - 4))

+ 1
- 0
src/include/console.h Datei anzeigen

@@ -2,6 +2,7 @@
2 2
 #define CONSOLE_H
3 3
 
4 4
 #include "stdint.h"
5
+#include "vsprintf.h"
5 6
 
6 7
 /*
7 8
  * Consoles that cannot be used before their INIT_FN() has completed

+ 14
- 0
src/include/vsprintf.h Datei anzeigen

@@ -0,0 +1,14 @@
1
+#ifndef VSPRINTF_H
2
+#define VSPRINTF_H
3
+
4
+/*
5
+ * Note that we cannot use __attribute__ (( format ( printf, ... ) ))
6
+ * to get automatic type checking on arguments, because we use
7
+ * non-standard format characters such as "%!" and "%@".
8
+ *
9
+ */
10
+
11
+extern int sprintf ( char *buf, const char *fmt, ... );
12
+extern void printf ( const char *fmt, ... );
13
+
14
+#endif /* VSPRINTF_H */

Laden…
Abbrechen
Speichern