Eric Andersen 97310d0253 Brian Pomerantz writes:
I've noticed a bug in the "autowidth" feature more, and is probably in
others.  The call to the function get_terminal_width_height() passes
in a file descriptor but that file descriptor is never used, instead
the ioctl() is called with 0.  In more_main() the call to
get_terminal_width_height() passes 0 as the file descriptor instead of
fileno(cin).  This isn't a problem when you more a file (e.g. "more
/etc/passwd") but when you pipe a file to it (e.g. "cat /etc/passwd |
more") the size of the terminal cannot be determined because file
descriptor 0 is not a terminal.  The fix is simple, I've attached a
patch for more.c and get_terminal_width_height.c.


BAPper
2004-03-23 23:15:36 +00:00
..
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2003-05-26 14:07:50 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2004-02-05 13:49:29 +00:00
2003-03-19 09:13:01 +00:00
2004-03-06 22:11:45 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2002-12-14 01:58:59 +00:00
2003-05-26 14:07:50 +00:00
2004-03-06 22:11:45 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00
2003-05-26 14:07:50 +00:00
2003-03-19 09:13:01 +00:00
2003-03-19 09:13:01 +00:00

Please see the LICENSE file for copyright information (GPLv2)

libbb is BusyBox's utility library.  All of this stuff used to be stuffed into
a single file named utility.c.  When I split utility.c to create libbb, some of
the very oldest stuff ended up without their original copyright and licensing
information (which is now lost in the mists of time).  If you see something
that you wrote that is mis-attributed, do let me know so we can fix that up.

	Erik Andersen
	<andersen@codepoet.org>