mirror of
https://github.com/sheumann/hush.git
synced 2024-12-31 11:31:19 +00:00
97310d0253
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 |
||
---|---|---|
.. | ||
Config.in | ||
dmesg.c | ||
fbset.c | ||
fdflush.c | ||
fdformat.c | ||
fdisk.c | ||
freeramdisk.c | ||
fsck_minix.c | ||
getopt.c | ||
hexdump.c | ||
hwclock.c | ||
losetup.c | ||
Makefile | ||
Makefile.in | ||
mkfs_minix.c | ||
mkswap.c | ||
more.c | ||
mount.c | ||
nfsmount.c | ||
nfsmount.h | ||
pivot_root.c | ||
rdate.c | ||
swaponoff.c | ||
umount.c |