printf-utils: Remove dead HAVE_SQUEUE code

This commit is contained in:
Pali Rohár committed 2013-09-07 22:30:06 +02:00
1 parent f3870fd788
commit 08e53f404d
1 file changed
+12 -22
+12 -22
View File
@@ -38,28 +38,18 @@ void printf_progressbar(unsigned long long part, unsigned long long total) {
pc = (int)(part*100/total); pc = (int)(part*100/total);
(pc<0)?pc=0:(pc>100)?pc=100:0; (pc<0)?pc=0:(pc>100)?pc=100:0;
#if HAVE_SQUEUE PRINTF_BACK();
if (qmode) { PRINTF_ADD("\x1b[K %3d%% [", pc);
char msg[128]; if (columns)
sprintf(msg, "%d%%", pc); cols = atoi(columns);
squeue_push2(p, "bar", msg, 0); if (cols > 115)
} else { cols = 115;
#endif cols-=15;
PRINTF_BACK(); for(tmp=cols*pc/100;tmp;tmp--) PRINTF_ADD("#");
PRINTF_ADD("\x1b[K %3d%% [", pc); for(tmp=cols-(cols*pc/100);tmp;tmp--) PRINTF_ADD("-");
if (columns) PRINTF_ADD("]");
cols = atoi(columns); if (part == total) PRINTF_END();
if (cols > 115) fflush(stdout);
cols = 115;
cols-=15;
for(tmp=cols*pc/100;tmp;tmp--) PRINTF_ADD("#");
for(tmp=cols-(cols*pc/100);tmp;tmp--) PRINTF_ADD("-");
PRINTF_ADD("]");
if (part == total) PRINTF_END();
fflush(stdout);
#if HAVE_SQUEUE
}
#endif
} }