diff --git a/src/shell/shell_batch.cpp b/src/shell/shell_batch.cpp index c16f5b5f..086afed7 100644 --- a/src/shell/shell_batch.cpp +++ b/src/shell/shell_batch.cpp @@ -16,13 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_batch.cpp,v 1.15 2005-02-10 10:21:12 qbix79 Exp $ */ +/* $Id: shell_batch.cpp,v 1.16 2005-03-25 09:02:43 qbix79 Exp $ */ #include #include #include "shell.h" - +#include "support.h" BatchFile::BatchFile(DOS_Shell * host,char * name, char * cmd_line) { prev=host->bf; diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 7b5223c9..a4370183 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_cmds.cpp,v 1.52 2005-03-02 11:53:00 qbix79 Exp $ */ +/* $Id: shell_cmds.cpp,v 1.53 2005-03-25 09:02:44 qbix79 Exp $ */ #include #include @@ -25,6 +25,7 @@ #include "callback.h" #include "regs.h" #include "../dos/drives.h" +#include "support.h" static SHELL_Cmd cmd_list[]={ { "CHDIR", 0, &DOS_Shell::CMD_CHDIR, "SHELL_CMD_CHDIR_HELP"}, diff --git a/src/shell/shell_misc.cpp b/src/shell/shell_misc.cpp index ccf6bb09..9c86d91f 100644 --- a/src/shell/shell_misc.cpp +++ b/src/shell/shell_misc.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_misc.cpp,v 1.35 2005-02-10 10:21:12 qbix79 Exp $ */ +/* $Id: shell_misc.cpp,v 1.36 2005-03-25 09:02:46 qbix79 Exp $ */ #include #include @@ -24,6 +24,7 @@ #include //std::front_inserter #include "shell.h" #include "regs.h" +#include "callback.h" void DOS_Shell::ShowPrompt(void) { Bit8u drive=DOS_GetDefaultDrive()+'A'; @@ -54,7 +55,12 @@ void DOS_Shell::InputCommand(char * line) { while (size) { dos.echo=false; - DOS_ReadFile(input_handle,&c,&n); + while(!DOS_ReadFile(input_handle,&c,&n)) { + Bit16u dummy; + DOS_CloseFile(input_handle); + DOS_OpenFile("con",2,&dummy); + LOG(LOG_MISC,LOG_ERROR)("Reopening the input handle.This is a bug!"); + } if (!n) { size=0; //Kill the while loop continue; @@ -521,4 +527,3 @@ char * DOS_Shell::Which(char * name) { } return 0; } -