From 5a17afaca5c943e0a36fbf86e1be4a9c0846975b Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sun, 28 Oct 2007 10:58:50 +0000 Subject: [PATCH] Change Batchfile constructor.(Silences a few warnings). Introduce batchfile friend editor(moe). Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3025 --- include/shell.h | 10 ++++++---- src/shell/shell_batch.cpp | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/shell.h b/include/shell.h index a238e3e1..32032f9d 100644 --- a/include/shell.h +++ b/include/shell.h @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell.h,v 1.21 2007-06-14 08:23:46 qbix79 Exp $ */ +/* $Id: shell.h,v 1.22 2007-10-28 10:58:49 qbix79 Exp $ */ #ifndef DOSBOX_SHELL_H #define DOSBOX_SHELL_H @@ -44,9 +44,9 @@ class DOS_Shell; class BatchFile { public: - BatchFile(DOS_Shell * host,char * name, char * cmd_line); - ~BatchFile(); - bool ReadLine(char * line); + BatchFile(DOS_Shell * host,char const* const name, char const * const cmd_line); + virtual ~BatchFile(); + virtual bool ReadLine(char * line); bool Goto(char * where); void Shift(void); Bit16u file_handle; @@ -56,8 +56,10 @@ public: CommandLine * cmd; }; +class AutoexecEditor; class DOS_Shell : public Program { private: + friend class AutoexecEditor; std::list l_history, l_completion; char *completion_start; diff --git a/src/shell/shell_batch.cpp b/src/shell/shell_batch.cpp index 53987c9e..84893f7b 100644 --- a/src/shell/shell_batch.cpp +++ b/src/shell/shell_batch.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_batch.cpp,v 1.25 2007-10-09 18:15:42 qbix79 Exp $ */ +/* $Id: shell_batch.cpp,v 1.26 2007-10-28 10:58:50 qbix79 Exp $ */ #include #include @@ -24,7 +24,7 @@ #include "shell.h" #include "support.h" -BatchFile::BatchFile(DOS_Shell * host,char * name, char * cmd_line) { +BatchFile::BatchFile(DOS_Shell * host,char const * const name, char const * const cmd_line) { prev=host->bf; echo=host->echo; shell=host;