mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[CMD]: Addendum to r76000, with ConSetTitle.
svn path=/trunk/; revision=76001
This commit is contained in:
parent
c1596e7b3a
commit
9254157290
|
@ -378,7 +378,7 @@ Execute(LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
|
|||
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 @@ Execute(LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
|
|||
|
||||
/* Restore the original console title */
|
||||
if (!bTitleSet)
|
||||
SetConsoleTitle(szWindowTitle);
|
||||
ConSetTitle(szWindowTitle);
|
||||
|
||||
return dwExitCode;
|
||||
}
|
||||
|
|
|
@ -178,6 +178,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);
|
||||
#endif
|
||||
|
|
|
@ -568,6 +568,12 @@ VOID GetScreenSize(PSHORT maxx, PSHORT maxy)
|
|||
|
||||
|
||||
|
||||
BOOL ConSetTitle(IN LPCTSTR lpConsoleTitle)
|
||||
{
|
||||
/* Now really set the console title */
|
||||
return SetConsoleTitle(lpConsoleTitle);
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_CMD_BEEP
|
||||
VOID ConRingBell(HANDLE hOutput)
|
||||
{
|
||||
|
|
|
@ -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 @@ INT cmd_title (LPTSTR param)
|
|||
/* 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 */
|
||||
|
|
Loading…
Reference in a new issue