FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-10-2011, 02:31 PM
Dan McGee
 
Default Move download callback static vars into function

Signed-off-by: Dan McGee <dan@archlinux.org>
---
src/pacman/callback.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 0d9b57b..793facd 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -37,11 +37,8 @@
#include "conf.h"

/* download progress bar */
-static double rate_last;
-static off_t xfered_last;
static off_t list_xfered = 0.0;
static off_t list_total = 0.0;
-static struct timeval initial_time;

/* delayed output during progress bar */
static int on_progress = 0;
@@ -510,6 +507,9 @@ void cb_dl_total(off_t total)
/* callback to handle display of download progress */
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 filenamelen;
char *fname, *p;
--
1.7.6.1
 

Thread Tools




All times are GMT. The time now is 05:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org