aboutsummaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 0c9969640..206edb4a0 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)
{