]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-progress-nontty.patch
- added %ifarch for PPC port of PLD :)
[packages/rpm.git] / rpm-progress-nontty.patch
1 diff -Nur rpm-4.0.2.mis/lib/rpminstall.c rpm-4.0.2/lib/rpminstall.c
2 --- rpm-4.0.2.mis/lib/rpminstall.c      Wed Oct 10 18:38:55 2001
3 +++ rpm-4.0.2/lib/rpminstall.c  Wed Oct 10 18:39:43 2001
4 @@ -61,7 +61,8 @@
5  #ifdef FANCY_HASH
6             int i;
7             progressCurrent++;
8 -           for (i = 1; i < hashesPrinted; i++) putchar ('#');
9 +           if (isatty(STDOUT_FILENO))
10 +               for (i = 1; i < hashesPrinted; i++) putchar ('#');
11             printf (" [%3d%%]\n", (int)(100 * (progressTotal ?
12                 (((float) progressCurrent) / progressTotal) : 1)));
13  #else
14 @@ -113,7 +114,8 @@
15  #ifdef FANCY_HASH
16                 if (isatty (STDOUT_FILENO))
17                     fprintf(stdout, "%4d:%-23.23s", progressCurrent + 1, s);
18 -              else
19 +               else
20 +                   fprintf(stdout, "%-28s", s);
21  #else
22                     fprintf(stdout, "%-28s", s);
23  #endif
This page took 0.04593 seconds and 3 git commands to generate.