|
CS318 - Pintos
Pintos source browser for JHU CS318 course
|

Go to the source code of this file.
Data Structures | |
| struct | vhprintf_aux |
| Auxiliary data for vhprintf_helper(). More... | |
Functions | |
| int | vprintf (const char *format, va_list args) |
| The standard vprintf() function, which is like printf() but uses a va_list. More... | |
| int | hprintf (int handle, const char *format,...) |
| Like printf(), but writes output to the given HANDLE. More... | |
| int | puts (const char *s) |
| Writes string S to the console, followed by a new-line character. More... | |
| int | putchar (int c) |
| Writes C to the console. More... | |
| static void | add_char (char c, void *aux_) |
| Adds C to the buffer in AUX, flushing it if the buffer fills up. More... | |
| static void | flush (struct vhprintf_aux *aux) |
| Flushes the buffer in AUX. More... | |
| int | vhprintf (int handle, const char *format, va_list args) |
| Formats the printf() format specification FORMAT with arguments given in ARGS and writes the output to the given HANDLE. More... | |
|
static |
Adds C to the buffer in AUX, flushing it if the buffer fills up.
Definition at line 78 of file console.c.
References vhprintf_aux::buf, vhprintf_aux::char_cnt, flush(), and vhprintf_aux::p.
Referenced by vhprintf().


|
static |
Flushes the buffer in AUX.
Definition at line 89 of file console.c.
References vhprintf_aux::buf, vhprintf_aux::handle, vhprintf_aux::p, and write().
Referenced by add_char(), and vhprintf().


| int hprintf | ( | int | handle, |
| const char * | format, | ||
| ... | |||
| ) |
| int putchar | ( | int | c | ) |
Writes C to the console.
Writes C to the vga display and serial port.
Definition at line 41 of file console.c.
References acquire_console(), putchar_have_lock(), release_console(), STDOUT_FILENO, and write().

| int puts | ( | const char * | s | ) |
Writes string S to the console, followed by a new-line character.
Definition at line 31 of file console.c.
References acquire_console(), putchar(), putchar_have_lock(), release_console(), s, STDOUT_FILENO, strlen(), and write().

| int vhprintf | ( | int | handle, |
| const char * | format, | ||
| va_list | args | ||
| ) |
Formats the printf() format specification FORMAT with arguments given in ARGS and writes the output to the given HANDLE.
Definition at line 64 of file console.c.
References __vprintf(), add_char(), vhprintf_aux::buf, vhprintf_aux::char_cnt, flush(), vhprintf_aux::handle, and vhprintf_aux::p.
Referenced by hprintf(), and vprintf().


| int vprintf | ( | const char * | format, |
| va_list | args | ||
| ) |
The standard vprintf() function, which is like printf() but uses a va_list.
Definition at line 9 of file console.c.
References STDOUT_FILENO, and vhprintf().

1.8.16