#pragma once #include /** An object type used for streams */ typedef struct FILE { int id; /** Function that prints a character to the stream */ void (*putc)(const struct FILE *, char); /** Function that prints a string to the stream */ int (*puts)(const struct FILE *, const char *, int); /** Flush write buffers */ void (*flush)(const struct FILE *); } FILE; /** A FILE value corresponding to stdin, the keyboard buffer */ extern FILE *stdin; /** A FILE value corresponding to stdout, the display */ extern FILE *stdout; /** A FILE value corresponding to stderr, the uart */ extern FILE *stderr; /** * Write the formatted string to stdout * Supports ``%s`` (string), ``%d`` (decimal), ``%u`` (unsigned), ``%x`` (hexadecimal) * @return number of bytes written */ int printf(const char *__restrict__ format, ...); /** * Write the formatted string to stream; see printf */ int fprintf(FILE *__restrict__ stream, const char *__restrict__ format, ...); /** * Write the formatted string to stream; see printf */ int vfprintf(FILE *__restrict__ stream, const char *__restrict__ format, va_list ap);