Subversion Repositories HelenOS

Rev

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

Rev 4180 Rev 4199
Line 47... Line 47...
47
{
47
{
48
    index_t index = 0;
48
    index_t index = 0;
49
    index_t chars = 0;
49
    index_t chars = 0;
50
   
50
   
51
    while (index < size) {
51
    while (index < size) {
52
        putchar(utf8_decode(str, &index, size - 1));
52
        putchar(utf8_decode(str, &index, size));
53
        index++;
-
 
54
        chars++;
53
        chars++;
55
    }
54
    }
56
   
55
   
57
    return chars;
56
    return chars;
58
}
57
}
Line 75... Line 74...
75
    index_t chars = 0;
74
    index_t chars = 0;
76
    wchar_t uc;
75
    wchar_t uc;
77
   
76
   
78
    while ((uc = utf8_decode(str, &index, UTF8_NO_LIMIT)) != 0) {
77
    while ((uc = utf8_decode(str, &index, UTF8_NO_LIMIT)) != 0) {
79
        putchar(uc);
78
        putchar(uc);
80
        index++;
-
 
81
        chars++;
79
        chars++;
82
    }
80
    }
83
   
81
   
84
    return chars;
82
    return chars;
85
}
83
}