Author: hbelusca
Date: Sun Sep 3 16:03:21 2017
New Revision: 75749
URL:
http://svn.reactos.org/svn/reactos?rev=75749&view=rev
Log:
[USETUP]: Introduce some -V functions for CONSOLE_ConOutPrintf, CONSOLE_SetStatusText and
CONSOLE_SetStatusTextX.
Fix also the whitespace in consup.h.
Modified:
branches/setup_improvements/base/setup/usetup/consup.c
branches/setup_improvements/base/setup/usetup/consup.h
Modified: branches/setup_improvements/base/setup/usetup/consup.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
==============================================================================
--- branches/setup_improvements/base/setup/usetup/consup.c [iso-8859-1] (original)
+++ branches/setup_improvements/base/setup/usetup/consup.c [iso-8859-1] Sun Sep 3
16:03:21 2017
@@ -109,16 +109,14 @@
}
VOID
-CONSOLE_ConOutPrintf(
- IN LPCSTR szFormat, ...)
+CONSOLE_ConOutPrintfV(
+ IN LPCSTR szFormat,
+ IN va_list args)
{
CHAR szOut[256];
DWORD dwWritten;
- va_list arg_ptr;
-
- va_start(arg_ptr, szFormat);
- vsprintf(szOut, szFormat, arg_ptr);
- va_end(arg_ptr);
+
+ vsprintf(szOut, szFormat, args);
WriteConsole(
StdOutput,
@@ -126,6 +124,18 @@
(ULONG)strlen(szOut),
&dwWritten,
NULL);
+}
+
+VOID
+CONSOLE_ConOutPrintf(
+ IN LPCSTR szFormat,
+ ...)
+{
+ va_list arg_ptr;
+
+ va_start(arg_ptr, szFormat);
+ CONSOLE_ConOutPrintfV(szFormat, arg_ptr);
+ va_end(arg_ptr);
}
BOOL
@@ -385,17 +395,16 @@
}
VOID
-CONSOLE_SetStatusText(
- IN LPCSTR fmt, ...)
-{
+CONSOLE_SetStatusTextXV(
+ IN SHORT x,
+ IN LPCSTR fmt,
+ IN va_list args)
+{
+ COORD coPos;
+ DWORD Written;
CHAR Buffer[128];
- va_list ap;
- COORD coPos;
- DWORD Written;
-
- va_start(ap, fmt);
- vsprintf(Buffer, fmt, ap);
- va_end(ap);
+
+ vsprintf(Buffer, fmt, args);
coPos.X = 0;
coPos.Y = yScreen - 1;
@@ -414,6 +423,8 @@
coPos,
&Written);
+ coPos.X = x;
+
WriteConsoleOutputCharacterA(
StdOutput,
Buffer,
@@ -425,42 +436,34 @@
VOID
CONSOLE_SetStatusTextX(
IN SHORT x,
- IN LPCSTR fmt, ...)
-{
- CHAR Buffer[128];
+ IN LPCSTR fmt,
+ ...)
+{
va_list ap;
- COORD coPos;
- DWORD Written;
va_start(ap, fmt);
- vsprintf(Buffer, fmt, ap);
+ CONSOLE_SetStatusTextXV(x, fmt, ap);
va_end(ap);
-
- coPos.X = 0;
- coPos.Y = yScreen - 1;
-
- FillConsoleOutputAttribute(
- StdOutput,
- BACKGROUND_WHITE,
- xScreen,
- coPos,
- &Written);
-
- FillConsoleOutputCharacterA(
- StdOutput,
- ' ',
- xScreen,
- coPos,
- &Written);
-
- coPos.X = x;
-
- WriteConsoleOutputCharacterA(
- StdOutput,
- Buffer,
- (ULONG)strlen(Buffer),
- coPos,
- &Written);
+}
+
+VOID
+CONSOLE_SetStatusTextV(
+ IN LPCSTR fmt,
+ IN va_list args)
+{
+ CONSOLE_SetStatusTextXV(0, fmt, args);
+}
+
+VOID
+CONSOLE_SetStatusText(
+ IN LPCSTR fmt,
+ ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ CONSOLE_SetStatusTextV(fmt, ap);
+ va_end(ap);
}
static
Modified: branches/setup_improvements/base/setup/usetup/consup.h
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
==============================================================================
--- branches/setup_improvements/base/setup/usetup/consup.h [iso-8859-1] (original)
+++ branches/setup_improvements/base/setup/usetup/consup.h [iso-8859-1] Sun Sep 3
16:03:21 2017
@@ -55,26 +55,32 @@
BOOLEAN
CONSOLE_Init(
- VOID);
+ VOID);
VOID
CONSOLE_ClearScreen(VOID);
VOID
CONSOLE_ConInKey(
- OUT PINPUT_RECORD Buffer);
+ OUT PINPUT_RECORD Buffer);
VOID
CONSOLE_ConOutChar(
- IN CHAR c);
+ IN CHAR c);
+
+VOID
+CONSOLE_ConOutPrintfV(
+ IN LPCSTR szFormat,
+ IN va_list args);
VOID
CONSOLE_ConOutPrintf(
- IN LPCSTR szFormat, ...);
+ IN LPCSTR szFormat,
+ ...);
VOID
CONSOLE_ConOutPuts(
- IN LPCSTR szText);
+ IN LPCSTR szText);
BOOL
CONSOLE_Flush(VOID);
@@ -92,97 +98,110 @@
VOID
CONSOLE_InvertTextXY(
- IN SHORT x,
- IN SHORT y,
- IN SHORT col,
- IN SHORT row);
+ IN SHORT x,
+ IN SHORT y,
+ IN SHORT col,
+ IN SHORT row);
VOID
CONSOLE_NormalTextXY(
- IN SHORT x,
- IN SHORT y,
- IN SHORT col,
- IN SHORT row);
+ IN SHORT x,
+ IN SHORT y,
+ IN SHORT col,
+ IN SHORT row);
VOID
CONSOLE_PrintTextXY(
- IN SHORT x,
- IN SHORT y,
- IN LPCSTR fmt, ...);
+ IN SHORT x,
+ IN SHORT y,
+ IN LPCSTR fmt, ...);
VOID
CONSOLE_PrintTextXYN(
- IN SHORT x,
- IN SHORT y,
- IN SHORT len,
- IN LPCSTR fmt, ...);
+ IN SHORT x,
+ IN SHORT y,
+ IN SHORT len,
+ IN LPCSTR fmt, ...);
VOID
CONSOLE_SetCursorType(
- IN BOOL bInsert,
- IN BOOL bVisible);
+ IN BOOL bInsert,
+ IN BOOL bVisible);
VOID
CONSOLE_SetCursorXY(
- IN SHORT x,
- IN SHORT y);
+ IN SHORT x,
+ IN SHORT y);
VOID
CONSOLE_SetCursorXY(
- IN SHORT x,
- IN SHORT y);
+ IN SHORT x,
+ IN SHORT y);
VOID
CONSOLE_SetHighlightedTextXY(
- IN SHORT x,
- IN SHORT y,
- IN LPCSTR Text);
+ IN SHORT x,
+ IN SHORT y,
+ IN LPCSTR Text);
VOID
CONSOLE_SetInputTextXY(
- IN SHORT x,
- IN SHORT y,
- IN SHORT len,
- IN LPCWSTR Text);
+ IN SHORT x,
+ IN SHORT y,
+ IN SHORT len,
+ IN LPCWSTR Text);
VOID
CONSOLE_SetInvertedTextXY(
- IN SHORT x,
- IN SHORT y,
- IN LPCSTR Text);
+ IN SHORT x,
+ IN SHORT y,
+ IN LPCSTR Text);
+
+VOID
+CONSOLE_SetStatusTextV(
+ IN LPCSTR fmt,
+ IN va_list args);
VOID
CONSOLE_SetStatusText(
- IN LPCSTR fmt, ...);
+ IN LPCSTR fmt,
+ ...);
+
+VOID
+CONSOLE_SetStatusTextXV(
+ IN SHORT x,
+ IN LPCSTR fmt,
+ IN va_list args);
VOID
CONSOLE_SetStatusTextX(
IN SHORT x,
- IN LPCSTR fmt, ...);
+ IN LPCSTR fmt,
+ ...);
VOID
CONSOLE_SetStatusTextAutoFitX(
IN SHORT x,
- IN LPCSTR fmt, ...);
+ IN LPCSTR fmt, ...);
VOID
CONSOLE_SetTextXY(
- IN SHORT x,
- IN SHORT y,
- IN LPCSTR Text);
+ IN SHORT x,
+ IN SHORT y,
+ IN LPCSTR Text);
VOID
CONSOLE_SetUnderlinedTextXY(
- IN SHORT x,
- IN SHORT y,
- IN LPCSTR Text);
+ IN SHORT x,
+ IN SHORT y,
+ IN LPCSTR Text);
VOID
CONSOLE_SetStyledText(
- IN SHORT x,
- IN SHORT y,
- IN INT Flags,
- IN LPCSTR Text);
+ IN SHORT x,
+ IN SHORT y,
+ IN INT Flags,
+ IN LPCSTR Text);
VOID
CONSOLE_ClearStyledText(IN SHORT x,