diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/xfuncs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index d93d8aaf5..c81ce4546 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -303,6 +303,12 @@ int FAST_FUNC get_terminal_width(int fd) | |||
303 | return width; | 303 | return width; |
304 | } | 304 | } |
305 | 305 | ||
306 | int FAST_FUNC is_dumb_term(void) | ||
307 | { | ||
308 | char *term = getenv("TERM"); | ||
309 | return term && strcmp(term, "dumb") == 0; | ||
310 | } | ||
311 | |||
306 | int FAST_FUNC tcsetattr_stdin_TCSANOW(const struct termios *tp) | 312 | int FAST_FUNC tcsetattr_stdin_TCSANOW(const struct termios *tp) |
307 | { | 313 | { |
308 | return tcsetattr(STDIN_FILENO, TCSANOW, tp); | 314 | return tcsetattr(STDIN_FILENO, TCSANOW, tp); |