diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-12-22 08:11:20 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-12-22 08:11:20 +0100 |
commit | d8d82215561305cb7af0a33d7810cbb9cadb2cea (patch) | |
tree | ee77b2e7867d524d6d23ee5e2a783ae8bf5bdb53 /src/pacman/trans.c | |
parent | 796490546e2d3868a387ff18b05f2fa382a9aa7e (diff) | |
download | pacman-d8d82215561305cb7af0a33d7810cbb9cadb2cea.tar.gz pacman-d8d82215561305cb7af0a33d7810cbb9cadb2cea.tar.xz |
Modified front end output routines to accept a "padding' setting, which pads any
statement with ' ' until the size of the terminal. The rationale is that, when
a log message is emitted during progress bar display, the terminal is artifacted.
This prevents that messiness.
Diffstat (limited to 'src/pacman/trans.c')
-rw-r--r-- | src/pacman/trans.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pacman/trans.c b/src/pacman/trans.c index 1b9295e1..ea6d8cd6 100644 --- a/src/pacman/trans.c +++ b/src/pacman/trans.c @@ -295,6 +295,12 @@ void cb_trans_progress(unsigned char event, char *pkgname, int percent, int howm return; } + if(percent == 0) { + set_output_padding(1); /* turn on output padding with ' ' */ + } else if(percent == 100) { + set_output_padding(0); /* shut it off again */ + } + if (!pkgname) return; if (percent > 100) |