From 1499ade89cb4b186c8ab7040ac7ef86b1292c0f8 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Sun, 12 Jun 2016 11:34:35 -0700 Subject: Restyle touched .cpp files --- src/builtin_printf.cpp | 2 +- src/complete.h | 2 -- src/output.cpp | 4 +--- src/parse_constants.h | 4 +++- src/reader.cpp | 1 - src/tokenizer.cpp | 2 +- src/wgetopt.h | 3 ++- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/builtin_printf.cpp b/src/builtin_printf.cpp index d81ab453..d3d971ac 100644 --- a/src/builtin_printf.cpp +++ b/src/builtin_printf.cpp @@ -267,7 +267,7 @@ template <> long double raw_string_to_scalar_type(const wchar_t *s, wchar_t **end) { // Forcing the locale to C is questionable but it's what the old C_STRTOD() that I inlined here // as part of changing how locale management is done by fish. - char * old_locale = setlocale(LC_NUMERIC, "C"); + char *old_locale = setlocale(LC_NUMERIC, "C"); double val = wcstod(s, end); setlocale(LC_NUMERIC, old_locale); return val; diff --git a/src/complete.h b/src/complete.h index d9203aaf..4fd8dbed 100644 --- a/src/complete.h +++ b/src/complete.h @@ -144,8 +144,6 @@ void complete_add(const wchar_t *cmd, bool cmd_is_path, const wcstring &option, complete_option_type_t option_type, int result_mode, const wchar_t *condition, const wchar_t *comp, const wchar_t *desc, int flags); - - /// Sets whether the completion list for this command is complete. If true, any options not matching /// one of the provided options will be flagged as an error by syntax highlighting. void complete_set_authoritative(const wchar_t *cmd, bool cmd_type, bool authoritative); diff --git a/src/output.cpp b/src/output.cpp index 85a1eeaf..85f1f1b9 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -45,9 +45,7 @@ void output_set_writer(int (*writer)(char)) { int (*output_get_writer())(char) { return out; } // Returns true if we think the term256 support is "native" as opposed to forced. -static bool term256_support_is_native(void) { - return max_colors >= 256; -} +static bool term256_support_is_native(void) { return max_colors >= 256; } color_support_t output_get_color_support(void) { return color_support; } diff --git a/src/parse_constants.h b/src/parse_constants.h index 8381f2ae..2ee6287b 100644 --- a/src/parse_constants.h +++ b/src/parse_constants.h @@ -209,7 +209,9 @@ void parse_error_offset_source_start(parse_error_list_t *errors, size_t amt); #define ILLEGAL_FD_ERR_MSG _(L"Illegal file descriptor in redirection '%ls'") /// Error message for wildcards with no matches. -#define WILDCARD_ERR_MSG _(L"No matches for wildcard '%ls'. (Tip: empty matches are allowed in 'set', 'count', 'for'.)") +#define WILDCARD_ERR_MSG \ + _(L"No matches for wildcard '%ls'. (Tip: empty matches are allowed in 'set', 'count', " \ + L"'for'.)") /// Error when using break outside of loop. #define INVALID_BREAK_ERR_MSG _(L"'break' while not inside of loop") diff --git a/src/reader.cpp b/src/reader.cpp index 2d6a6bb8..be5457b0 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -1827,7 +1827,6 @@ static void handle_token_history(int forward, int reset) { } } - enum move_word_dir_t { MOVE_DIR_LEFT, MOVE_DIR_RIGHT }; /// Move buffer position one word or erase one word. This function updates both the internal buffer diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 8e0bc590..2bff944b 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -383,7 +383,7 @@ static size_t read_redirection_or_fd_pipe(const wchar_t *buff, } } } - + // Either way we should have ended on the redirection character itself like '>'. // Don't allow an fd with a caret redirection - see #1873 wchar_t redirect_char = buff[idx++]; // note increment of idx diff --git a/src/wgetopt.h b/src/wgetopt.h index f0b86f69..6bc0df5f 100644 --- a/src/wgetopt.h +++ b/src/wgetopt.h @@ -11,7 +11,8 @@ // 4. #include wgetopt.h in your program // 5. Make use of all the regular getopt functions, prefixing every function, global variable // and d structure with a 'w', and use only wide character strings. -// There are no other functional changes in this version of getopt besides using wide character strings. +// There are no other functional changes in this version of getopt besides using wide character +// strings. // // For examples of how to use wgetopt, see the fish builtin functions, which are defined in // src/builtin_*.cpp -- cgit v1.2.3