Add support for the 'title' command.
This commit is contained in:
parent
77fbbcf30d
commit
bcc6256bf0
|
@ -754,6 +754,15 @@ void WCMD_shift () {
|
|||
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* WCMD_title
|
||||
*
|
||||
* Set the console title
|
||||
*/
|
||||
void WCMD_title (char *command) {
|
||||
SetConsoleTitle(command);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* WCMD_type
|
||||
*
|
||||
|
|
|
@ -65,6 +65,7 @@ void WCMD_setshow_prompt (void);
|
|||
void WCMD_setshow_time (void);
|
||||
void WCMD_shift (void);
|
||||
void WCMD_show_prompt (void);
|
||||
void WCMD_title (char *);
|
||||
void WCMD_type (void);
|
||||
void WCMD_verify (char *command);
|
||||
void WCMD_version (void);
|
||||
|
@ -126,10 +127,14 @@ typedef struct {
|
|||
#define WCMD_SET 28
|
||||
#define WCMD_SHIFT 29
|
||||
#define WCMD_TIME 30
|
||||
#define WCMD_TYPE 31
|
||||
#define WCMD_VERIFY 32
|
||||
#define WCMD_VER 33
|
||||
#define WCMD_VOL 34
|
||||
#define WCMD_EXIT 35
|
||||
#define WCMD_TITLE 31
|
||||
#define WCMD_TYPE 32
|
||||
#define WCMD_VERIFY 33
|
||||
#define WCMD_VER 34
|
||||
#define WCMD_VOL 35
|
||||
|
||||
/* Must be last in list */
|
||||
#define WCMD_EXIT 36
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ char *inbuilt[] = {"ATTRIB", "CALL", "CD", "CHDIR", "CLS", "COPY", "CTTY",
|
|||
"DATE", "DEL", "DIR", "ECHO", "ERASE", "FOR", "GOTO",
|
||||
"HELP", "IF", "LABEL", "MD", "MKDIR", "MOVE", "PATH", "PAUSE",
|
||||
"PROMPT", "REM", "REN", "RENAME", "RD", "RMDIR", "SET", "SHIFT",
|
||||
"TIME", "TYPE", "VERIFY", "VER", "VOL", "EXIT"};
|
||||
"TIME", "TITLE", "TYPE", "VERIFY", "VER", "VOL", "EXIT" };
|
||||
|
||||
HINSTANCE hinst;
|
||||
DWORD errorlevel;
|
||||
|
@ -77,6 +77,7 @@ HANDLE h;
|
|||
if (!status) WCMD_print_error();
|
||||
SetConsoleMode (GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT |
|
||||
ENABLE_PROCESSED_INPUT);
|
||||
SetConsoleTitle("Wine Command Prompt");
|
||||
|
||||
/*
|
||||
* Execute any command-line options.
|
||||
|
@ -307,6 +308,10 @@ char *whichcmd;
|
|||
case WCMD_TIME:
|
||||
WCMD_setshow_time ();
|
||||
break;
|
||||
case WCMD_TITLE:
|
||||
if (strlen(&whichcmd[count]) > 0)
|
||||
WCMD_title(&whichcmd[count+1]);
|
||||
break;
|
||||
case WCMD_TYPE:
|
||||
WCMD_type ();
|
||||
break;
|
||||
|
|
|
@ -168,6 +168,8 @@ if called from the command line.\n"
|
|||
|
||||
WCMD_TIME, "Help about TIME\n"
|
||||
|
||||
WCMD_TITLE, "Sets the window title for the wcmd window, syntax TITLE [string]"
|
||||
|
||||
WCMD_TYPE,
|
||||
"TYPE <filename> copies <filename> to the console device (or elsewhere\
|
||||
if redirected). No check is made that the file is readable text.\n"
|
||||
|
@ -210,6 +212,7 @@ REN (RENAME)\tRename a file\
|
|||
RD (RMDIR)\tDelete a subdirectory\
|
||||
SET\t\tSet or show environment variables\
|
||||
TIME\t\tSet or show the current system time\
|
||||
TITLE\t\tSet the window title for the WCMD session\
|
||||
TYPE\t\tType the contents of a text file\
|
||||
VER\t\tShow the current version of WCMD\
|
||||
VOL\t\tShow the volume label of a disk device\
|
||||
|
|
Loading…
Reference in New Issue