forked from xt-sys/exectos
Turn %p format compliant with POSIX, add %P XTOS extension to print pointers uppercase
This commit is contained in:
parent
98acc6f3d4
commit
df627aeb42
@ -857,7 +857,14 @@ RtlpFormatWideStringArgumentSpecifier(IN PRTL_PRINT_CONTEXT Context,
|
|||||||
FormatProperties.Radix = 8;
|
FormatProperties.Radix = 8;
|
||||||
break;
|
break;
|
||||||
case L'p':
|
case L'p':
|
||||||
/* Pointer argument as hexadecimal number (uppercase) */
|
/* Pointer argument as hexadecimal number (lowercase) */
|
||||||
|
FormatProperties.VariableType = Integer;
|
||||||
|
FormatProperties.IntegerSize = sizeof(UINT_PTR);
|
||||||
|
FormatProperties.Radix = 16;
|
||||||
|
FormatProperties.PrintRadix = TRUE;
|
||||||
|
break;
|
||||||
|
case L'P':
|
||||||
|
/* XTOS extension: Pointer argument as hexadecimal number (uppercase) */
|
||||||
FormatProperties.VariableType = Integer;
|
FormatProperties.VariableType = Integer;
|
||||||
FormatProperties.IntegerSize = sizeof(UINT_PTR);
|
FormatProperties.IntegerSize = sizeof(UINT_PTR);
|
||||||
FormatProperties.Radix = 16;
|
FormatProperties.Radix = 16;
|
||||||
@ -1504,17 +1511,8 @@ RtlpWriteWideStringIntegerValue(IN PRTL_PRINT_CONTEXT Context,
|
|||||||
Prefix[PrefixLength] = L'0';
|
Prefix[PrefixLength] = L'0';
|
||||||
PrefixLength += 1;
|
PrefixLength += 1;
|
||||||
|
|
||||||
/* Check if uppercase is required */
|
/* Write lowercase 'x' character */
|
||||||
if(FormatProperties->PrintUpperCase != 0)
|
Prefix[PrefixLength] = L'x';
|
||||||
{
|
|
||||||
/* Write uppercase 'X' character */
|
|
||||||
Prefix[PrefixLength] = L'X';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Write lowercase 'x' character */
|
|
||||||
Prefix[PrefixLength] = L'x';
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefixLength += 1;
|
PrefixLength += 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user