From 3b95de655b277efe895ac5de01b86c5ab313c030 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 22 Feb 2007 04:32:09 +0000 Subject: * 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 --- src/pacman/trans.c | 4 ++-- 1 file 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, -- cgit v1.2.3-70-g09d2