From 993dd5651a6c853bfe3870f6a69c7b329fa4e8ce Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 16 Jan 2018 11:46:03 +0100 Subject: curl: progress bar refresh, get width using ioctl() Get screen width from the environment variable COLUMNS first, if set. If not, use ioctl(). If nether works, assume 79. Closes #2242 The "refresh" is for the -# output when no total transfer size is known. It will now only use a single updated line even for this case: The "-=O=-" ship moves when data is transferred. The four flying "hashes" move (on a sine wave) on each refresh, independent of data. --- tests/runtests.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/runtests.pl b/tests/runtests.pl index dcd9f8419..d68c20f19 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -6,7 +6,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -340,6 +340,7 @@ $ENV{'CURL_MEMDEBUG'} = $memdump; $ENV{'CURL_ENTROPY'}="12345678"; $ENV{'CURL_FORCETIME'}=1; # for debug NTLM magic $ENV{'HOME'}=$pwd; +$ENV{'COLUMNS'}=79; # screen width! sub catch_zap { my $signame = shift; -- cgit v1.2.3