Changeset 523fad8 in mainline
- Timestamp:
- 2006-04-16T13:18:43Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- da32cea
- Parents:
- 9426c1a3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
init/init.c
r9426c1a3 r523fad8 58 58 } 59 59 60 /* test different parameters types and modifiers */ 60 61 static void test_printf(void) 61 62 { … … 75 76 } 76 77 78 /* test width and precision modifiers */ 79 static void test_printf2(void) 80 { 81 printf(" text 10.8s %*.*s \n", 5, 3, "text"); 82 printf(" very long text 10.8s %10.8s \n", "very long text"); 83 printf(" text 8.10s %8.10s \n", "text"); 84 printf(" very long text 8.10s %8.10s \n", "very long text"); 85 86 printf(" char: c '%c', 3.2c '%3.2c', -3.2c '%-3.2c', 2.3c '%2.3c', -2.3c '%-2.3c' \n",'a', 'b', 'c', 'd', 'e' ); 87 printf(" int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n",1, 1, 1, 1, 1 ); 88 printf(" -int: d '%d', 3.2d '%3.2d', -3.2d '%-3.2d', 2.3d '%2.3d', -2.3d '%-2.3d' \n",-1, -1, -1, -1, -1 ); 89 printf(" 0xint: x '%x', 5.3x '%#5.3x', -5.3x '%#-5.3x', 3.5x '%#3.5x', -3.5x '%#-3.5x' \n",17, 17, 17, 17, 17 ); 90 91 } 77 92 78 93 extern char _heap; … … 279 294 pstid_t ptid; 280 295 int tid; 281 296 282 297 version_print(); 283 298 284 299 // test_printf(); 300 // test_printf2(); 285 301 // test_ping(); 286 302 // test_async_ipc(); -
libc/generic/io/print.c
r9426c1a3 r523fad8 69 69 * @return number of printed characters or EOF 70 70 */ 71 72 71 static int print_char(char c, int width, uint64_t flags) 73 72 { 74 73 int counter = 0; 75 char space = ' ';76 74 77 75 if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) { … … 257 255 putchar('b'); 258 256 } 259 written == 2;257 written += 2; 260 258 break; 261 259 case 8: -
libc/generic/string.c
r9426c1a3 r523fad8 50 50 size_t strlen(const char *str) 51 51 { 52 int counter = 0;52 size_t counter = 0; 53 53 54 54 while (str[counter] != 0) {
Note:
See TracChangeset
for help on using the changeset viewer.