Subversion Repositories HelenOS

Rev

Rev 4226 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4226 Rev 4239
Line 55... Line 55...
55
 
55
 
56
/** Pointer to first available field in cbuffer. */
56
/** Pointer to first available field in cbuffer. */
57
static char *cbp = cbuffer;
57
static char *cbp = cbuffer;
58
 
58
 
59
static ssize_t cons_write(const char *buf, size_t nbyte);
59
static ssize_t cons_write(const char *buf, size_t nbyte);
60
static void cons_putchar(int c);
60
static void cons_putchar(wchar_t c);
61
 
61
 
62
static void cbuffer_flush(void);
62
static void cbuffer_flush(void);
63
static void cbuffer_drain(void);
63
static void cbuffer_drain(void);
64
static inline void cbuffer_putc(int c);
64
static inline void cbuffer_putc(int c);
65
 
65
 
Line 117... Line 117...
117
 
117
 
118
    cbuffer_flush();
118
    cbuffer_flush();
119
    async_msg_2(cons_phone, CONSOLE_GOTO, row, col);
119
    async_msg_2(cons_phone, CONSOLE_GOTO, row, col);
120
}
120
}
121
 
121
 
122
void console_putchar(int c)
122
void console_putchar(wchar_t c)
123
{
123
{
124
    cbuffer_putc(c);
124
//  cbuffer_putc(c);
-
 
125
    cbuffer_flush();
-
 
126
    cons_putchar(c);
125
}
127
}
126
 
128
 
127
/** Write all data from output buffer to the console. */
129
/** Write all data from output buffer to the console. */
128
static void cbuffer_flush(void)
130
static void cbuffer_flush(void)
129
{
131
{
Line 160... Line 162...
160
    if (c == '\n')
162
    if (c == '\n')
161
        cbuffer_flush();
163
        cbuffer_flush();
162
}
164
}
163
 
165
 
164
/** Write one character to the console via IPC. */
166
/** Write one character to the console via IPC. */
165
static void cons_putchar(int c)
167
static void cons_putchar(wchar_t c)
166
{
168
{
167
    int cons_phone = console_phone_get(true);
169
    int cons_phone = console_phone_get(true);
168
    async_msg_1(cons_phone, CONSOLE_PUTCHAR, c);
170
    async_msg_1(cons_phone, CONSOLE_PUTCHAR, c);
169
}
171
}
170
 
172