Author: hbelusca
Date: Sat Sep 30 14:26:34 2017
New Revision: 76001
URL:
http://svn.reactos.org/svn/reactos?rev=76001&view=rev
Log:
[CMD]: Addendum to r76000, with ConSetTitle.
Modified:
trunk/reactos/base/shell/cmd/cmd.c
trunk/reactos/base/shell/cmd/cmd.h
trunk/reactos/base/shell/cmd/console.c
trunk/reactos/base/shell/cmd/title.c
Modified: trunk/reactos/base/shell/cmd/cmd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=7…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Sat Sep 30 14:26:34 2017
@@ -378,7 +378,7 @@
GetConsoleTitle(szWindowTitle, ARRAYSIZE(szWindowTitle));
bTitleSet = FALSE;
_stprintf(szNewTitle, _T("%s - %s%s"), szWindowTitle, First, Rest);
- SetConsoleTitle(szNewTitle);
+ ConSetTitle(szNewTitle);
/* check if this is a .BAT or .CMD file */
dot = _tcsrchr (szFullName, _T('.'));
@@ -479,7 +479,7 @@
/* Restore the original console title */
if (!bTitleSet)
- SetConsoleTitle(szWindowTitle);
+ ConSetTitle(szWindowTitle);
return dwExitCode;
}
Modified: trunk/reactos/base/shell/cmd/cmd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.h?rev=7…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] Sat Sep 30 14:26:34 2017
@@ -177,6 +177,9 @@
VOID ConOutResPrintf (UINT resID, ...);
VOID ConErrResPrintf (UINT resID, ...);
VOID ConOutResPaging(BOOL NewPage, UINT resID);
+
+
+BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle);
#ifdef INCLUDE_CMD_BEEP
VOID ConRingBell(HANDLE hOutput);
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] Sat Sep 30 14:26:34 2017
@@ -568,6 +568,12 @@
+BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle)
+{
+ /* Now really set the console title */
+ return SetConsoleTitle(lpConsoleTitle);
+}
+
#ifdef INCLUDE_CMD_BEEP
VOID ConRingBell(HANDLE hOutput)
{
Modified: trunk/reactos/base/shell/cmd/title.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/title.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/title.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/title.c [iso-8859-1] Sat Sep 30 14:26:34 2017
@@ -15,7 +15,7 @@
extern BOOL bTitleSet;
-INT cmd_title (LPTSTR param)
+INT cmd_title(LPTSTR param)
{
/* Do nothing if no args */
if (*param == _T('\0'))
@@ -24,14 +24,14 @@
/* Asking help? */
if (!_tcsncmp(param, _T("/?"), 2))
{
- ConOutResPaging(TRUE,STRING_TITLE_HELP);
+ ConOutResPaging(TRUE, STRING_TITLE_HELP);
return 0;
}
bTitleSet = TRUE;
- return SetConsoleTitle (param);
+ return ConSetTitle(param);
}
-#endif /* def INCLUDE_CMD_TITLE */
+#endif /* INCLUDE_CMD_TITLE */
/* EOF */