diff options
author | Guillem Jover <guillem@debian.org> | 2011-11-22 06:50:43 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2011-11-23 08:50:44 +0100 |
commit | e919b52fa6702d6c32d11774723716f41054acc8 (patch) | |
tree | 580b634b119c92ab64e56c20104fd0ce0d44b8b7 /dpkg-deb/main.c | |
parent | b0d9fc4cefe54daf53f254889a50c85866e10ad8 (diff) | |
download | dpkg-e919b52fa6702d6c32d11774723716f41054acc8.tar.gz |
libdpkg: Switch compressor to take a parameters struct
Diffstat (limited to 'dpkg-deb/main.c')
-rw-r--r-- | dpkg-deb/main.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c index d487eb56f..6d52beaf8 100644 --- a/dpkg-deb/main.c +++ b/dpkg-deb/main.c @@ -134,8 +134,10 @@ static const char printforhelp[] = int debugflag=0, nocheckflag=0, oldformatflag=BUILDOLDPKGFORMAT; int opt_verbose = 0; -enum compressor_type compressor = compressor_type_gzip; -int compress_level = -1; +struct compress_params compress_params = { + .type = compressor_type_gzip, + .level = -1, +}; static void set_compress_level(const struct cmdinfo *cip, const char *value) @@ -150,14 +152,14 @@ set_compress_level(const struct cmdinfo *cip, const char *value) if (level < 0 || level > 9) badusage(_("invalid compression level for -%c: %ld'"), cip->oshort, level); - compress_level = level; + compress_params.level = level; } static void setcompresstype(const struct cmdinfo *cip, const char *value) { - compressor = compressor_find_by_name(value); - if (compressor == compressor_type_unknown) + compress_params.type = compressor_find_by_name(value); + if (compress_params.type == compressor_type_unknown) ohshit(_("unknown compression type `%s'!"), value); } |