Коммит 92541572 создал по автору Hermès Bélusca-Maïto's avatar Hermès Bélusca-Maïto
Просмотр файлов

[CMD]: Addendum to r76000, with ConSetTitle.

svn path=/trunk/; revision=76001
владелец c1596e7b
......@@ -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 */
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать