PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
Go to the source code of this file.
Macros | |
#define | STDIN_FILENO 0 |
Include lib/user/stdio.h or lib/kernel/stdio.h, as appropriate. More... | |
#define | STDOUT_FILENO 1 |
#define | sprintf dont_use_sprintf_use_snprintf |
Try to be helpful. More... | |
#define | vsprintf dont_use_vsprintf_use_vsnprintf |
lib/stdio.h More... | |
Functions | |
int | printf (const char *,...) PRINTF_FORMAT(1 |
Standard functions. More... | |
int int | snprintf (char *, size_t, const char *,...) PRINTF_FORMAT(3 |
int int int | vprintf (const char *, va_list) PRINTF_FORMAT(1 |
int int int int | vsnprintf (char *, size_t, const char *, va_list) PRINTF_FORMAT(3 |
int int int int int | putchar (int) |
Writes C to the vga display and serial port. More... | |
int | puts (const char *) |
Writes string S to the console, followed by a new-line character. More... | |
void | hex_dump (uintptr_t ofs, const void *, size_t size, bool ascii) |
Nonstandard functions. More... | |
void | print_human_readable_size (uint64_t sz) |
Prints SIZE, which represents a number of bytes, in a human-readable format, e.g. More... | |
void | __vprintf (const char *format, va_list args, void(*output)(char, void *), void *aux) |
Internal functions. More... | |
void | __printf (const char *format, void(*output)(char, void *), void *aux,...) |
Wrapper for __vprintf() that converts varargs into a va_list. More... | |
#define sprintf dont_use_sprintf_use_snprintf |
#define STDIN_FILENO 0 |
Include lib/user/stdio.h or lib/kernel/stdio.h, as appropriate.
Predefined file handles.
#define vsprintf dont_use_vsprintf_use_vsnprintf |
void __printf | ( | const char * | format, |
void(*)(char, void *) | output, | ||
void * | aux, | ||
... | |||
) |
Wrapper for __vprintf() that converts varargs into a va_list.
Definition at line 577 of file stdio.c.
References __vprintf(), va_end, and va_start.
Referenced by __vprintf().
void __vprintf | ( | const char * | format, |
va_list | args, | ||
void(*)(char, void *) | output, | ||
void * | aux | ||
) |
Internal functions.
Definition at line 157 of file stdio.c.
References __printf(), base_d, base_o, base_x, base_X, printf_conversion::CHAR, printf_conversion::flags, format_integer(), format_string(), printf_conversion::INT, printf_conversion::INTMAX, printf_conversion::LONG, printf_conversion::LONGLONG, NOT_REACHED, NULL, parse_conversion(), printf_conversion::precision, PTRDIFF_MAX, printf_conversion::PTRDIFFT, s, printf_conversion::SHORT, SIZE_MAX, printf_conversion::SIZET, strnlen(), printf_conversion::type, and va_arg.
Referenced by __printf(), vhprintf(), vprintf(), and vsnprintf().
Nonstandard functions.
Nonstandard functions.
Numeric offsets are also included, starting at OFS for the first byte in BUF. If ASCII is true then the corresponding ASCII characters are also rendered alongside.
< Maximum bytes per line.
Definition at line 593 of file stdio.c.
References buf, isprint(), printf(), ROUND_DOWN, and start.
Referenced by bitmap_dump(), compare_bytes(), fsutil_cat(), and main().
void print_human_readable_size | ( | uint64_t | size | ) |
Prints SIZE, which represents a number of bytes, in a human-readable format, e.g.
"256 kB".
Definition at line 642 of file stdio.c.
References NULL, printf(), and PRIu64.
Referenced by block_register(), and identify_ata_device().
int printf | ( | const char * | , |
... | |||
) |
Standard functions.
int int int int int putchar | ( | int | c | ) |
Writes C to the vga display and serial port.
Writes C to the vga display and serial port.
Definition at line 163 of file console.c.
References acquire_console(), putchar_have_lock(), release_console(), STDOUT_FILENO, and write().
Referenced by fail(), msg(), puts(), and read_line().
int puts | ( | const char * | s | ) |
Writes string S to the console, followed by a new-line character.
Definition at line 140 of file console.c.
References acquire_console(), putchar(), putchar_have_lock(), release_console(), s, STDOUT_FILENO, strlen(), and write().
int int snprintf | ( | char * | , |
size_t | , | ||
const char * | , | ||
... | |||
) |
int int int vprintf | ( | const char * | , |
va_list | |||
) |