diff --git a/src/path.cpp b/src/path.cpp index 1888228d0..e76ed2726 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -4,7 +4,6 @@ #include "config.h" // IWYU pragma: keep #include -#include #include #include #include @@ -240,7 +239,7 @@ static void maybe_issue_path_warning(const wcstring &which_dir, const wcstring & debug(0, _(L"The error was '%s'."), strerror(saved_errno)); debug(0, _(L"Please set $%ls to a directory where you have write access."), env_var); } - fputwc(L'\n', stderr); + write(STDERR_FILENO, "\n", 1); } static void path_create(wcstring &path, const wcstring &xdg_var, const wcstring &which_dir, diff --git a/src/reader.cpp b/src/reader.cpp index 55796eebd..ebd10681c 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -693,14 +693,14 @@ void reader_write_title(const wcstring &cmd, bool reset_cursor_position) { for (size_t i = 0; i < lst.size(); i++) { fputws(lst.at(i).c_str(), stdout); } - fputwc(L'\a', stdout); + write(STDOUT_FILENO, "\a", 1); } proc_pop_interactive(); set_color(rgb_color_t::reset(), rgb_color_t::reset()); if (reset_cursor_position && !lst.empty()) { // Put the cursor back at the beginning of the line (issue #2453). - fputwc(L'\r', stdout); + write(STDOUT_FILENO, "\r", 1); } } @@ -1284,7 +1284,7 @@ static void reader_flash() { } reader_repaint(); - fputwc(L'\a', stdout); + write(STDOUT_FILENO, "\a", 1); pollint.tv_sec = 0; pollint.tv_nsec = 100 * 1000000; @@ -3216,7 +3216,7 @@ const wchar_t *reader_readline(int nchars) { reader_repaint_if_needed(); } - fputwc(L'\n', stdout); + write(STDOUT_FILENO, "\n", 1); // Ensure we have no pager contents when we exit. if (!data->pager.empty()) {