From 19267d00e25ced92b74de21feba6f564348eb26b Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Mon, 4 May 2020 09:39:03 +0200 Subject: [PATCH] Rename boolean flag "exit" to "exit_flag" Otherwise it's confusing when grepping code, and it confuses syntax highlighter in various programs as well. --- include/shell.h | 2 +- src/shell/shell.cpp | 22 +++++++++++----------- src/shell/shell_cmds.cpp | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/shell.h b/include/shell.h index ec86623b..62d26898 100644 --- a/include/shell.h +++ b/include/shell.h @@ -120,7 +120,7 @@ public: Bit16u input_handle; BatchFile * bf; bool echo; - bool exit; + bool exit_flag; bool call; }; diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 444592ae..ab3dd584 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -157,16 +157,16 @@ AutoexecObject::~AutoexecObject(){ } DOS_Shell::DOS_Shell() - : Program(), - l_history{}, - l_completion{}, - completion_start(nullptr), - completion_index(0), - input_handle(STDIN), - bf(nullptr), - echo(true), - exit(false), - call(false) + : Program(), + l_history{}, + l_completion{}, + completion_start(nullptr), + completion_index(0), + input_handle(STDIN), + bf(nullptr), + echo(true), + exit_flag(false), + call(false) {} Bitu DOS_Shell::GetRedirection(char *s, char **ifn, char **ofn,bool * append) { @@ -375,7 +375,7 @@ void DOS_Shell::Run(void) { InputCommand(input_line); ParseLine(input_line); } - } while (!exit); + } while (!exit_flag); } void DOS_Shell::SyntaxError(void) { diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 775131d2..18afb53f 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -307,10 +307,10 @@ void DOS_Shell::CMD_ECHO(char * args){ } else WriteOut("%s\r\n",args); } - -void DOS_Shell::CMD_EXIT(char * args) { +void DOS_Shell::CMD_EXIT(char *args) +{ HELP("EXIT"); - exit = true; + exit_flag = true; } void DOS_Shell::CMD_CHDIR(char * args) {