mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-23 08:31:16 -03:00
convert narrow stderr output to wide forms
On some platforms, notably GNU libc, you cannot mix narrow and wide stdio functions on a stream like stdout or stderr. Doing so will drop the output of one or the other. This change makes all output to the stderr stream consistently use the wide forms. This change also converts some fprintf(stderr,...) calls to debug() calls where appropriate. Fixes #3692
This commit is contained in:
@@ -2424,7 +2424,7 @@ const wchar_t *reader_readline(int nchars) {
|
||||
is_interactive_read = 1;
|
||||
c = input_readch();
|
||||
is_interactive_read = was_interactive_read;
|
||||
// fprintf(stderr, "C: %lx\n", (long)c);
|
||||
// fwprintf(stderr, L"C: %lx\n", (long)c);
|
||||
|
||||
if (((!fish_reserved_codepoint(c))) && (c > 31) && (c != 127) && can_read(0)) {
|
||||
wchar_t arr[READAHEAD_MAX + 1];
|
||||
@@ -2486,7 +2486,7 @@ const wchar_t *reader_readline(int nchars) {
|
||||
if (command_ends_paging(c, focused_on_search_field)) {
|
||||
clear_pager();
|
||||
}
|
||||
// fprintf(stderr, "\n\nchar: %ls\n\n", describe_char(c).c_str());
|
||||
// fwprintf(stderr, L"\n\nchar: %ls\n\n", describe_char(c).c_str());
|
||||
|
||||
switch (c) {
|
||||
// Go to beginning of line.
|
||||
@@ -2607,7 +2607,7 @@ const wchar_t *reader_readline(int nchars) {
|
||||
// up to the end of the token we're completing.
|
||||
const wcstring buffcpy = wcstring(cmdsub_begin, token_end);
|
||||
|
||||
// fprintf(stderr, "Complete (%ls)\n", buffcpy.c_str());
|
||||
// fwprintf(stderr, L"Complete (%ls)\n", buffcpy.c_str());
|
||||
complete_flags_t complete_flags = COMPLETION_REQUEST_DEFAULT |
|
||||
COMPLETION_REQUEST_DESCRIPTIONS |
|
||||
COMPLETION_REQUEST_FUZZY_MATCH;
|
||||
|
||||
Reference in New Issue
Block a user