Rev 4111 | Rev 4203 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4111 | Rev 4202 | ||
---|---|---|---|
Line 128... | Line 128... | ||
128 | */ |
128 | */ |
129 | SPINLOCK_INITIALIZE(sgcn_input_lock); |
129 | SPINLOCK_INITIALIZE(sgcn_input_lock); |
130 | 130 | ||
131 | 131 | ||
132 | /* functions referenced from definitions of I/O operations structures */ |
132 | /* functions referenced from definitions of I/O operations structures */ |
133 | static void sgcn_putchar(outdev_t *, const char, bool); |
133 | static void sgcn_putchar(outdev_t *, const wchar_t, bool); |
134 | 134 | ||
135 | /** SGCN output device operations */ |
135 | /** SGCN output device operations */ |
136 | static outdev_operations_t sgcnout_ops = { |
136 | static outdev_operations_t sgcnout_ops = { |
137 | .write = sgcn_putchar |
137 | .write = sgcn_putchar |
138 | }; |
138 | }; |
Line 266... | Line 266... | ||
266 | /** |
266 | /** |
267 | * SGCN output operation. Prints a single character to the SGCN. If the line |
267 | * SGCN output operation. Prints a single character to the SGCN. If the line |
268 | * feed character is written ('\n'), the carriage return character ('\r') is |
268 | * feed character is written ('\n'), the carriage return character ('\r') is |
269 | * written straight away. |
269 | * written straight away. |
270 | */ |
270 | */ |
271 | static void sgcn_putchar(outdev_t *od, const char c, bool silent) |
271 | static void sgcn_putchar(outdev_t *od, const wchar_t ch, bool silent) |
272 | { |
272 | { |
273 | if (!silent) { |
273 | if (!silent) { |
274 | spinlock_lock(&sgcn_output_lock); |
274 | spinlock_lock(&sgcn_output_lock); |
275 | 275 | ||
- | 276 | if (ascii_check(ch)) { |
|
276 | sgcn_do_putchar(c); |
277 | sgcn_do_putchar(ch); |
277 | if (c == '\n') |
278 | if (ch == '\n') |
278 | sgcn_do_putchar('\r'); |
279 | sgcn_do_putchar('\r'); |
- | 280 | } else |
|
- | 281 | sgcn_do_putchar(invalch); |
|
279 | 282 | ||
280 | spinlock_unlock(&sgcn_output_lock); |
283 | spinlock_unlock(&sgcn_output_lock); |
281 | } |
284 | } |
282 | } |
285 | } |
283 | 286 |