Changeset 93a3348 in mainline
- Timestamp:
- 2008-06-03T14:48:07Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8ed4014
- Parents:
- 2b8b0ca
- Location:
- kernel/generic/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/btree.c
r2b8b0ca r93a3348 125 125 if (!lnode) { 126 126 if (btree_search(t, key, &lnode)) { 127 panic("B-tree %p already contains key % d\n", t, key);127 panic("B-tree %p already contains key %" PRIu64 "\n", t, key); 128 128 } 129 129 } … … 225 225 if (!lnode) { 226 226 if (!btree_search(t, key, &lnode)) { 227 panic("B-tree %p does not contain key % d\n", t, key);227 panic("B-tree %p does not contain key %" PRIu64 "\n", t, key); 228 228 } 229 229 } … … 525 525 } 526 526 } 527 panic("node %p does not contain key % d\n", node, key);527 panic("node %p does not contain key %" PRIu64 "\n", node, key); 528 528 } 529 529 … … 552 552 } 553 553 } 554 panic("node %p does not contain key % d\n", node, key);554 panic("node %p does not contain key %" PRIu64 "\n", node, key); 555 555 } 556 556 … … 971 971 printf("("); 972 972 for (i = 0; i < node->keys; i++) { 973 printf("% llu%s", node->key[i], i < node->keys - 1 ? "," : "");973 printf("%" PRIu64 "%s", node->key[i], i < node->keys - 1 ? "," : ""); 974 974 if (node->depth && node->subtree[i]) { 975 975 list_append(&node->subtree[i]->bfs_link, &head); … … 993 993 printf("("); 994 994 for (i = 0; i < node->keys; i++) 995 printf("% llu%s", node->key[i], i < node->keys - 1 ? "," : "");995 printf("%" PRIu64 "%s", node->key[i], i < node->keys - 1 ? "," : ""); 996 996 printf(")"); 997 997 } -
kernel/generic/src/printf/printf_core.c
r2b8b0ca r93a3348 76 76 PrintfQualifierLong, 77 77 PrintfQualifierLongLong, 78 PrintfQualifierNative,79 78 PrintfQualifierPointer 80 79 } qualifier_t; … … 433 432 * - "l" Signed or unsigned long int.@n 434 433 * - "ll" Signed or unsigned long long int.@n 435 * - "z" unative_t (non-standard extension).@n436 434 * 437 435 * … … 487 485 while ((c = fmt[i])) { 488 486 /* control character */ 489 if (c == '%' 487 if (c == '%') { 490 488 /* print common characters if any processed */ 491 489 if (i > j) { … … 537 535 /* get width value from argument list */ 538 536 i++; 539 width = (int) va_arg(ap, int);537 width = (int) va_arg(ap, int); 540 538 if (width < 0) { 541 539 /* negative width sets '-' flag */ … … 560 558 */ 561 559 i++; 562 precision = (int) va_arg(ap, int);560 precision = (int) va_arg(ap, int); 563 561 if (precision < 0) { 564 562 /* ignore negative precision */ … … 585 583 qualifier = PrintfQualifierLongLong; 586 584 } 587 break;588 case 'z': /* unative_t */589 qualifier = PrintfQualifierNative;590 585 break; 591 586 default: … … 628 623 */ 629 624 case 'P': /* pointer */ 630 625 flags |= __PRINTF_FLAG_BIGCHARS; 631 626 case 'p': 632 627 flags |= __PRINTF_FLAG_PREFIX; … … 671 666 case PrintfQualifierByte: 672 667 size = sizeof(unsigned char); 673 number = (uint64_t) va_arg(ap, unsigned int);668 number = (uint64_t) va_arg(ap, unsigned int); 674 669 break; 675 670 case PrintfQualifierShort: 676 671 size = sizeof(unsigned short); 677 number = (uint64_t) va_arg(ap, unsigned int);672 number = (uint64_t) va_arg(ap, unsigned int); 678 673 break; 679 674 case PrintfQualifierInt: 680 675 size = sizeof(unsigned int); 681 number = (uint64_t) va_arg(ap, unsigned int);676 number = (uint64_t) va_arg(ap, unsigned int); 682 677 break; 683 678 case PrintfQualifierLong: 684 679 size = sizeof(unsigned long); 685 number = (uint64_t) va_arg(ap, unsigned long);680 number = (uint64_t) va_arg(ap, unsigned long); 686 681 break; 687 682 case PrintfQualifierLongLong: 688 683 size = sizeof(unsigned long long); 689 number = (uint64_t)va_arg(ap, 690 unsigned long long); 684 number = (uint64_t) va_arg(ap, unsigned long long); 691 685 break; 692 686 case PrintfQualifierPointer: 693 687 size = sizeof(void *); 694 number = (uint64_t)(unsigned long)va_arg(ap, 695 void *); 696 break; 697 case PrintfQualifierNative: 698 size = sizeof(unative_t); 699 number = (uint64_t)va_arg(ap, unative_t); 688 number = (uint64_t) (unsigned long) va_arg(ap, void *); 700 689 break; 701 690 default: /* Unknown qualifier */ … … 709 698 710 699 if (size == sizeof(uint64_t)) { 711 number = -((int64_t) number);700 number = -((int64_t) number); 712 701 } else { 713 702 number = ~number; … … 735 724 736 725 if (i > j) { 737 if ((retval = printf_putnchars(&fmt[j], (unative_t) (i - j),726 if ((retval = printf_putnchars(&fmt[j], (unative_t) (i - j), 738 727 ps)) < 0) { /* error */ 739 728 counter = -counter; … … 745 734 746 735 out: 747 748 736 return counter; 749 737 } -
kernel/generic/src/printf/vprintf.c
r2b8b0ca r93a3348 38 38 #include <synch/spinlock.h> 39 39 #include <arch/asm.h> 40 #include <arch/types.h> 41 #include <typedefs.h> 40 42 41 43 SPINLOCK_INITIALIZE(printf_lock); /**< vprintf spinlock */
Note:
See TracChangeset
for help on using the changeset viewer.