On 31 May 2013 15:57:25 Manfred Schwarb <manfre...@gmx.ch> wrote:
Am 31.05.2013 14:28, schrieb Janus Weil:
>> Wouldn't it work to use the TIOCGWINSZ ioctl only if isatty() reports
>> that we're outputting to a terminal?
>
> Good point. Updated patch attached, which imposes no limit if we're
> not outputting to a terminal (as suggested by Mikael).
>
> Ok for trunk, or am I missing anything else? (Testing welcome ...)
>

needs "#include <unistd.h>" for isatty(), perhaps.
Otherwise looks sane at first glance.

Perhaps see get_terminal_width_height() for inspiration (works for me)..

http://git.busybox.net/busybox/tree/libbb/xfuncs.c#n254

Cheers,


Sent with AquaMail for Android
http://www.aqua-mail.com


Reply via email to