Changeset 56fa418 in mainline for uspace/lib/libc/generic/io/io.c


Ignore:
Timestamp:
2009-04-05T15:50:53Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0175246
Parents:
726ef849
Message:

Make Czech layout work partially in bdsh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/io/io.c

    r726ef849 r56fa418  
    3737#include <stdio.h>
    3838#include <io/io.h>
     39#include <string.h>
     40#include <errno.h>
    3941
    4042const static char nl = '\n';
     
    8890int putchar(int c)
    8991{
    90         unsigned char ch = c;
    91         if (write_stdout((void *) &ch, 1) == 1)
     92        char buf[STR_BOUNDS(1)];
     93        size_t offs;
     94
     95        offs = 0;
     96        if (chr_encode(c, buf, &offs, STR_BOUNDS(1)) != EOK)
     97                return EOF;
     98
     99        if (write_stdout((void *) buf, offs) == offs)
    92100                return c;
    93        
     101
    94102        return EOF;
    95103}
Note: See TracChangeset for help on using the changeset viewer.