mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-22 03:51:15 -03:00
clang-format all C++ files
This commit is contained in:
@@ -1779,7 +1779,7 @@ static void validate_new_termsize(struct winsize *new_termsize, const environmen
|
||||
if (is_main_thread() && parser_t::principal_parser().is_interactive()) {
|
||||
FLOGF(warning, _(L"Current terminal parameters have rows and/or columns set to zero."));
|
||||
FLOGF(warning, _(L"The stty command can be used to correct this "
|
||||
L"(e.g., stty rows 80 columns 24)."));
|
||||
L"(e.g., stty rows 80 columns 24)."));
|
||||
}
|
||||
#endif
|
||||
// Fallback to the environment vars.
|
||||
@@ -1801,7 +1801,8 @@ static void validate_new_termsize(struct winsize *new_termsize, const environmen
|
||||
if (new_termsize->ws_col < MIN_TERM_COL || new_termsize->ws_row < MIN_TERM_ROW) {
|
||||
// Also highly hackisk.
|
||||
if (is_main_thread() && parser_t::principal_parser().is_interactive()) {
|
||||
FLOGF(warning, _(L"Current terminal parameters set terminal size to unreasonable value."));
|
||||
FLOGF(warning,
|
||||
_(L"Current terminal parameters set terminal size to unreasonable value."));
|
||||
FLOGF(warning, _(L"Defaulting terminal size to 80x24."));
|
||||
}
|
||||
new_termsize->ws_col = DFLT_TERM_COL;
|
||||
|
||||
@@ -152,7 +152,8 @@ static void guess_emoji_width(const environment_t &vars) {
|
||||
if (auto width_str = vars.get(L"fish_emoji_width")) {
|
||||
int new_width = fish_wcstol(width_str->as_string().c_str());
|
||||
g_fish_emoji_width = std::max(0, new_width);
|
||||
FLOGF(term_support, "'fish_emoji_width' preference: %d, overwriting default", g_fish_emoji_width);
|
||||
FLOGF(term_support, "'fish_emoji_width' preference: %d, overwriting default",
|
||||
g_fish_emoji_width);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -352,7 +353,8 @@ static void update_fish_color_support(const environment_t &vars) {
|
||||
fish_wcstod(tpv->as_string().c_str(), nullptr) > 299) {
|
||||
// OS X Lion is version 299+, it has 256 color support (see github Wiki)
|
||||
support_term256 = true;
|
||||
FLOGF(term_support, L"256 color support enabled for TERM=%ls on Terminal.app", term.c_str());
|
||||
FLOGF(term_support, L"256 color support enabled for TERM=%ls on Terminal.app",
|
||||
term.c_str());
|
||||
} else {
|
||||
support_term256 = true;
|
||||
FLOGF(term_support, L"256 color support enabled for TERM=%ls", term.c_str());
|
||||
@@ -400,7 +402,8 @@ static bool initialize_curses_using_fallback(const char *term) {
|
||||
int err_ret;
|
||||
if (setupterm(const_cast<char *>(term), STDOUT_FILENO, &err_ret) == OK) return true;
|
||||
if (session_interactivity() != session_interactivity_t::not_interactive) {
|
||||
FLOGF(warning, _(L"Could not set up terminal using the fallback terminal type '%s'."), term);
|
||||
FLOGF(warning, _(L"Could not set up terminal using the fallback terminal type '%s'."),
|
||||
term);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -463,7 +466,8 @@ static void init_curses(const environment_t &vars) {
|
||||
if (term.missing_or_empty()) {
|
||||
FLOGF(warning, _(L"TERM environment variable not set."));
|
||||
} else {
|
||||
FLOGF(warning, _(L"TERM environment variable set to '%ls'."), term->as_string().c_str());
|
||||
FLOGF(warning, _(L"TERM environment variable set to '%ls'."),
|
||||
term->as_string().c_str());
|
||||
FLOGF(warning, _(L"Check that this terminal type is supported on this system."));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,7 +548,8 @@ autoclose_fd_t env_universal_t::open_temporary_file(const wcstring &directory, w
|
||||
static bool check_duration(double start_time) {
|
||||
double duration = timef() - start_time;
|
||||
if (duration > 0.25) {
|
||||
FLOGF(warning, _(L"Locking the universal var file took too long (%.3f seconds)."), duration);
|
||||
FLOGF(warning, _(L"Locking the universal var file took too long (%.3f seconds)."),
|
||||
duration);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1248,7 +1249,8 @@ class universal_notifier_notifyd_t : public universal_notifier_t {
|
||||
void post_notification() {
|
||||
uint32_t status = notify_post(name.c_str());
|
||||
if (status != NOTIFY_STATUS_OK) {
|
||||
FLOGF(warning, "notify_post() failed with status %u. Uvar notifications may not be sent.",
|
||||
FLOGF(warning,
|
||||
"notify_post() failed with status %u. Uvar notifications may not be sent.",
|
||||
status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,8 @@ static void source_config_in_directory(const wcstring &dir) {
|
||||
const wcstring escaped_dir = escape_string(dir, ESCAPE_ALL);
|
||||
const wcstring escaped_pathname = escaped_dir + L"/config.fish";
|
||||
if (waccess(config_pathname, R_OK) != 0) {
|
||||
FLOGF(config, L"not sourcing %ls (not readable or does not exist)", escaped_pathname.c_str());
|
||||
FLOGF(config, L"not sourcing %ls (not readable or does not exist)",
|
||||
escaped_pathname.c_str());
|
||||
return;
|
||||
}
|
||||
FLOGF(config, L"sourcing %ls", escaped_pathname.c_str());
|
||||
|
||||
@@ -62,7 +62,8 @@ class category_list_t {
|
||||
category_t exec_fork{L"exec-fork", L"Calls to fork()"};
|
||||
|
||||
category_t parse_productions{L"parse-productions", L"Resolving tokens"};
|
||||
category_t parse_productions_chatty{L"parse-productions-chatty", L"Resolving tokens (chatty messages)"};
|
||||
category_t parse_productions_chatty{L"parse-productions-chatty",
|
||||
L"Resolving tokens (chatty messages)"};
|
||||
|
||||
category_t proc_job_run{L"proc-job-run", L"Jobs getting started or continued"};
|
||||
|
||||
@@ -195,5 +196,4 @@ void log_extra_to_flog_file(const wcstring &s);
|
||||
|
||||
#endif
|
||||
|
||||
#define should_flog(wht) \
|
||||
(flog_details::category_list_t::g_instance->wht.enabled)
|
||||
#define should_flog(wht) (flog_details::category_list_t::g_instance->wht.enabled)
|
||||
|
||||
@@ -126,7 +126,8 @@ bool set_child_group(job_t *j, pid_t child_pid) {
|
||||
// ever leads to a terminal hang due if both this setpgid call AND posix_spawn's
|
||||
// internal setpgid calls failed), write to the debug log so a future developer
|
||||
// doesn't go crazy trying to track this down.
|
||||
FLOGF(proc_pgroup, "Error %d while calling setpgid for child %d (probably harmless)", errno,
|
||||
FLOGF(proc_pgroup,
|
||||
"Error %d while calling setpgid for child %d (probably harmless)", errno,
|
||||
child_pid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -758,7 +758,8 @@ int terminal_maybe_give_to_job(const job_t *j, bool continuing_from_stopped) {
|
||||
// job/group have been started, the only way this can happen is if the very last
|
||||
// process in the group terminated and didn't need to access the terminal, otherwise
|
||||
// it would have hung waiting for terminal IO (SIGTTIN). We can safely ignore this.
|
||||
FLOGF(proc_termowner, L"tcsetpgrp called but process group %d has terminated.\n", j->pgid);
|
||||
FLOGF(proc_termowner, L"tcsetpgrp called but process group %d has terminated.\n",
|
||||
j->pgid);
|
||||
return notneeded;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user