Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4199 → Rev 4200

/trunk/kernel/generic/src/printf/vprintf.c
49,7 → 49,7
index_t chars = 0;
while (index < size) {
putchar(utf8_decode(str, &index, size));
putchar(chr_decode(str, &index, size));
chars++;
}
74,7 → 74,7
index_t chars = 0;
wchar_t uc;
while ((uc = utf8_decode(str, &index, UTF8_NO_LIMIT)) != 0) {
while ((uc = chr_decode(str, &index, UTF8_NO_LIMIT)) != 0) {
putchar(uc);
chars++;
}
/trunk/kernel/generic/src/printf/vsnprintf.c
84,9 → 84,9
index_t index = 0;
while (index < size) {
wchar_t uc = utf8_decode(str, &index, size);
wchar_t uc = chr_decode(str, &index, size);
 
if (!utf8_encode(uc, data->dst, &data->len, data->size - 1))
if (!chr_encode(uc, data->dst, &data->len, data->size - 1))
break;
}
146,7 → 146,7
return ((int) size);
}
if (!utf8_encode(str[index], data->dst, &data->len, data->size - 1))
if (!chr_encode(str[index], data->dst, &data->len, data->size - 1))
break;
index++;
/trunk/kernel/generic/src/printf/printf_core.c
594,7 → 594,7
while (true) {
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
 
if (uc == '\0') break;
 
618,7 → 618,7
do {
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
switch (uc) {
case '#':
flags |= __PRINTF_FLAG_PREFIX;
648,7 → 648,7
width += uc - '0';
 
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
if (uc == '\0')
break;
if (!isdigit(uc))
657,7 → 657,7
} else if (uc == '*') {
/* Get width value from argument list */
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
width = (int) va_arg(ap, int);
if (width < 0) {
/* Negative width sets '-' flag */
670,7 → 670,7
int precision = 0;
if (uc == '.') {
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
if (isdigit(uc)) {
while (true) {
precision *= 10;
677,7 → 677,7
precision += uc - '0';
 
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
if (uc == '\0')
break;
if (!isdigit(uc))
686,7 → 686,7
} else if (uc == '*') {
/* Get precision value from the argument list */
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
precision = (int) va_arg(ap, int);
if (precision < 0) {
/* Ignore negative precision */
705,10 → 705,10
/* Char or short */
qualifier = PrintfQualifierShort;
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
if (uc == 'h') {
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
qualifier = PrintfQualifierByte;
}
break;
716,10 → 716,10
/* Long or long long */
qualifier = PrintfQualifierLong;
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
if (uc == 'l') {
i = nxt;
uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);
uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT);
qualifier = PrintfQualifierLongLong;
}
break;