Fix up header guards.
[pintos-anon] / src / lib / stdio.h
1 #ifndef __LIB_STDIO_H
2 #define __LIB_STDIO_H
3
4 #include <debug.h>
5 #include <stdbool.h>
6 #include <stddef.h>
7 #include <stdarg.h>
8
9 /* Standard functions. */
10 int vsnprintf (char *, size_t, const char *, va_list) PRINTF_FORMAT (3, 0);
11 int snprintf (char *, size_t, const char *, ...) PRINTF_FORMAT (3, 4);
12 int vprintf (const char *, va_list) PRINTF_FORMAT (1, 0);
13 int printf (const char *, ...) PRINTF_FORMAT (1, 2);
14 int putchar (int);
15 int puts (const char *);
16
17 /* Nonstandard functions. */
18 void hex_dump (const void *, size_t size, bool ascii);
19
20 /* Internal functions. */
21 void __vprintf (const char *format, va_list args,
22                 void (*output) (char, void *), void *aux);
23 void __printf (const char *format,
24                void (*output) (char, void *), void *aux, ...);
25
26 /* Try to be helpful. */
27 #define sprintf dont_use_sprintf_use_snprintf
28 #define vsprintf dont_use_vsprintf_use_vsnprintf
29
30 #endif /* lib/stdio.h */