iPXE
|
Go to the source code of this file.
Macros | |
#define | sprintf(buf, fmt, ...) snprintf ( (buf), ~( ( size_t ) 0 ), (fmt), ## __VA_ARGS__ ) |
Write a formatted string to a buffer. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | putchar (int character) |
Write a single character to each console device. More... | |
int | getchar (void) |
Read a single character from any console. More... | |
int | __attribute__ ((format(printf, 1, 2))) printf(const char *fmt |
int int | __attribute__ ((format(printf, 3, 4))) snprintf(char *buf |
int int size_t const char int | __attribute__ ((format(printf, 2, 3))) asprintf(char **strp |
int int size_t const char int const char int | vprintf (const char *fmt, va_list args) |
Write a formatted string to the console. More... | |
int | vsnprintf (char *buf, size_t size, const char *fmt, va_list args) |
Write a formatted string to a buffer. More... | |
int | vasprintf (char **strp, const char *fmt, va_list args) |
Write a formatted string to newly allocated memory. More... | |
static int | vsprintf (char *buf, const char *fmt, va_list args) |
Write a formatted string to a buffer. More... | |
Variables | |
int int size_t | size |
int int size_t const char * | fmt |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int putchar | ( | int | character | ) |
Write a single character to each console device.
character | Character to be written |
character | Character written |
The character is written out to all enabled console devices, using each device's console_driver::putchar() method.
Definition at line 28 of file console.c.
References CONSOLE_DISABLED_OUTPUT, console_usage, CONSOLES, console_driver::disabled, for_each_table_entry, putchar(), console_driver::putchar, and console_driver::usage.
Referenced by ansiscr_putc(), clrline(), eepro_poll(), epic100_open(), falcon_init_xmac(), get_eeprom_data(), int21(), monojob_clear(), print_user_string(), printf_putchar(), putchar(), readline_history(), and sync_console().
int getchar | ( | void | ) |
Read a single character from any console.
character | Character read from a console. |
A character will be read from the first enabled console device that has input available using that console's console_driver::getchar() method. If no console has input available to be read, this method will block. To perform a non-blocking read, use something like
The character read will not be echoed back to any console.
Definition at line 85 of file console.c.
References cpu_nap(), console_driver::getchar, has_input(), and step().
Referenced by ansiscr_getc(), dbg_more(), dbg_pause(), getchar_timeout(), int21(), keypress_interrupted(), loopback_wait(), and monojob_wait().
int __attribute__ | ( | (format(printf, 1, 2)) | ) | const |
int int __attribute__ | ( | (format(printf, 3, 4)) | ) |
int int size_t const char int __attribute__ | ( | (format(printf, 2, 3)) | ) |
Write a formatted string to the console.
fmt | Format string |
args | Arguments corresponding to the format string |
len | Length of formatted string |
Definition at line 449 of file vsprintf.c.
References ctx, fmt, printf_putchar(), and vcprintf().
Referenced by dbg_printf(), log_vprintf(), and printf().
Write a formatted string to a buffer.
buf | Buffer into which to write the string |
size | Size of buffer |
fmt | Format string |
args | Arguments corresponding to the format string |
len | Length of formatted string |
If the buffer is too small to contain the string, the returned length is the length that would have been written had enough space been available.
Definition at line 351 of file vsprintf.c.
References sputc_context::buf, sputc_context::ctx, end, fmt, printf_context::handler, len, sputc_context::max_len, printf_sputc(), size, and vcprintf().
Referenced by ipair_tx(), snprintf(), snprintf_okx(), vasprintf(), vmsg(), vsprintf(), and vssnprintf().
int vasprintf | ( | char ** | strp, |
const char * | fmt, | ||
va_list | args | ||
) |
Write a formatted string to newly allocated memory.
strp | Pointer to hold allocated string |
fmt | Format string |
args | Arguments corresponding to the format string |
len | Length of formatted string |
Definition at line 17 of file asprintf.c.
References ENOMEM, fmt, len, malloc(), NULL, va_copy, va_end, and vsnprintf().
Referenced by asprintf(), and xfer_vprintf().
|
inlinestatic |
Write a formatted string to a buffer.
buf | Buffer into which to write the string |
fmt | Format string |
args | Arguments corresponding to the format string |
len | Length of formatted string |
Definition at line 47 of file stdio.h.
References fmt, and vsnprintf().
int int size_t const char int const char* fmt |
Definition at line 17 of file stdio.h.
Referenced by vsprintf().