57,11 → 57,11 |
static char *cbp = cbuffer; |
|
static ssize_t cons_write(const char *buf, size_t nbyte); |
static void cons_putchar(int c); |
static void cons_putchar(wchar_t c); |
|
static void cbuffer_flush(void); |
static void cbuffer_drain(void); |
static void cbuffer_putc(int c); |
static inline void cbuffer_putc(int c); |
|
|
void console_open(bool blocking) |
119,9 → 119,11 |
async_msg_2(cons_phone, CONSOLE_GOTO, row, col); |
} |
|
void console_putchar(int c) |
void console_putchar(wchar_t c) |
{ |
cbuffer_putc(c); |
// cbuffer_putc(c); |
cbuffer_flush(); |
cons_putchar(c); |
} |
|
/** Write all data from output buffer to the console. */ |
162,7 → 164,7 |
} |
|
/** Write one character to the console via IPC. */ |
static void cons_putchar(int c) |
static void cons_putchar(wchar_t c) |
{ |
int cons_phone = console_phone_get(true); |
async_msg_1(cons_phone, CONSOLE_PUTCHAR, c); |
217,7 → 219,7 |
size_t len; |
ssize_t rc; |
|
len = strlen(s); |
len = str_size(s); |
while (len > 0) { |
rc = console_write(s, len); |
if (rc < 0) |
236,6 → 238,12 |
async_msg_0(cons_phone, CONSOLE_FLUSH); |
} |
|
void console_flush_optional(void) |
{ |
if (console_phone >= 0) |
console_flush(); |
} |
|
int console_get_size(int *rows, int *cols) |
{ |
int cons_phone = console_phone_get(true); |