Author: hbelusca
Date: Tue Jul 2 23:07:15 2013
New Revision: 59411
URL:
http://svn.reactos.org/svn/reactos?rev=59411&view=rev
Log:
[CMD]
Remove extra \r put by hand in some console output functions, so that we use there only
\n.
But modify the ConWrite function so that, if we redirect output to something else than a
console
(e.g. redirect to a file or to a serial console via ... > AUX), newline characters \n
get converted
into \r\n automatically.
What you get, for instance, is:
https://imageshack.com/a/img853/5834/l34.png
Modified:
trunk/reactos/base/shell/cmd/assoc.c
trunk/reactos/base/shell/cmd/attrib.c
trunk/reactos/base/shell/cmd/choice.c
trunk/reactos/base/shell/cmd/cmd.c
trunk/reactos/base/shell/cmd/cmdinput.c
trunk/reactos/base/shell/cmd/cmdtable.c
trunk/reactos/base/shell/cmd/console.c
trunk/reactos/base/shell/cmd/echo.c
trunk/reactos/base/shell/cmd/error.c
trunk/reactos/base/shell/cmd/filecomp.c
trunk/reactos/base/shell/cmd/free.c
trunk/reactos/base/shell/cmd/misc.c
trunk/reactos/base/shell/cmd/path.c
trunk/reactos/base/shell/cmd/set.c
trunk/reactos/base/shell/cmd/ver.c
Modified: trunk/reactos/base/shell/cmd/assoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/assoc.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/assoc.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/assoc.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -80,7 +80,7 @@
if (fileTypeLength != 0) /* if there is a default key, display relevant information
*/
{
- ConOutPrintf(_T("%s=%s\r\n"), extension, fileType);
+ ConOutPrintf(_T("%s=%s\n"), extension, fileType);
}
if (fileTypeLength)
Modified: trunk/reactos/base/shell/cmd/attrib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/attrib.c?re…
==============================================================================
--- trunk/reactos/base/shell/cmd/attrib.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/attrib.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -96,15 +96,15 @@
_tcscpy (pszFileName, findData.cFileName);
- ConOutPrintf (_T("%c %c%c%c %s\n"),
- (findData.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) ?
_T('A') : _T(' '),
- (findData.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) ?
_T('S') : _T(' '),
- (findData.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ?
_T('H') : _T(' '),
- (findData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ?
_T('R') : _T(' '),
- szFullName);
- }
- while (FindNextFile (hFind, &findData));
- FindClose (hFind);
+ ConOutPrintf(_T("%c %c%c%c %s\n"),
+ (findData.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) ?
_T('A') : _T(' '),
+ (findData.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) ?
_T('S') : _T(' '),
+ (findData.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ?
_T('H') : _T(' '),
+ (findData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ?
_T('R') : _T(' '),
+ szFullName);
+ }
+ while (FindNextFile(hFind, &findData));
+ FindClose(hFind);
}
Modified: trunk/reactos/base/shell/cmd/choice.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/choice.c?re…
==============================================================================
--- trunk/reactos/base/shell/cmd/choice.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/choice.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -296,7 +296,7 @@
GetTickCount () - clk);
val = IsKeyInString (lpOptions, cDefault, bCaseSensitive);
- ConOutPrintf (_T("%c\n"), lpOptions[val]);
+ ConOutPrintf(_T("%c\n"), lpOptions[val]);
nErrorLevel = val + 1;
Modified: trunk/reactos/base/shell/cmd/cmd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=5…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -1378,7 +1378,7 @@
if (bEcho)
{
if (!bIgnoreEcho)
- ConOutChar('\n');
+ ConOutChar(_T('\n'));
PrintPrompt();
}
}
@@ -1391,7 +1391,7 @@
if (CheckCtrlBreak(BREAK_INPUT))
{
- ConOutPuts(_T("\n"));
+ ConOutChar(_T('\n'));
return FALSE;
}
ip = readline;
Modified: trunk/reactos/base/shell/cmd/cmdinput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmdinput.c?…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmdinput.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmdinput.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -438,7 +438,7 @@
#endif
str[charcount++] = _T('\n');
str[charcount] = _T('\0');
- ConOutChar (_T('\n'));
+ ConOutChar(_T('\n'));
bReturn = TRUE;
break;
Modified: trunk/reactos/base/shell/cmd/cmdtable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmdtable.c?…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmdtable.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmdtable.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -271,7 +271,7 @@
}
if (y != 0)
- ConOutChar('\n');
+ ConOutChar(_T('\n'));
}
VOID PrintCommandListDetail(VOID)
Modified: trunk/reactos/base/shell/cmd/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/console.c?r…
==============================================================================
--- trunk/reactos/base/shell/cmd/console.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/console.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -138,6 +138,7 @@
{
DWORD dwWritten;
HANDLE hOutput = GetStdHandle(nStdHandle);
+ PVOID p;
/* Check whether we are writing to a console and if so, write to it */
if (IsConsoleHandle(hOutput))
@@ -157,10 +158,35 @@
error_out_of_memory();
return;
}
- len = MultiByteToWideChar(OutputCodePage, 0, str, len, buffer, len);
+ len = (DWORD)MultiByteToWideChar(OutputCodePage, 0, str, (INT)len, buffer,
(INT)len);
str = (PVOID)buffer;
#endif
- WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL);
+ /*
+ * Find any newline character in the buffer,
+ * send the part BEFORE the newline, then send
+ * a carriage-return + newline, and then send
+ * the remaining part of the buffer.
+ *
+ * This fixes output in files and serial console.
+ */
+ while (str && *(PWCHAR)str && len > 0)
+ {
+ p = wcspbrk((PWCHAR)str, L"\r\n");
+ if (p)
+ {
+ len -= ((PWCHAR)p - (PWCHAR)str) + 1;
+ WriteFile(hOutput, str, ((PWCHAR)p - (PWCHAR)str) * sizeof(WCHAR),
&dwWritten, NULL);
+ WriteFile(hOutput, L"\r\n", 2 * sizeof(WCHAR), &dwWritten,
NULL);
+ str = (PVOID)((PWCHAR)p + 1);
+ }
+ else
+ {
+ WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL);
+ break;
+ }
+ }
+
+ // WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL);
#ifndef _UNICODE
cmd_free(buffer);
#endif
@@ -177,21 +203,46 @@
len = WideCharToMultiByte(OutputCodePage, 0, str, len, buffer, len * MB_LEN_MAX,
NULL, NULL);
str = (PVOID)buffer;
#endif
- WriteFile(hOutput, str, len, &dwWritten, NULL);
+ /*
+ * Find any newline character in the buffer,
+ * send the part BEFORE the newline, then send
+ * a carriage-return + newline, and then send
+ * the remaining part of the buffer.
+ *
+ * This fixes output in files and serial console.
+ */
+ while (str && *(PCHAR)str && len > 0)
+ {
+ p = strpbrk((PCHAR)str, "\r\n");
+ if (p)
+ {
+ len -= ((PCHAR)p - (PCHAR)str) + 1;
+ WriteFile(hOutput, str, ((PCHAR)p - (PCHAR)str), &dwWritten, NULL);
+ WriteFile(hOutput, "\r\n", 2, &dwWritten, NULL);
+ str = (PVOID)((PCHAR)p + 1);
+ }
+ else
+ {
+ WriteFile(hOutput, str, len, &dwWritten, NULL);
+ break;
+ }
+ }
+
+ // WriteFile(hOutput, str, len, &dwWritten, NULL);
#ifdef _UNICODE
cmd_free(buffer);
#endif
}
}
-VOID ConOutChar (TCHAR c)
+VOID ConOutChar(TCHAR c)
{
ConWrite(&c, 1, STD_OUTPUT_HANDLE);
}
VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
{
- ConWrite(szText, _tcslen(szText), nStdHandle);
+ ConWrite(szText, (DWORD)_tcslen(szText), nStdHandle);
}
VOID ConOutResPaging(BOOL NewPage, UINT resID)
@@ -201,15 +252,14 @@
ConOutPrintfPaging(NewPage, szMsg);
}
-VOID ConOutResPuts (UINT resID)
+VOID ConOutResPuts(UINT resID)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
-
ConPuts(szMsg, STD_OUTPUT_HANDLE);
}
-VOID ConOutPuts (LPTSTR szText)
+VOID ConOutPuts(LPTSTR szText)
{
ConPuts(szText, STD_OUTPUT_HANDLE);
}
@@ -218,7 +268,10 @@
VOID ConPrintf(LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle)
{
TCHAR szOut[OUTPUT_BUFFER_SIZE];
- ConWrite(szOut, _vstprintf(szOut, szFormat, arg_ptr), nStdHandle);
+ DWORD len;
+
+ len = (DWORD)_vstprintf(szOut, szFormat, arg_ptr);
+ ConWrite(szOut, len, nStdHandle);
}
INT ConPrintfPaging(BOOL NewPage, LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle)
@@ -247,29 +300,29 @@
if (szFormat == NULL)
return 0;
- //get the size of the visual screen that can be printed too
+ /* Get the size of the visual screen that can be printed too */
if (!IsConsoleHandle(hOutput) || !GetConsoleScreenBufferInfo(hOutput, &csbi))
{
- // we assuming its a file handle
+ /* We assume it's a file handle */
ConPrintf(szFormat, arg_ptr, nStdHandle);
return 0;
}
- //subtract 2 to account for "press any key..." and for the blank line at
the end of PagePrompt()
+ /* Subtract 2 to account for "press any key..." and for the blank line at
the end of PagePrompt() */
ScreenLines = (csbi.srWindow.Bottom - csbi.srWindow.Top) - 4;
CharSL = csbi.dwCursorPosition.X;
- //make sure they didnt make the screen to small
- if (ScreenLines<4)
+ /* Make sure they didn't make the screen to small */
+ if (ScreenLines < 4)
{
ConPrintf(szFormat, arg_ptr, nStdHandle);
return 0;
}
- len = _vstprintf (szOut, szFormat, arg_ptr);
+ len = _vstprintf(szOut, szFormat, arg_ptr);
while (i < len)
{
- // Search until the end of a line is reached
+ /* Search until the end of a line is reached */
if (szOut[i++] != _T('\n') && ++CharSL < csbi.dwSize.X)
continue;
@@ -285,7 +338,7 @@
{
return 1;
}
- //reset the number of lines being printed
+ /* Reset the number of lines being printed */
LineCount = 0;
}
}
@@ -295,43 +348,14 @@
return 0;
}
-VOID ConErrFormatMessage (DWORD MessageId, ...)
+VOID ConErrFormatMessage(DWORD MessageId, ...)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
DWORD ret;
LPTSTR text;
va_list arg_ptr;
- va_start (arg_ptr, MessageId);
- ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- MessageId,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &text,
- 0,
- &arg_ptr);
-
- va_end (arg_ptr);
- if (ret > 0)
- {
- ConErrPuts (text);
- LocalFree(text);
- }
- else
- {
- LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
- ConErrPrintf(szMsg);
- }
-}
-
-VOID ConOutFormatMessage (DWORD MessageId, ...)
-{
- TCHAR szMsg[RC_STRING_MAX_SIZE];
- DWORD ret;
- LPTSTR text;
- va_list arg_ptr;
-
- va_start (arg_ptr, MessageId);
+ va_start(arg_ptr, MessageId);
ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
MessageId,
@@ -340,10 +364,10 @@
0,
&arg_ptr);
- va_end (arg_ptr);
+ va_end(arg_ptr);
if (ret > 0)
{
- ConErrPuts (text);
+ ConErrPuts(text);
LocalFree(text);
}
else
@@ -353,118 +377,152 @@
}
}
-VOID ConOutResPrintf (UINT resID, ...)
-{
- TCHAR szMsg[RC_STRING_MAX_SIZE];
- va_list arg_ptr;
-
- va_start (arg_ptr, resID);
+VOID ConOutFormatMessage(DWORD MessageId, ...)
+{
+ TCHAR szMsg[RC_STRING_MAX_SIZE];
+ DWORD ret;
+ LPTSTR text;
+ va_list arg_ptr;
+
+ va_start(arg_ptr, MessageId);
+ ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ MessageId,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR) &text,
+ 0,
+ &arg_ptr);
+
+ va_end(arg_ptr);
+ if (ret > 0)
+ {
+ ConErrPuts(text);
+ LocalFree(text);
+ }
+ else
+ {
+ LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
+ ConErrPrintf(szMsg);
+ }
+}
+
+VOID ConOutResPrintf(UINT resID, ...)
+{
+ TCHAR szMsg[RC_STRING_MAX_SIZE];
+ va_list arg_ptr;
+
+ va_start(arg_ptr, resID);
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
ConPrintf(szMsg, arg_ptr, STD_OUTPUT_HANDLE);
- va_end (arg_ptr);
-}
-
-VOID ConOutPrintf (LPTSTR szFormat, ...)
-{
- va_list arg_ptr;
-
- va_start (arg_ptr, szFormat);
+ va_end(arg_ptr);
+}
+
+VOID ConOutPrintf(LPTSTR szFormat, ...)
+{
+ va_list arg_ptr;
+
+ va_start(arg_ptr, szFormat);
ConPrintf(szFormat, arg_ptr, STD_OUTPUT_HANDLE);
- va_end (arg_ptr);
-}
-
-INT ConOutPrintfPaging (BOOL NewPage, LPTSTR szFormat, ...)
+ va_end(arg_ptr);
+}
+
+INT ConOutPrintfPaging(BOOL NewPage, LPTSTR szFormat, ...)
{
INT iReturn;
va_list arg_ptr;
- va_start (arg_ptr, szFormat);
+ va_start(arg_ptr, szFormat);
iReturn = ConPrintfPaging(NewPage, szFormat, arg_ptr, STD_OUTPUT_HANDLE);
- va_end (arg_ptr);
+ va_end(arg_ptr);
return iReturn;
}
-VOID ConErrChar (TCHAR c)
+VOID ConErrChar(TCHAR c)
{
ConWrite(&c, 1, STD_ERROR_HANDLE);
}
-VOID ConErrResPuts (UINT resID)
+VOID ConErrResPuts(UINT resID)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
ConPuts(szMsg, STD_ERROR_HANDLE);
}
-VOID ConErrPuts (LPTSTR szText)
+VOID ConErrPuts(LPTSTR szText)
{
ConPuts(szText, STD_ERROR_HANDLE);
}
-VOID ConErrResPrintf (UINT resID, ...)
-{
- TCHAR szMsg[RC_STRING_MAX_SIZE];
- va_list arg_ptr;
-
- va_start (arg_ptr, resID);
+VOID ConErrResPrintf(UINT resID, ...)
+{
+ TCHAR szMsg[RC_STRING_MAX_SIZE];
+ va_list arg_ptr;
+
+ va_start(arg_ptr, resID);
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
ConPrintf(szMsg, arg_ptr, STD_ERROR_HANDLE);
- va_end (arg_ptr);
-}
-
-VOID ConErrPrintf (LPTSTR szFormat, ...)
-{
- va_list arg_ptr;
-
- va_start (arg_ptr, szFormat);
+ va_end(arg_ptr);
+}
+
+VOID ConErrPrintf(LPTSTR szFormat, ...)
+{
+ va_list arg_ptr;
+
+ va_start(arg_ptr, szFormat);
ConPrintf(szFormat, arg_ptr, STD_ERROR_HANDLE);
- va_end (arg_ptr);
-}
-
-VOID SetCursorXY (SHORT x, SHORT y)
+ va_end(arg_ptr);
+}
+
+
+VOID SetCursorXY(SHORT x, SHORT y)
{
COORD coPos;
coPos.X = x;
coPos.Y = y;
- SetConsoleCursorPosition (GetStdHandle (STD_OUTPUT_HANDLE), coPos);
-}
-
-
-VOID GetCursorXY (PSHORT x, PSHORT y)
+ SetConsoleCursorPosition(GetStdHandle (STD_OUTPUT_HANDLE), coPos);
+}
+
+VOID GetCursorXY(PSHORT x, PSHORT y)
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
- GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
+ GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
*x = csbi.dwCursorPosition.X;
*y = csbi.dwCursorPosition.Y;
}
-
-SHORT GetCursorX (VOID)
+SHORT GetCursorX(VOID)
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
- GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
-
+ GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
return csbi.dwCursorPosition.X;
}
-
-SHORT GetCursorY (VOID)
+SHORT GetCursorY(VOID)
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
- GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
-
+ GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
return csbi.dwCursorPosition.Y;
}
-
-VOID GetScreenSize (PSHORT maxx, PSHORT maxy)
+VOID SetCursorType(BOOL bInsert, BOOL bVisible)
+{
+ CONSOLE_CURSOR_INFO cci;
+
+ cci.dwSize = bInsert ? 10 : 99;
+ cci.bVisible = bVisible;
+
+ SetConsoleCursorInfo(GetStdHandle (STD_OUTPUT_HANDLE), &cci);
+}
+
+VOID GetScreenSize(PSHORT maxx, PSHORT maxy)
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
@@ -474,21 +532,8 @@
csbi.dwSize.Y = 25;
}
- if (maxx)
- *maxx = csbi.dwSize.X;
- if (maxy)
- *maxy = csbi.dwSize.Y;
-}
-
-
-VOID SetCursorType (BOOL bInsert, BOOL bVisible)
-{
- CONSOLE_CURSOR_INFO cci;
-
- cci.dwSize = bInsert ? 10 : 99;
- cci.bVisible = bVisible;
-
- SetConsoleCursorInfo (GetStdHandle (STD_OUTPUT_HANDLE), &cci);
+ if (maxx) *maxx = csbi.dwSize.X;
+ if (maxy) *maxy = csbi.dwSize.Y;
}
/* EOF */
Modified: trunk/reactos/base/shell/cmd/echo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/echo.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/echo.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/echo.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -83,7 +83,7 @@
{
/* skip the first character */
ConOutPuts(param + 1);
- ConOutPuts(_T("\r\n"));
+ ConOutChar(_T('\n'));
}
return 0;
}
Modified: trunk/reactos/base/shell/cmd/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/error.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/error.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/error.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -46,7 +46,7 @@
NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&szError, 0, NULL))
{
- ConErrPrintf (_T("%s %s\n"), szError, szMessage);
+ ConErrPrintf(_T("%s %s\n"), szError, szMessage);
if (szError)
LocalFree (szError);
return;
@@ -54,9 +54,9 @@
/* Fall back just in case the error is not defined */
if (szFormat)
- ConErrPrintf (_T("%s -- %s\n"), szMsg, szMessage);
+ ConErrPrintf(_T("%s -- %s\n"), szMsg, szMessage);
else
- ConErrPrintf (_T("%s\n"), szMsg);
+ ConErrPrintf(_T("%s\n"), szMsg);
}
VOID error_parameter_format(TCHAR ch)
Modified: trunk/reactos/base/shell/cmd/filecomp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/filecomp.c?…
==============================================================================
--- trunk/reactos/base/shell/cmd/filecomp.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/filecomp.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -302,7 +302,7 @@
longestfname += 3;
/* find anything */
- ConOutChar (_T('\n'));
+ ConOutChar(_T('\n'));
do
{
/* ignore . and .. */
@@ -323,7 +323,7 @@
/* print the new line only if we aren't on the
* last column, in this case it wraps anyway */
if (count * longestfname != (UINT)screenwidth)
- ConOutPrintf (_T("\n"));
+ ConOutChar(_T('\n'));
count = 0;
}
}
@@ -332,7 +332,7 @@
FindClose (hFile);
if (count)
- ConOutChar (_T('\n'));
+ ConOutChar(_T('\n'));
}
else
{
Modified: trunk/reactos/base/shell/cmd/free.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/free.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/free.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/free.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -66,7 +66,7 @@
&dwBytPerSec, &dwFreeCl, &dwTotCl))
{
LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
- ConErrPrintf (_T("%s %s:\n"), szMsg, szDrive);
+ ConErrPrintf(_T("%s %s:\n"), szMsg, szDrive);
return;
}
Modified: trunk/reactos/base/shell/cmd/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/misc.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/misc.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/misc.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -157,7 +157,7 @@
c = _totupper(cgetchar());
} while (!(_tcschr(options, c) || c == _T('\3')) || !c);
- ConOutPuts (_T("\r\n"));
+ ConOutChar(_T('\n'));
if (c == options[1])
return bCtrlBreak = FALSE; /* ignore */
@@ -578,8 +578,8 @@
ConOutResPrintf (resID);
/* preliminary fix */
- ConInString (szIn, 10);
- ConOutPrintf (_T("\n"));
+ ConInString(szIn, 10);
+ ConOutChar(_T('\n'));
_tcsupr (szIn);
for (p = szIn; _istspace (*p); p++)
@@ -642,8 +642,8 @@
ConOutResPrintf (resID);
/* preliminary fix */
- ConInString (szIn, 10);
- ConOutPrintf (_T("\n"));
+ ConInString(szIn, 10);
+ ConOutChar(_T('\n'));
_tcsupr (szIn);
for (p = szIn; _istspace (*p); p++)
Modified: trunk/reactos/base/shell/cmd/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/path.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/path.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/path.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -63,7 +63,7 @@
GetEnvironmentVariable (_T("PATH"), pszBuffer, dwBuffer);
}
- ConOutPrintf (_T("PATH=%s\n"), pszBuffer);
+ ConOutPrintf(_T("PATH=%s\n"), pszBuffer);
cmd_free (pszBuffer);
return 0;
Modified: trunk/reactos/base/shell/cmd/set.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/set.c?rev=5…
==============================================================================
--- trunk/reactos/base/shell/cmd/set.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/set.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -96,7 +96,7 @@
if (*lpOutput != _T('='))
ConOutPuts(lpOutput);
lpOutput += _tcslen(lpOutput) + 1;
- ConOutPuts(_T("\r\n"));
+ ConOutChar(_T('\n'));
}
FreeEnvironmentStrings (lpEnv);
}
@@ -185,7 +185,7 @@
if (!_tcsnicmp(lpOutput, param, p - param))
{
ConOutPuts(lpOutput);
- ConOutPuts(_T("\r\n"));
+ ConOutChar(_T('\n'));
bFound = TRUE;
}
lpOutput += _tcslen(lpOutput) + 1;
Modified: trunk/reactos/base/shell/cmd/ver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/ver.c?rev=5…
==============================================================================
--- trunk/reactos/base/shell/cmd/ver.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/ver.c [iso-8859-1] Tue Jul 2 23:07:15 2013
@@ -46,7 +46,7 @@
ConOutResPrintf(STRING_VERSION_RUNVER, RosVersion);
}
}
- ConOutPuts (_T("\n"));
+ ConOutChar(_T('\n'));
}