Changeset 199145a1 in mainline
- Timestamp:
- 2005-05-07T21:39:47Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0985add
- Parents:
- 75e5a8a
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/include/arg.h
r75e5a8a r199145a1 30 30 #define __ia64_ARG_H__ 31 31 32 /* TODO: to be replaced by real IA-64 stuff */ 33 #include <stackarg.h> 32 #include <stdarg.h> 34 33 35 34 #endif -
include/print.h
r75e5a8a r199145a1 37 37 38 38 static void print_str(char *str); 39 static void print_fixed_hex(__ u32num, int width);40 static void print_number(__ u32num, int base);39 static void print_fixed_hex(__native num, int width); 40 static void print_number(__native num, int base); 41 41 42 42 extern void putchar(char c); -
src/debug/print.c
r75e5a8a r199145a1 50 50 * width. 51 51 */ 52 void print_fixed_hex(__ u32num, int width)52 void print_fixed_hex(__native num, int width) 53 53 { 54 54 int i; … … 62 62 * It prints only significant digits. 63 63 */ 64 void print_number(__ u32num, int base)64 void print_number(__native num, int base) 65 65 { 66 char d[ 32+1]; /* this is good enough even for base == 2 */67 int i = 31;66 char d[sizeof(__native)*8+1]; /* this is good enough even for base == 2 */ 67 int i = sizeof(__native)*8-1; 68 68 69 69 do { … … 71 71 } while (num /= base); 72 72 73 d[ 32] = 0;73 d[sizeof(__native)*8] = 0; 74 74 print_str(&d[i + 1]); 75 75 } … … 110 110 111 111 case 'c': 112 c = va_arg(ap, char);112 c = (char) va_arg(ap, int); 113 113 break; 114 114
Note:
See TracChangeset
for help on using the changeset viewer.