watch: fix to backporting error, and other wide character issues
The commit 8967f0fca3ab53479071a01f1522a19517ecb9cd has an typo like error, which I must have done. The Bug-Debian 240989 did not have 12 but 128. Rest of the fixes are from Bug-Debian 675069 e.g. missing include added, and usage of iswprint(). Bug-Debian: http://bugs.debian.org/240989 Bug-Debian: http://bugs.debian.org/675069 Reported-by: "Dr. David Alan Gilbert" <dave@treblig.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
48e4be926d
commit
6b0bb82b99
5
watch.c
5
watch.c
@ -53,6 +53,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#ifdef WITH_WATCH8BIT
|
#ifdef WITH_WATCH8BIT
|
||||||
# include <wchar.h>
|
# include <wchar.h>
|
||||||
|
# include <wctype.h>
|
||||||
# include <ncursesw/ncurses.h>
|
# include <ncursesw/ncurses.h>
|
||||||
#else
|
#else
|
||||||
# include <ncurses.h>
|
# include <ncurses.h>
|
||||||
@ -438,8 +439,8 @@ int run_command(char *restrict command, char **restrict command_argv)
|
|||||||
c = carry;
|
c = carry;
|
||||||
carry = WEOF;
|
carry = WEOF;
|
||||||
}
|
}
|
||||||
} while (c != WEOF && !isprint(c)
|
} while (c != WEOF && !iswprint(c)
|
||||||
&& c < 12
|
&& c < 128
|
||||||
&& wcwidth(c) == 0
|
&& wcwidth(c) == 0
|
||||||
&& c != L'\n'
|
&& c != L'\n'
|
||||||
&& c != L'\t'
|
&& c != L'\t'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user