diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-02-22 05:32:09 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-02-22 05:32:09 +0100 |
commit | 3b95de655b277efe895ac5de01b86c5ab313c030 (patch) | |
tree | 5461b6c21c94ebb9205d8d9e0774027724a35d0b | |
parent | 4bb58ef1174b19bfcc959e5c6b64a80a4f901edc (diff) | |
download | pacman-3b95de655b277efe895ac5de01b86c5ab313c030.tar.gz pacman-3b95de655b277efe895ac5de01b86c5ab313c030.tar.xz |
* Using positional params (POSIX compliant, not C standard) for printfs that
require a lot of duplicates - this may or may not be a good idea with regards
to portability, but we'll see
-rw-r--r-- | src/pacman/trans.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/trans.c b/src/pacman/trans.c index ebc11a8d..f88ca710 100644 --- a/src/pacman/trans.c +++ b/src/pacman/trans.c @@ -348,8 +348,8 @@ void cb_trans_progress(pmtransprog_t event, char *pkgname, const int percent, /* TODO clean up so digits and pkglen aren't passed twice */ /* TODO we may need some sort of wchar_t wprintf output here in order * to get the lengths right, prinf works on bytes and not chars */ - printf("(%*d/%*d) %s %-*.*s", digits, remain, digits, howmany, - opr, pkglen, pkglen, pkgname); + printf("(%2$*1$d/%3$*1$d) %4$s %6$-*5$.*5$s", digits, remain, howmany, + opr, pkglen, pkgname); break; case PM_TRANS_PROGRESS_CONFLICTS_START: printf("(%*d/%*d) %-*s", digits, remain, digits, howmany, |