From a81bfbb8059ff818a69e40af10b7249c593cb153 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 24 Feb 2019 12:20:20 -0800 Subject: [PATCH] Rename end_loop to noni_end_loop This helps distinguish between the global (noni_)end_loop and the reader specific one. --- src/reader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/reader.cpp b/src/reader.cpp index de601949f..ad17f6056 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -432,7 +432,7 @@ static reader_data_t *current_data() { static volatile sig_atomic_t is_interactive_read; /// Flag for ending non-interactive shell. -static int end_loop = 0; +static int noni_end_loop = 0; /// The stack containing names of files that are being parsed. static std::stack> current_filename; @@ -975,7 +975,7 @@ void reader_exit(int do_exit, int forced) { if (reader_data_t *data = current_data_or_null()) { data->end_loop = do_exit; } - end_loop = do_exit; + noni_end_loop = do_exit; if (forced) exit_forced = true; } @@ -2118,7 +2118,7 @@ void reader_pop() { if (new_reader == nullptr) { reader_interactive_destroy(); } else { - end_loop = 0; + noni_end_loop = 0; s_reset(&new_reader->screen, screen_reset_abandon_line); } } @@ -2279,7 +2279,7 @@ bool shell_is_exiting() { reader_data_t *data = current_data_or_null(); return job_list_is_empty() && data != NULL && data->end_loop; } - return end_loop; + return noni_end_loop; } void reader_bg_job_warning() { @@ -3520,7 +3520,7 @@ int reader_read(int fd, const io_chain_t &io) { // If the exit command was called in a script, only exit the script, not the program. reader_data_t *data = current_data_or_null(); if (data) data->end_loop = 0; - end_loop = 0; + noni_end_loop = 0; proc_pop_interactive(); return res;