/boot/trunk/generic/printf.c |
---|
56,7 → 56,7 |
* @param width Count of digits to print. |
* |
*/ |
static void print_fixed_hex(const __u64 num, const int width) |
static void print_fixed_hex(const uint64_t num, const int width) |
{ |
int i; |
75,17 → 75,17 |
* be in range 2 .. 16). |
* |
*/ |
static void print_number(const __native num, const unsigned int base) |
static void print_number(const unative_t num, const unsigned int base) |
{ |
int val = num; |
char d[sizeof(__native) * 8 + 1]; /* this is good enough even for base == 2 */ |
int i = sizeof(__native) * 8 - 1; |
char d[sizeof(unative_t) * 8 + 1]; /* this is good enough even for base == 2 */ |
int i = sizeof(unative_t) * 8 - 1; |
do { |
d[i--] = digits[val % base]; |
} while (val /= base); |
d[sizeof(__native) * 8] = 0; |
d[sizeof(unative_t) * 8] = 0; |
puts(&d[i + 1]); |
} |
182,31 → 182,31 |
case 'P': |
puts("0x"); |
case 'p': |
print_fixed_hex(va_arg(ap, __native), sizeof(__native)); |
print_fixed_hex(va_arg(ap, unative_t), sizeof(unative_t)); |
goto loop; |
case 'Q': |
puts("0x"); |
case 'q': |
print_fixed_hex(va_arg(ap, __u64), INT64); |
print_fixed_hex(va_arg(ap, uint64_t), INT64); |
goto loop; |
case 'L': |
puts("0x"); |
case 'l': |
print_fixed_hex(va_arg(ap, __native), INT32); |
print_fixed_hex(va_arg(ap, unative_t), INT32); |
goto loop; |
case 'W': |
puts("0x"); |
case 'w': |
print_fixed_hex(va_arg(ap, __native), INT16); |
print_fixed_hex(va_arg(ap, unative_t), INT16); |
goto loop; |
case 'B': |
puts("0x"); |
case 'b': |
print_fixed_hex(va_arg(ap, __native), INT8); |
print_fixed_hex(va_arg(ap, unative_t), INT8); |
goto loop; |
/* |
213,13 → 213,13 |
* Decimal and hexadecimal conversions. |
*/ |
case 'd': |
print_number(va_arg(ap, __native), 10); |
print_number(va_arg(ap, unative_t), 10); |
goto loop; |
case 'X': |
puts("0x"); |
case 'x': |
print_number(va_arg(ap, __native), 16); |
print_number(va_arg(ap, unative_t), 16); |
goto loop; |
/* |
/boot/trunk/arch/sparc64/loader/types.h |
---|
31,14 → 31,14 |
#include <gentypes.h> |
typedef signed char __s8; |
typedef signed char int8_t; |
typedef unsigned char __u8; |
typedef unsigned short __u16; |
typedef unsigned int __u32; |
typedef unsigned long __u64; |
typedef unsigned char uint8_t; |
typedef unsigned short uint16_t; |
typedef unsigned int uint32_t; |
typedef unsigned long uint64_t; |
typedef __u64 __address; |
typedef __u64 __native; |
typedef uint64_t uintptr_t; |
typedef uint64_t unative_t; |
#endif |
/boot/trunk/arch/ppc32/loader/types.h |
---|
31,14 → 31,14 |
#include <gentypes.h> |
typedef signed char __s8; |
typedef signed char int8_t; |
typedef unsigned char __u8; |
typedef unsigned short __u16; |
typedef unsigned int __u32; |
typedef unsigned long long __u64; |
typedef unsigned char uint8_t; |
typedef unsigned short uint16_t; |
typedef unsigned int uint32_t; |
typedef unsigned long long uint64_t; |
typedef __u32 __address; |
typedef __u32 __native; |
typedef uint32_t uintptr_t; |
typedef uint32_t unative_t; |
#endif |
/boot/trunk/arch/ppc64/loader/types.h |
---|
31,14 → 31,14 |
#include <gentypes.h> |
typedef signed char __s8; |
typedef signed char int8_t; |
typedef unsigned char __u8; |
typedef unsigned short __u16; |
typedef unsigned int __u32; |
typedef unsigned long __u64; |
typedef unsigned char uint8_t; |
typedef unsigned short uint16_t; |
typedef unsigned int uint32_t; |
typedef unsigned long uint64_t; |
typedef __u64 __address; |
typedef __u64 __native; |
typedef uint64_t uintptr_t; |
typedef uint64_t unative_t; |
#endif |
/boot/trunk/arch/mips32/loader/types.h |
---|
31,14 → 31,14 |
#include <gentypes.h> |
typedef signed char __s8; |
typedef signed char int8_t; |
typedef unsigned char __u8; |
typedef unsigned short __u16; |
typedef unsigned int __u32; |
typedef unsigned long long __u64; |
typedef unsigned char uint8_t; |
typedef unsigned short uint16_t; |
typedef unsigned int uint32_t; |
typedef unsigned long long uint64_t; |
typedef __u32 __address; |
typedef __u32 __native; |
typedef uint32_t uintptr_t; |
typedef uint32_t unative_t; |
#endif |