Changeset 27dc170 in mainline for src/debug/print.c
- Timestamp:
- 2005-05-11T17:08:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93ca46f
- Parents:
- d34657e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/debug/print.c
rd34657e r27dc170 45 45 * 46 46 */ 47 void print_str(c har *str)47 void print_str(const char *str) 48 48 { 49 49 int i = 0; … … 66 66 * 67 67 */ 68 void print_fixed_hex( __native num,int width)68 void print_fixed_hex(const __native num, const int width) 69 69 { 70 70 int i; … … 85 85 * 86 86 */ 87 void print_number(__native num, int base) 88 { 87 void print_number(const __native num, const int base) 88 { 89 int val = num; 89 90 char d[sizeof(__native)*8+1]; /* this is good enough even for base == 2 */ 90 91 int i = sizeof(__native)*8-1; 91 92 92 93 do { 93 d[i--] = digits[ num% base];94 } while ( num/= base);94 d[i--] = digits[val % base]; 95 } while (val /= base); 95 96 96 97 d[sizeof(__native)*8] = 0; … … 133 134 * 134 135 */ 135 void printf(c har *fmt, ...)136 void printf(const char *fmt, ...) 136 137 { 137 138 int irqpri, i = 0;
Note:
See TracChangeset
for help on using the changeset viewer.