aboutsummaryrefslogtreecommitdiff
path: root/libbb/get_terminal_width_height.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* - remove emacs layout block as suggested by Robert P.J. Dayaldot2006-05-191-10/+0
| | | | | | | - use shorter boilerplate while at it git-svn-id: svn://busybox.net/trunk/busybox@15141 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - move buffer allocation schemes to libbb.haldot2006-04-031-14/+2
| | | | | | | - include the correct headers: applets need busybox.h while lib* need libbb.h git-svn-id: svn://busybox.net/trunk/busybox@14739 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Actually returning ret might be good.landley2005-09-051-0/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11325 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Bernhard Fischer suggested that get_terminal_width_height() should returnlandley2005-09-011-22/+7
| | | | | | | | | the result of the ioctl so callers can tell if we have a tty. (0 means we have a tty, nonzero means the ioctl couldn't find size info and we fake 80x24. Really we should fake 80x25, but oh well...) git-svn-id: svn://busybox.net/trunk/busybox@11306 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Brian Pomerantz writes:andersen2004-03-231-1/+1
| | | | | | | | | | | | | | | | | | | 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 git-svn-id: svn://busybox.net/trunk/busybox@8656 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove trailing whitespace. Update copyright to include 2004.andersen2004-03-151-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8630 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)andersen2003-09-151-0/+66
to ensure proper fallback behavior on, i.e. serial consoles. -Erik git-svn-id: svn://busybox.net/trunk/busybox@7526 69ca8d6d-28ef-0310-b511-8ec308f3f277