2006-02-16 23:23:37 +00:00
|
|
|
/*
|
|
|
|
* title.c - title internal command.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* History:
|
2013-06-29 23:50:13 +00:00
|
|
|
* 1999-02-11 Emanuele Aliberti
|
2006-02-16 23:23:37 +00:00
|
|
|
*
|
2013-06-30 13:23:30 +00:00
|
|
|
* 30-Apr-2005 (Magnus Olsen <magnus@greatlord.com>)
|
2013-06-29 23:50:13 +00:00
|
|
|
* Remove all hardcoded strings in En.rc
|
2006-02-16 23:23:37 +00:00
|
|
|
*/
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include "precomp.h"
|
2006-02-16 23:23:37 +00:00
|
|
|
|
|
|
|
#ifdef INCLUDE_CMD_TITLE
|
|
|
|
|
2016-12-22 21:25:37 +00:00
|
|
|
extern BOOL bTitleSet;
|
2006-02-16 23:23:37 +00:00
|
|
|
|
2017-09-30 14:26:34 +00:00
|
|
|
INT cmd_title(LPTSTR param)
|
2006-02-16 23:23:37 +00:00
|
|
|
{
|
2013-06-29 23:50:13 +00:00
|
|
|
/* Do nothing if no args */
|
|
|
|
if (*param == _T('\0'))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
/* Asking help? */
|
|
|
|
if (!_tcsncmp(param, _T("/?"), 2))
|
|
|
|
{
|
2017-09-30 14:26:34 +00:00
|
|
|
ConOutResPaging(TRUE, STRING_TITLE_HELP);
|
2013-06-29 23:50:13 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-06-03 00:15:44 +00:00
|
|
|
/* Set the new console title, and tell CMD to not reset it */
|
|
|
|
bTitleSet = FALSE;
|
2017-09-30 14:26:34 +00:00
|
|
|
return ConSetTitle(param);
|
2006-02-16 23:23:37 +00:00
|
|
|
}
|
|
|
|
|
2017-09-30 14:26:34 +00:00
|
|
|
#endif /* INCLUDE_CMD_TITLE */
|
2006-02-16 23:23:37 +00:00
|
|
|
|
|
|
|
/* EOF */
|