* 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
This commit is contained in:
Aaron Griffin 2007-02-22 04:32:09 +00:00
parent 4bb58ef117
commit 3b95de655b
1 changed files with 2 additions and 2 deletions

View File

@ -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,