From 058a153b6970660f3c284ac259986ae87507df9a Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 16 Apr 2018 10:24:48 +0200 Subject: less: fix fallout from "use common routine to set raw termios" Testcase: (sleep 10; ls) | busybox less [...] ~ LICENSE ~ Makefile ~ Makefile.custom ~ Makefile.flags [...] less did not want this part: + /* dont convert NL to CR+NL on output */ + newterm->c_oflag &= ~(ONLCR); function old new delta get_termios_and_make_raw 108 115 +7 Signed-off-by: Denys Vlasenko --- include/libbb.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index c7bf33ef8..646c58bf2 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1597,9 +1597,11 @@ int get_terminal_width_height(int fd, unsigned *width, unsigned *height) FAST_FU int get_terminal_width(int fd) FAST_FUNC; int tcsetattr_stdin_TCSANOW(const struct termios *tp) FAST_FUNC; -#define TERMIOS_CLEAR_ISIG (1 << 0) -#define TERMIOS_RAW_CRNL (1 << 1) -#define TERMIOS_RAW_INPUT (1 << 2) +#define TERMIOS_CLEAR_ISIG (1 << 0) +#define TERMIOS_RAW_CRNL_INPUT (1 << 1) +#define TERMIOS_RAW_CRNL_OUTPUT (1 << 2) +#define TERMIOS_RAW_CRNL (TERMIOS_RAW_CRNL_INPUT|TERMIOS_RAW_CRNL_OUTPUT) +#define TERMIOS_RAW_INPUT (1 << 3) int get_termios_and_make_raw(int fd, struct termios *newterm, struct termios *oldterm, int flags) FAST_FUNC; int set_termios_to_raw(int fd, struct termios *oldterm, int flags) FAST_FUNC; -- cgit v1.2.3