david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

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

This commit is contained in:
Michael Brown 2005-04-17 10:44:26 +00:00
parent 063140864e
commit 664ffea697
3 changed files with 19 additions and 1 deletions

View 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))

View 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

14
src/include/vsprintf.h Normal file
View File

@ -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 */