1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 16:28:50 -05:00

* 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

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 clean up so digits and pkglen aren't passed twice */
/* TODO we may need some sort of wchar_t wprintf output here in order /* 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 */ * to get the lengths right, prinf works on bytes and not chars */
printf("(%*d/%*d) %s %-*.*s", digits, remain, digits, howmany, printf("(%2$*1$d/%3$*1$d) %4$s %6$-*5$.*5$s", digits, remain, howmany,
opr, pkglen, pkglen, pkgname); opr, pkglen, pkgname);
break; break;
case PM_TRANS_PROGRESS_CONFLICTS_START: case PM_TRANS_PROGRESS_CONFLICTS_START:
printf("(%*d/%*d) %-*s", digits, remain, digits, howmany, printf("(%*d/%*d) %-*s", digits, remain, digits, howmany,