diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2013-09-07 22:30:06 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2013-09-07 22:30:06 +0200 |
commit | 08e53f404dac1773a2f78c89439d12f7214ce9cb (patch) | |
tree | 55b7dc27e00a289ad51a902a6567dd7a464b1bfd /src/printf-utils.c | |
parent | f3870fd7889f550a29c6cc9eb2def0ac22e4db19 (diff) | |
download | 0xFFFF-08e53f404dac1773a2f78c89439d12f7214ce9cb.tar.bz2 |
printf-utils: Remove dead HAVE_SQUEUE code
Diffstat (limited to 'src/printf-utils.c')
-rw-r--r-- | src/printf-utils.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/src/printf-utils.c b/src/printf-utils.c index 2056f85..7e6bfac 100644 --- a/src/printf-utils.c +++ b/src/printf-utils.c @@ -38,28 +38,18 @@ void printf_progressbar(unsigned long long part, unsigned long long total) { pc = (int)(part*100/total); (pc<0)?pc=0:(pc>100)?pc=100:0; -#if HAVE_SQUEUE - if (qmode) { - char msg[128]; - sprintf(msg, "%d%%", pc); - squeue_push2(p, "bar", msg, 0); - } else { -#endif - PRINTF_BACK(); - PRINTF_ADD("\x1b[K %3d%% [", pc); - if (columns) - cols = atoi(columns); - if (cols > 115) - 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 + PRINTF_BACK(); + PRINTF_ADD("\x1b[K %3d%% [", pc); + if (columns) + cols = atoi(columns); + if (cols > 115) + 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); } |