32,17 → 32,6 |
static char digits[] = "0123456789abcdef"; /**< Hexadecimal characters */ |
|
|
void puts(const char *str) |
{ |
int len = 0; |
|
while (str[len] != 0) |
len++; |
|
ofw_write(str, len); |
} |
|
|
/** Print hexadecimal digits |
* |
* Print fixed count of hexadecimal digits from |
84,7 → 73,7 |
} while (val /= base); |
|
d[sizeof(__native) * 8] = 0; |
puts(&d[i + 1]); |
ofw_puts(&d[i + 1]); |
} |
|
|
167,7 → 156,7 |
* String and character conversions. |
*/ |
case 's': |
puts(va_arg(ap, char_ptr)); |
ofw_puts(va_arg(ap, char_ptr)); |
goto loop; |
|
case 'c': |
178,31 → 167,31 |
* Hexadecimal conversions with fixed width. |
*/ |
case 'P': |
puts("0x"); |
ofw_puts("0x"); |
case 'p': |
print_fixed_hex(va_arg(ap, __native), sizeof(__native)); |
goto loop; |
|
case 'Q': |
puts("0x"); |
ofw_puts("0x"); |
case 'q': |
print_fixed_hex(va_arg(ap, __u64), INT64); |
goto loop; |
|
case 'L': |
puts("0x"); |
ofw_puts("0x"); |
case 'l': |
print_fixed_hex(va_arg(ap, __native), INT32); |
goto loop; |
|
case 'W': |
puts("0x"); |
ofw_puts("0x"); |
case 'w': |
print_fixed_hex(va_arg(ap, __native), INT16); |
goto loop; |
|
case 'B': |
puts("0x"); |
ofw_puts("0x"); |
case 'b': |
print_fixed_hex(va_arg(ap, __native), INT8); |
goto loop; |
215,7 → 204,7 |
goto loop; |
|
case 'X': |
puts("0x"); |
ofw_puts("0x"); |
case 'x': |
print_number(va_arg(ap, __native), 16); |
goto loop; |