diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-09-15 08:33:45 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-09-15 08:33:45 +0000 |
commit | 7531d242c93e4ff7d3b2ebeeaf1f0de4dcb6b71c (patch) | |
tree | 7590704be6cf03c87242043f5909e12eb4150356 /networking/wget.c | |
parent | fc2b3bc3efa6de860a1d3a961c700650e1a590eb (diff) | |
download | busybox-w32-7531d242c93e4ff7d3b2ebeeaf1f0de4dcb6b71c.tar.gz busybox-w32-7531d242c93e4ff7d3b2ebeeaf1f0de4dcb6b71c.tar.bz2 busybox-w32-7531d242c93e4ff7d3b2ebeeaf1f0de4dcb6b71c.zip |
Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
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
Diffstat (limited to 'networking/wget.c')
-rw-r--r-- | networking/wget.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/networking/wget.c b/networking/wget.c index b1cc35e34..597d61097 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -679,12 +679,9 @@ static int ftpcmd(char *s1, char *s2, FILE *fp, char *buf) | |||
679 | static int | 679 | static int |
680 | getttywidth(void) | 680 | getttywidth(void) |
681 | { | 681 | { |
682 | struct winsize winsize; | 682 | int width=0; |
683 | 683 | get_terminal_width_height(0, &width, NULL); | |
684 | if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1) | 684 | return (width); |
685 | return (winsize.ws_col ? winsize.ws_col : 80); | ||
686 | else | ||
687 | return (80); | ||
688 | } | 685 | } |
689 | 686 | ||
690 | static void | 687 | static void |
@@ -841,7 +838,7 @@ progressmeter(int flag) | |||
841 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 838 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
842 | * SUCH DAMAGE. | 839 | * SUCH DAMAGE. |
843 | * | 840 | * |
844 | * $Id: wget.c,v 1.59 2003/09/11 08:25:11 andersen Exp $ | 841 | * $Id: wget.c,v 1.60 2003/09/15 08:33:37 andersen Exp $ |
845 | */ | 842 | */ |
846 | 843 | ||
847 | 844 | ||