From b206af78e0e6d2ff3324f3b2dc333d1b4e54f5b9 Mon Sep 17 00:00:00 2001 From: Nathan Jones Date: Fri, 9 Nov 2007 19:54:18 -0500 Subject: Add TotalDownload option. This will be used in the next commit. Signed-off-by: Nathan Jones Signed-off-by: Dan McGee --- src/pacman/conf.h | 3 +++ src/pacman/pacman.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/pacman/conf.h b/src/pacman/conf.h index 7249f068..b7844d7d 100644 --- a/src/pacman/conf.h +++ b/src/pacman/conf.h @@ -65,6 +65,9 @@ typedef struct __config_t { unsigned short chomp; /* I Love Candy! */ unsigned short usecolor; /* enable colorful output */ unsigned short showsize; /* show individual package sizes */ + unsigned short totaldownload; /* When downloading, display the amount + downloaded, rate, ETA, and percent + downloaded of the total download list */ } config_t; /* Operations */ diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 2f916e2d..ede8c0a0 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -574,6 +574,9 @@ static int _parseconfig(const char *file, const char *givensection, } else if(strcmp(key, "UseDelta") == 0 || strcmp(upperkey, "USEDELTA") == 0) { alpm_option_set_usedelta(1); pm_printf(PM_LOG_DEBUG, "config: usedelta\n"); + } else if(strcmp(key, "TotalDownload") == 0 || strcmp(upperkey, "TOTALDOWNLOAD") == 0) { + config->totaldownload = 1; + pm_printf(PM_LOG_DEBUG, "config: totaldownload\n"); } else { pm_printf(PM_LOG_ERROR, _("config file %s, line %d: directive '%s' not recognized.\n"), file, linenum, key); -- cgit v1.2.3-70-g09d2