summarylogtreecommitdiffstats
path: root/progress.patch
blob: b320955edab30f4f4da23874130d2b392b6d8e62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 5c3557c7..ced686be 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -158,7 +158,7 @@ static void fill_progress(const int percent, const int proglen)
 	int i;
 
 	if(hashlen > 0) {
-		fputs(" [", stdout);
+		fputs(" ", stdout);
 		for(i = hashlen; i > 0; --i) {
 			/* if special progress bar enabled */
 			if(config->chomp) {
@@ -177,12 +177,16 @@ static void fill_progress(const int percent, const int proglen)
 				}
 			} /* else regular progress bar */
 			else if(i > hashlen - hash) {
-				putchar('#');
+				fputs("", stdout);
 			} else {
-				putchar('-');
+				fputs("", stdout);
 			}
 		}
-		putchar(']');
+		if (hashlen == hash) {
+			fputs("", stdout);
+		} else {
+			fputs("", stdout);
+		}
 	}
 	/* print display percent after progress bar */
 	/* 5 = 1 space + 3 digits + 1 % */