X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flib%2Fstdio.h;fp=src%2Flib%2Fstdio.h;h=71413870d47129d3129944ab09411463734a0edb;hb=f2f8875638593bd5365cfd6a5ba7c9578e52322f;hp=0000000000000000000000000000000000000000;hpb=dca7bfbc436c5305ef8f0df6fbe1faba89a0012e;p=pintos-anon diff --git a/src/lib/stdio.h b/src/lib/stdio.h new file mode 100644 index 0000000..7141387 --- /dev/null +++ b/src/lib/stdio.h @@ -0,0 +1,30 @@ +#ifndef LIB_STDIO_H +#define LIB_STDIO_H + +#include +#include +#include +#include + +/* Standard functions. */ +int vsnprintf (char *, size_t, const char *, va_list) PRINTF_FORMAT (3, 0); +int snprintf (char *, size_t, const char *, ...) PRINTF_FORMAT (3, 4); +int vprintf (const char *, va_list) PRINTF_FORMAT (1, 0); +int printf (const char *, ...) PRINTF_FORMAT (1, 2); +int putchar (int); +int puts (const char *); + +/* Nonstandard functions. */ +void hex_dump (const void *, size_t size, bool ascii); + +/* Internal functions. */ +void __vprintf (const char *format, va_list args, + void (*output) (char, void *), void *aux); +void __printf (const char *format, + void (*output) (char, void *), void *aux, ...); + +/* Try to be helpful. */ +#define sprintf dont_use_sprintf_use_snprintf +#define vsprintf dont_use_vsprintf_use_vsnprintf + +#endif /* lib/stdio.h */