diff --git a/src/common.cpp b/src/common.cpp index d097f5844..73e2f43ae 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -78,7 +78,6 @@ const wchar_t *program_name; int debug_level = 1; // default maximum debug output level (errors and warnings) int debug_stack_frames = 0; // default number of stack frames to show on debug() calls - /// Be able to restore the term's foreground process group. /// This is set during startup and not modified after. static pid_t initial_fg_process_group = -1; @@ -93,24 +92,6 @@ static volatile bool termsize_valid = false; static char *wcs2str_internal(const wchar_t *in, char *out); static void debug_shared(const wchar_t msg_level, const wcstring &msg); -bool is_whitespace(wchar_t c) { - switch (c) { - case ' ': - case '\t': - case '\r': - case '\n': - case '\v': - return true; - default: - return false; - } -} - -bool is_whitespace(const wcstring &input) { - bool (*pred)(wchar_t c) = is_whitespace; - return std::all_of(input.begin(), input.end(), pred); -} - #if defined(OS_IS_CYGWIN) || defined(WSL) // MS Windows tty devices do not currently have either a read or write timestamp. Those // respective fields of `struct stat` are always the current time. Which means we can't diff --git a/src/common.h b/src/common.h index cf6963349..98785ab24 100644 --- a/src/common.h +++ b/src/common.h @@ -217,14 +217,6 @@ extern const wchar_t *program_name; /// Set to false if it's been determined we can't trust the last modified timestamp on the tty. extern const bool has_working_tty_timestamps; -/// A list of all whitespace characters -extern const wcstring whitespace; -extern const char *whitespace_narrow; - -bool is_whitespace(const wchar_t input); -bool is_whitespace(const wcstring &input); -inline bool is_whitespace(const wchar_t *input) { return is_whitespace(wcstring(input)); } - /// This macro is used to check that an argument is true. It is a bit like a non-fatal form of /// assert. Instead of exiting on failure, the current function is ended at once. The second /// parameter is the return value of the current function on failure.