Change first_shell to be DOS_Shell instead of Program. Makes future manipulations easier.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4211
This commit is contained in:
parent
8a156f17d8
commit
eb26b9a58e
4 changed files with 18 additions and 14 deletions
|
@ -31,7 +31,7 @@
|
|||
Bitu call_shellstop;
|
||||
/* Larger scope so shell_del autoexec can use it to
|
||||
* remove things from the environment */
|
||||
Program * first_shell = 0;
|
||||
DOS_Shell * first_shell = 0;
|
||||
|
||||
static Bitu shellstop_handler(void) {
|
||||
return CBRET_STOP;
|
||||
|
@ -40,6 +40,11 @@ static Bitu shellstop_handler(void) {
|
|||
static void SHELL_ProgramStart(Program * * make) {
|
||||
*make = new DOS_Shell;
|
||||
}
|
||||
//Repeat it with the correct type, could do it in the function below, but this way it should be
|
||||
//clear that if the above function is changed, this function might need a change as well.
|
||||
static void SHELL_ProgramStart_First_shell(DOS_Shell * * make) {
|
||||
*make = new DOS_Shell;
|
||||
}
|
||||
|
||||
#define AUTOEXEC_SIZE 4096
|
||||
static char autoexec_data[AUTOEXEC_SIZE] = { 0 };
|
||||
|
@ -746,7 +751,7 @@ void SHELL_Init() {
|
|||
dos.psp(psp_seg);
|
||||
|
||||
|
||||
SHELL_ProgramStart(&first_shell);
|
||||
SHELL_ProgramStart_First_shell(&first_shell);
|
||||
first_shell->Run();
|
||||
delete first_shell;
|
||||
first_shell = 0;//Make clear that it shouldn't be used anymore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue