12#include_next <stdio.h>
16#define STDOUT_FILENO 1
24int puts (const
char *);
32 void (*output) (
char,
void *),
void *aux);
34 void (*output) (
char,
void *),
void *aux, ...);
37#define sprintf dont_use_sprintf_use_snprintf
38#define vsprintf dont_use_vsprintf_use_vsnprintf
#define PRINTF_FORMAT(FMT, FIRST)
__builtin_va_list va_list
GCC has <stdarg.h> functionality as built-ins, so all we need is to use it.
unsigned long long int uint64_t
void __printf(const char *format, void(*output)(char, void *), void *aux,...)
Wrapper for __vprintf() that converts varargs into a va_list.
int int int int int putchar(int)
Writes C to the vga display and serial port.
int int snprintf(char *, size_t, const char *,...) PRINTF_FORMAT(3
int int int vprintf(const char *, va_list) PRINTF_FORMAT(1
void __vprintf(const char *format, va_list args, void(*output)(char, void *), void *aux)
Internal functions.
void hex_dump(uintptr_t ofs, const void *, size_t size, bool ascii)
Nonstandard functions.
void print_human_readable_size(uint64_t sz)
Prints SIZE, which represents a number of bytes, in a human-readable format, e.g.
int printf(const char *,...) PRINTF_FORMAT(1
Standard functions.
int int int int vsnprintf(char *, size_t, const char *, va_list) PRINTF_FORMAT(3
int puts(const char *)
Writes string S to the console, followed by a new-line character.