From 5d8568a3ccb91a138f4d4c6ef8c58eec12042eb5 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 5 Feb 2003 19:12:20 +0000 Subject: [PATCH] Pause Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@659 --- src/shell/shell.cpp | 4 +++- src/shell/shell_cmds.cpp | 7 ++++++- src/shell/shell_inc.h | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index b912446e..aefe64c5 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -188,7 +188,7 @@ void SHELL_Init() { MSG_Add("SHELL_CMD_CHDIR_ERROR","Unable to change to: %s\n"); MSG_Add("SHELL_CMD_MKDIR_ERROR","Unable to make: %s\n"); MSG_Add("SHELL_CMD_RMDIR_ERROR","Unable to remove: %s\n"); - MSG_Add("SHELL_CMD_DEL_ERROR","Unable to delete: %s\n"); + MSG_Add("SHELL_CMD_DEL_ERROR","Unable to delete: %s\n"); MSG_Add("SHELL_SYNTAXERROR","The syntax of the command is incorrect.\n"); MSG_Add("SHELL_CMD_SET_NOT_SET","Environment variable %s not defined\n"); MSG_Add("SHELL_CMD_SET_OUT_OF_SPACE","Not enough environment space left.\n"); @@ -204,6 +204,8 @@ void SHELL_Init() { MSG_Add("SHELL_CMD_DIR_BYTES_FREE","%5d Dir(s) %17s Bytes free\n"); MSG_Add("SHELL_EXECUTE_DRIVE_NOT_FOUND","Drive %c does not exist!\n"); MSG_Add("SHELL_EXECUTE_ILLEGAL_COMMAND","Illegal command: %s.\n"); + MSG_Add("SHELL_CMD_PAUSE","Press any key to continue.\n"); + MSG_Add("SHELL_CMD_PAUSE_HELP","Waits for 1 keystroke to continue.\n"); MSG_Add("SHELL_STARTUP","DOSBox Shell v" VERSION "\n" "DOSBox does not run protected mode games!\n" diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 5b0004b5..d5a081c6 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -42,6 +42,7 @@ static SHELL_Cmd cmd_list[]={ "REM", 0, &DOS_Shell::CMD_REM, "SHELL_CMD_REM_HELP", "RENAME", 0, &DOS_Shell::CMD_RENAME, "SHELL_CMD_RENAME_HELP", "REN", 1, &DOS_Shell::CMD_RENAME, "SHELL_CMD_RENAME_HELP", + "PAUSE", 0, &DOS_Shell::CMD_PAUSE, "SHELL_CMD_PAUSE_HELP", /* "CHDIR", 0, &DOS_Shell::CMD_CHDIR, "Change Directory", "MKDIR", 0, &DOS_Shell::CMD_MKDIR, "Make Directory", @@ -427,4 +428,8 @@ nextfile: void DOS_Shell::CMD_REM(char * args) { } - +void DOS_Shell::CMD_PAUSE(char * args){ + WriteOut(MSG_Get("SHELL_CMD_PAUSE")); + Bit8u c;Bit16u n=1; + DOS_ReadFile (STDIN,&c,&n); +} \ No newline at end of file diff --git a/src/shell/shell_inc.h b/src/shell/shell_inc.h index e21f323d..59ee1b9d 100644 --- a/src/shell/shell_inc.h +++ b/src/shell/shell_inc.h @@ -79,7 +79,7 @@ public: void CMD_REM(char * args); void CMD_RENAME(char * args); void SyntaxError(void); - + void CMD_PAUSE(char * args); /* The shell's variables */ Bit16u input_handle; BatchFile * bf;