diff options
Diffstat (limited to 'libbb/xfuncs.c')
-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 0c99696..206edb4 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -270,6 +270,12 @@ int FAST_FUNC get_terminal_width_height(int fd, unsigned *width, unsigned *heigh *width = wh_helper(win.ws_col, 80, "COLUMNS", &err); return err; } +int FAST_FUNC get_terminal_width(int fd) +{ + unsigned width; + get_terminal_width_height(fd, &width, NULL); + return width; +} int FAST_FUNC tcsetattr_stdin_TCSANOW(const struct termios *tp) { |