diff options
author | Nathan Jones <nathanj@insightbb.com> | 2007-06-01 11:00:39 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-06-01 11:00:39 -0400 |
commit | 80237630af0b2241a8a756d7ed7d2be3f80cfec5 (patch) | |
tree | 739f3039f84de677b33f6b7b5f241edb2472ee3d /lib/libalpm | |
parent | cb9f046945b0365d7d29ee590a31a08bece1879c (diff) |
Change -z|--showsize flag to ShowSize pacman.conf option
Also cleaned up some duplicate printf lines related to the ShowSize option.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/alpm.c | 3 | ||||
-rw-r--r-- | lib/libalpm/alpm.h | 3 | ||||
-rw-r--r-- | lib/libalpm/handle.c | 6 | ||||
-rw-r--r-- | lib/libalpm/handle.h | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index d0f87462..33270149 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -958,6 +958,9 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const } else if(strcmp(origkey, "UseColor") == 0 || strcmp(key, "USECOLOR") == 0) { alpm_option_set_usecolor(1); _alpm_log(PM_LOG_DEBUG, _("config: usecolor")); + } else if(strcmp(origkey, "ShowSize") == 0 || strcmp(key, "SHOWSIZE") == 0) { + alpm_option_set_showsize(1); + _alpm_log(PM_LOG_DEBUG, _("config: showsize")); } else { RET_ERR(PM_ERR_CONF_BAD_SYNTAX, -1); } diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 4d551c8f..4c210562 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -147,6 +147,9 @@ void alpm_option_set_needles(alpm_list_t *needles); unsigned short alpm_option_get_usecolor(); void alpm_option_set_usecolor(unsigned short usecolor); +unsigned short alpm_option_get_showsize(); +void alpm_option_set_showsize(unsigned short showsize); + pmdb_t *alpm_option_get_localdb(); alpm_list_t *alpm_option_get_syncdbs(); diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 7eb8dc36..9aa7cce1 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -140,6 +140,7 @@ const char *alpm_option_get_xfercommand() { return handle->xfercommand; } unsigned short alpm_option_get_nopassiveftp() { return handle->nopassiveftp; } unsigned short SYMEXPORT alpm_option_get_chomp() { return handle->chomp; } unsigned short alpm_option_get_usecolor() { return handle->use_color; } +unsigned short SYMEXPORT alpm_option_get_showsize() { return handle->showsize; } pmdb_t SYMEXPORT *alpm_option_get_localdb() { return handle->db_local; } alpm_list_t SYMEXPORT *alpm_option_get_syncdbs() @@ -308,4 +309,9 @@ void alpm_option_set_usecolor(unsigned short usecolor) handle->use_color = usecolor; } +void alpm_option_set_showsize(unsigned short showsize) +{ + handle->showsize = showsize; +} + /* vim: set ts=2 sw=2 noet: */ diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h index b3311db6..884dfc57 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -66,6 +66,7 @@ typedef struct _pmhandle_t { unsigned short nopassiveftp; /* Don't use PASV ftp connections */ unsigned short chomp; /* I Love Candy! */ unsigned short use_color; /* enable colorful output */ + unsigned short showsize; /* Show individual package sizes */ } pmhandle_t; extern pmhandle_t *handle; |