Use flags instead of dozen variables

This commit is contained in:
2024-02-18 13:37:17 +01:00
parent 2dd4048416
commit 246968045a
2 changed files with 68 additions and 68 deletions

View File

@@ -25,6 +25,23 @@
#define DOUBLE_EXPONENT_SHIFT 0x34
#define DOUBLE_EXPONENT_BIAS 0x3FF
/* Print flag definitions */
#define PFL_ALWAYS_PRINT_SIGN 0x00000001
#define PFL_SPACE_FOR_PLUS 0x00000002
#define PFL_LEFT_JUSTIFIED 0x00000004
#define PFL_LEADING_ZEROES 0x00000008
#define PFL_LONG_INTEGER 0x00000010
#define PFL_LONG_DOUBLE 0x00000020
#define PFL_WIDE_CHARACTER 0x00000040
#define PFL_SHORT_VALUE 0x00000080
#define PFL_UNSIGNED 0x00000100
#define PFL_UPPERCASE 0x00000200
#define PFL_PRINT_RADIX 0x00000400
#define PFL_FLOAT_FORMAT 0x00000800
#define PFL_SCI_FORMAT 0x00001000
#define PFL_DIGIT_PRECISION 0x00002000
#define PFL_THOUSANDS_GROUPING 0x00004000
/* Runtime Library routine callbacks */
typedef XTSTATUS (*PWRITE_CHARACTER)(IN CHAR Character);
typedef XTSTATUS (*PWRITE_WIDE_CHARACTER)(IN WCHAR Character);
@@ -61,19 +78,7 @@ typedef struct _RTL_PRINT_FORMAT_PROPERTIES
LONG FieldWidth;
LONG IntegerSize;
LONG Precision;
BOOLEAN AlwaysPrintSign;
BOOLEAN LongDouble;
BOOLEAN LongInteger;
BOOLEAN LeftJustified;
BOOLEAN PrintUpperCase;
BOOLEAN PrintLeadingZeroes;
BOOLEAN PrintRadix;
BOOLEAN SpaceForPlus;
BOOLEAN ThousandsGrouping;
BOOLEAN UnsignedValue;
BOOLEAN FloatFormat;
BOOLEAN ScientificFormat;
BOOLEAN SignificantDigitPrecision;
LONG Flags;
} RTL_PRINT_FORMAT_PROPERTIES, *PRTL_PRINT_FORMAT_PROPERTIES;
#endif /* __XTDK_RTLTYPES_H */