mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-03 02:41:53 -05:00
Move download callback static vars into function
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
db70c9da15
commit
f7653e582b
@ -37,11 +37,8 @@
|
|||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
|
||||||
/* download progress bar */
|
/* download progress bar */
|
||||||
static double rate_last;
|
|
||||||
static off_t xfered_last;
|
|
||||||
static off_t list_xfered = 0.0;
|
static off_t list_xfered = 0.0;
|
||||||
static off_t list_total = 0.0;
|
static off_t list_total = 0.0;
|
||||||
static struct timeval initial_time;
|
|
||||||
|
|
||||||
/* delayed output during progress bar */
|
/* delayed output during progress bar */
|
||||||
static int on_progress = 0;
|
static int on_progress = 0;
|
||||||
@ -501,6 +498,9 @@ void cb_dl_total(off_t total)
|
|||||||
/* callback to handle display of download progress */
|
/* callback to handle display of download progress */
|
||||||
void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
|
void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
|
||||||
{
|
{
|
||||||
|
static double rate_last;
|
||||||
|
static off_t xfered_last;
|
||||||
|
static struct timeval initial_time;
|
||||||
int infolen;
|
int infolen;
|
||||||
int filenamelen;
|
int filenamelen;
|
||||||
char *fname, *p;
|
char *fname, *p;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user