mirror of
https://github.com/reactos/reactos.git
synced 2024-08-30 15:18:33 +00:00
![Hermès Bélusca-Maïto](/assets/img/avatar_default.png)
- Introduce two small helpers to change and restore the console title. - Console title can change even when internal commands are executed. - Note that when commands are run from within batch files, title is unchanged. - When "cmd.exe /c command" is run, the console title is unchanged; however when "cmd.exe /k command" is run, the console title changes.
39 lines
696 B
C
39 lines
696 B
C
/*
|
|
* title.c - title internal command.
|
|
*
|
|
*
|
|
* History:
|
|
* 1999-02-11 Emanuele Aliberti
|
|
*
|
|
* 30-Apr-2005 (Magnus Olsen <magnus@greatlord.com>)
|
|
* Remove all hardcoded strings in En.rc
|
|
*/
|
|
|
|
#include "precomp.h"
|
|
|
|
#ifdef INCLUDE_CMD_TITLE
|
|
|
|
extern BOOL bTitleSet;
|
|
|
|
INT cmd_title(LPTSTR param)
|
|
{
|
|
/* Do nothing if no args */
|
|
if (*param == _T('\0'))
|
|
return 0;
|
|
|
|
/* Asking help? */
|
|
if (!_tcsncmp(param, _T("/?"), 2))
|
|
{
|
|
ConOutResPaging(TRUE, STRING_TITLE_HELP);
|
|
return 0;
|
|
}
|
|
|
|
/* Set the new console title, and tell CMD to not reset it */
|
|
bTitleSet = FALSE;
|
|
return ConSetTitle(param);
|
|
}
|
|
|
|
#endif /* INCLUDE_CMD_TITLE */
|
|
|
|
/* EOF */
|