The wrong wrapping define macros are being used.
- Use __SIZEOF_INT128__ instead of _di_f_int_128_t_.
- Use #ifdef instead of #ifndef.
Use f_int128_t to more closely match core types like int64_t.
* - signed_16: "ii", "II", Type is a int16_t digit.
* - signed_32: "i", "I", Type is a int32_t digit.
* - signed_64: "il", "IL", Type is a signed int64_t digit.
- * - signed_128: "ill", "ILL", Type is a f_int_128_t digit.
+ * - signed_128: "ill", "ILL", Type is a f_int128_t digit.
* - number: "in", "IN", Type is a f_number_signed_t digit.
* - size: "z", "Z", Type is a size_t digit.
* - string: "s", Type is a NULL terminated string, where the string is printed as-is.
* - unsigned_16: "ui", "UI", Type is a uint16_t digit.
* - unsigned_32: "u", "U", Type is a uint32_t digit.
* - unsigned_64: "ul", "UL", Type is a uint64_t digit.
- * - unsigned_128: "ull", "ULL", Type is a f_uint_128_t digit.
+ * - unsigned_128: "ull", "ULL", Type is a f_uint128_t digit.
* - unsigned_number: "un", "UN", Type is a f_number_unsigned_t digit (which by default is what f_array_length_t is a type of).
*
* @see fprintf()
* This should work in GCC, but other compilers this may not be available.
* When not supported, these will fallback to 64-bit.
*/
-#ifndef _di_f_int_128_t_
+#ifndef _di_f_int128_t_
#ifdef __SIZEOF_INT128__
- typedef __int128_t f_int_128_t;
- typedef __uint128_t f_uint_128_t;
+ typedef __int128_t f_int128_t;
+ typedef __uint128_t f_uint128_t;
#else
- typedef int64_t f_int_128_t;
- typedef uint64_t f_uint_128_t;
+ typedef int64_t f_int128_t;
+ typedef uint64_t f_uint128_t;
#endif // __SIZEOF_INT128__
-#endif // _di_f_int_128_t_
+#endif // _di_f_int128_t_
/**
* Defines the maximum size to be supported.
#define F_type_size_64_positive_d 0x7ffffffffffffffe
#define F_type_size_64_unsigned_d 0xfffffffffffffffe
- #ifndef _di_f_int_128_t_
+ #ifdef __SIZEOF_INT128__
#define F_type_size_128_negative_d 0x7fffffffffffffffffffffff
#define F_type_size_128_positive_d 0x7ffffffffffffffffffffffe
#define F_type_size_128_unsigned_d 0xfffffffffffffffffffffffe
#define F_type_size_128_negative_d F_type_size_64_negative_d
#define F_type_size_128_positive_d F_type_size_64_positive_d
#define F_type_size_128_unsigned_d F_type_size_64_unsigned_d
- #endif // _di_f_int_128_t_
+ #endif // __SIZEOF_INT128__
#define F_type_size_max_8_negative_d 0x80
#define F_type_size_max_8_positive_d 0x7f
#define F_type_size_max_64_positive_d 0x7fffffffffffffff
#define F_type_size_max_64_unsigned_d 0xffffffffffffffff
- #ifndef _di_f_int_128_t_
+ #ifdef __SIZEOF_INT128__
#define F_type_size_max_128_negative_d 0x800000000000000000000000
#define F_type_size_max_128_positive_d 0x7fffffffffffffffffffffff
#define F_type_size_max_128_unsigned_d 0xffffffffffffffffffffffff
#define F_type_size_max_128_negative_d F_type_size_max_64_negative_d
#define F_type_size_max_128_positive_d F_type_size_max_64_positive_d
#define F_type_size_max_128_unsigned_d F_type_size_max_64_unsigned_d
- #endif // _di_f_int_128_t_
+ #endif // __SIZEOF_INT128__
#endif // _di_f_type_sizes_d_
/**
#define F_number_t_size_max_positive_d F_type_size_max_32_positive_d
#define F_number_t_size_max_negative_d F_type_size_max_32_negative_d
#elif defined(_en_f_type_number_128_t_)
- typedef f_int_128_t f_number_signed_t;
- typedef f_uint_128_t f_number_unsigned_t;
+ typedef f_int128_t f_number_signed_t;
+ typedef f_uint128_t f_number_unsigned_t;
#define f_number_signed_t_initialize 0
#define f_number_unsigned_t_initialize 0
*
* This provides the types without the normal "f_" leading prefixes to be more in line with the core types like int64_t.
*/
-#ifndef __SIZEOF_INT128__
-
+#ifdef __SIZEOF_INT128__
#ifndef _di_f_int128_t_
typedef __int128_t int128_t;
#endif // _di_f_int128_t_
#ifndef _di_f_uint128_t_
typedef __uint128_t uint128_t;
#endif // _di_f_uint128_t_
-
#else // __SIZEOF_INT128__
-
#ifndef _di_f_int128_t_
typedef int64_t int128_t;
#endif // _di_f_int128_t_
#ifndef _di_f_uint128_t_
typedef uint64_t uint128_t;
#endif // _di_f_uint128_t_
-
#endif // __SIZEOF_INT128__
/**
* - "iii" "III": Type is a int8_t digit.
* - "ii", "II": Type is a int16_t digit.
* - "i", "I": Type is a int32_t digit.
- * - "il", "IL": Type is a signed int64_t digit.
- * - "ill", "ILL": Type is a f_int_128_t digit.
+ * - "il", "IL": Type is a int64_t digit.
+ * - "ill", "ILL": Type is a f_int128_t digit.
* - "in", "IN": Type is a f_number_signed_t digit.
* - "z", "Z": Type is a size_t digit.
* - "s": Type is a NULL terminated string, where the string is printed as-is.
* - "ui", "UI": Type is a uint16_t digit.
* - "u", "U": Type is a uint32_t digit.
* - "ul", "UL": Type is a uint64_t digit.
- * - "ull", "ULL": Type is a f_uint_128_t digit.
+ * - "ull", "ULL": Type is a f_uint128_t digit.
* - "un", "UN": Type is a f_number_unsigned_t digit (which by default is what f_array_length_t is a type of).
*
* The following are control characters and their replacements for "safe" printing (unknown is used for invalid UTF-8 sequences):
*status = f_conversion_number_signed_print((f_number_signed_t) va_arg(apl, int64_t), conversion_data, file);
}
else if (type == f_print_format_type_signed_128_e) {
- *status = f_conversion_number_signed_print((f_number_signed_t) va_arg(apl, f_int_128_t), conversion_data, file);
+ *status = f_conversion_number_signed_print((f_number_signed_t) va_arg(apl, f_int128_t), conversion_data, file);
}
else if (type == f_print_format_type_signed_number_e) {
*status = f_conversion_number_signed_print(va_arg(apl, f_number_signed_t), conversion_data, file);
*status = f_conversion_number_unsigned_print((f_number_unsigned_t) va_arg(apl, uint64_t), conversion_data, file);
}
else if (type == f_print_format_type_unsigned_128_e) {
- *status = f_conversion_number_unsigned_print((f_number_unsigned_t) va_arg(apl, f_uint_128_t), conversion_data, file);
+ *status = f_conversion_number_unsigned_print((f_number_unsigned_t) va_arg(apl, f_uint128_t), conversion_data, file);
}
else if (type == f_print_format_type_unsigned_number_e) {
*status = f_conversion_number_unsigned_print(va_arg(apl, f_number_unsigned_t), conversion_data, file);