Changeset e1813cf in mainline for kernel/generic/src/printf
- Timestamp:
- 2009-03-31T22:51:41Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce87a8aa
- Parents:
- b54d2f1
- Location:
- kernel/generic/src/printf
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/printf/printf_core.c
rb54d2f1 re1813cf 595 595 while (true) { 596 596 i = nxt; 597 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);597 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 598 598 599 599 if (uc == '\0') break; … … 619 619 do { 620 620 i = nxt; 621 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);621 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 622 622 switch (uc) { 623 623 case '#': … … 649 649 650 650 i = nxt; 651 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);651 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 652 652 if (uc == '\0') 653 653 break; … … 658 658 /* Get width value from argument list */ 659 659 i = nxt; 660 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);660 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 661 661 width = (int) va_arg(ap, int); 662 662 if (width < 0) { … … 671 671 if (uc == '.') { 672 672 i = nxt; 673 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);673 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 674 674 if (isdigit(uc)) { 675 675 while (true) { … … 678 678 679 679 i = nxt; 680 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);680 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 681 681 if (uc == '\0') 682 682 break; … … 687 687 /* Get precision value from the argument list */ 688 688 i = nxt; 689 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);689 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 690 690 precision = (int) va_arg(ap, int); 691 691 if (precision < 0) { … … 706 706 qualifier = PrintfQualifierShort; 707 707 i = nxt; 708 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);708 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 709 709 if (uc == 'h') { 710 710 i = nxt; 711 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);711 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 712 712 qualifier = PrintfQualifierByte; 713 713 } … … 717 717 qualifier = PrintfQualifierLong; 718 718 i = nxt; 719 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);719 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 720 720 if (uc == 'l') { 721 721 i = nxt; 722 uc = utf8_decode(fmt, &nxt, UTF8_NO_LIMIT);722 uc = chr_decode(fmt, &nxt, UTF8_NO_LIMIT); 723 723 qualifier = PrintfQualifierLongLong; 724 724 } -
kernel/generic/src/printf/vprintf.c
rb54d2f1 re1813cf 50 50 51 51 while (index < size) { 52 putchar( utf8_decode(str, &index, size));52 putchar(chr_decode(str, &index, size)); 53 53 chars++; 54 54 } … … 75 75 wchar_t uc; 76 76 77 while ((uc = utf8_decode(str, &index, UTF8_NO_LIMIT)) != 0) {77 while ((uc = chr_decode(str, &index, UTF8_NO_LIMIT)) != 0) { 78 78 putchar(uc); 79 79 chars++; -
kernel/generic/src/printf/vsnprintf.c
rb54d2f1 re1813cf 85 85 86 86 while (index < size) { 87 wchar_t uc = utf8_decode(str, &index, size);87 wchar_t uc = chr_decode(str, &index, size); 88 88 89 if (! utf8_encode(uc, data->dst, &data->len, data->size - 1))89 if (!chr_encode(uc, data->dst, &data->len, data->size - 1)) 90 90 break; 91 91 } … … 147 147 } 148 148 149 if (! utf8_encode(str[index], data->dst, &data->len, data->size - 1))149 if (!chr_encode(str[index], data->dst, &data->len, data->size - 1)) 150 150 break; 151 151
Note:
See TracChangeset
for help on using the changeset viewer.