Subversion Repositories HelenOS

Rev

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

Rev 4202 Rev 4203
Line 262... Line 262...
262
    *buf_ptr = c;
262
    *buf_ptr = c;
263
    *out_wrptr_ptr = new_wrptr;
263
    *out_wrptr_ptr = new_wrptr;
264
}
264
}
265
 
265
 
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. Newline
268
 * feed character is written ('\n'), the carriage return character ('\r') is
-
 
269
 * written straight away.
268
 * character is converted to CRLF.
270
 */
269
 */
271
static void sgcn_putchar(outdev_t *od, const wchar_t ch, bool silent)
270
static void sgcn_putchar(outdev_t *od, const wchar_t ch, bool silent)
272
{
271
{
273
    if (!silent) {
272
    if (!silent) {
274
        spinlock_lock(&sgcn_output_lock);
273
        spinlock_lock(&sgcn_output_lock);
275
       
274
       
276
        if (ascii_check(ch)) {
275
        if (ascii_check(ch)) {
277
            sgcn_do_putchar(ch);
-
 
278
            if (ch == '\n')
276
            if (ch == '\n')
279
                sgcn_do_putchar('\r');
277
                sgcn_do_putchar('\r');
-
 
278
            sgcn_do_putchar(ch);
280
        } else
279
        } else
281
            sgcn_do_putchar(invalch);
280
            sgcn_do_putchar(invalch);
282
       
281
       
283
        spinlock_unlock(&sgcn_output_lock);
282
        spinlock_unlock(&sgcn_output_lock);
284
    }
283
    }