From f893da875a24138fac30f070c7101b5330f0fef0 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 9 Aug 2007 08:27:24 +0000 Subject: ls,ps,watch: measure terminal width on fd 0, not 1 --- include/libbb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 546bbaf..a14d6be 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -803,7 +803,8 @@ extern int crypt_make_salt(char *p, int cnt, int rnd); extern int update_passwd(const char *filename, const char *username, const char *new_pw); -int get_terminal_width_height(const int fd, int *width, int *height); +/* NB: typically you want to pass fd 0, not 1. Think 'applet | grep something' */ +int get_terminal_width_height(int fd, int *width, int *height); int ioctl_or_perror(int fd, int request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))); void ioctl_or_perror_and_die(int fd, int request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))); -- cgit v1.1