|
@@ -421,17 +421,17 @@ _PoolCatPrint (
|
|
|
|
|
|
|
|
|
UINTN
|
|
|
-SPrint (
|
|
|
+VSPrint (
|
|
|
OUT CHAR16 *Str,
|
|
|
IN UINTN StrSize,
|
|
|
IN CHAR16 *fmt,
|
|
|
- ...
|
|
|
+ va_list args
|
|
|
)
|
|
|
/*++
|
|
|
|
|
|
Routine Description:
|
|
|
|
|
|
- Prints a formatted unicode string to a buffer
|
|
|
+ Prints a formatted unicode string to a buffer using a va_list
|
|
|
|
|
|
Arguments:
|
|
|
|
|
@@ -442,6 +442,9 @@ Arguments:
|
|
|
|
|
|
fmt - The format string
|
|
|
|
|
|
+ args - va_list
|
|
|
+
|
|
|
+
|
|
|
Returns:
|
|
|
|
|
|
String length returned in buffer
|
|
@@ -449,19 +452,54 @@ Returns:
|
|
|
--*/
|
|
|
{
|
|
|
POOL_PRINT spc;
|
|
|
- va_list args;
|
|
|
-
|
|
|
|
|
|
- va_start (args, fmt);
|
|
|
spc.str = Str;
|
|
|
spc.maxlen = StrSize / sizeof(CHAR16) - 1;
|
|
|
spc.len = 0;
|
|
|
|
|
|
_PoolCatPrint (fmt, args, &spc, _SPrint);
|
|
|
- va_end (args);
|
|
|
+
|
|
|
return spc.len;
|
|
|
}
|
|
|
|
|
|
+UINTN
|
|
|
+SPrint (
|
|
|
+ OUT CHAR16 *Str,
|
|
|
+ IN UINTN StrSize,
|
|
|
+ IN CHAR16 *fmt,
|
|
|
+ ...
|
|
|
+ )
|
|
|
+/*++
|
|
|
+
|
|
|
+Routine Description:
|
|
|
+
|
|
|
+ Prints a formatted unicode string to a buffer
|
|
|
+
|
|
|
+Arguments:
|
|
|
+
|
|
|
+ Str - Output buffer to print the formatted string into
|
|
|
+
|
|
|
+ StrSize - Size of Str. String is truncated to this size.
|
|
|
+ A size of 0 means there is no limit
|
|
|
+
|
|
|
+ fmt - The format string
|
|
|
+
|
|
|
+Returns:
|
|
|
+
|
|
|
+ String length returned in buffer
|
|
|
+
|
|
|
+--*/
|
|
|
+{
|
|
|
+ va_list args;
|
|
|
+ UINTN len;
|
|
|
+
|
|
|
+ va_start (args, fmt);
|
|
|
+ len = VSPrint(Str, StrSize, fmt, args);
|
|
|
+ va_end (args);
|
|
|
+
|
|
|
+ return len;
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
CHAR16 *
|
|
|
PoolPrint (
|