diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-01-16 11:46:03 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-01-22 08:29:37 +0100 |
commit | 993dd5651a6c853bfe3870f6a69c7b329fa4e8ce (patch) | |
tree | 0c83a899b02465fdb10025c75ce48e0ae2c5da68 /src/tool_cb_prg.h | |
parent | 9d82cde7b2bd839600041b9ca1f2f743cce23df2 (diff) | |
download | curl-993dd5651a6c853bfe3870f6a69c7b329fa4e8ce.tar.gz |
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.
Diffstat (limited to 'src/tool_cb_prg.h')
-rw-r--r-- | src/tool_cb_prg.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tool_cb_prg.h b/src/tool_cb_prg.h index d62b4a073..f8d6deaba 100644 --- a/src/tool_cb_prg.h +++ b/src/tool_cb_prg.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -33,6 +33,9 @@ struct ProgressData { int width; FILE *out; /* where to write everything to */ curl_off_t initial_size; + unsigned int tick; + int bar; + int barmove; }; void progressbarinit(struct ProgressData *bar, |