* mu-cmd-index.c: fix print_stats for 'line33'
This commit is contained in:
@ -148,14 +148,15 @@ backspace (unsigned u)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_stats (MuIndexStats* stats, gboolean clear, gboolean color)
|
print_stats (MuIndexStats* stats, gboolean clear, gboolean color)
|
||||||
{
|
{
|
||||||
const char *kars="-\\|/";
|
const char *kars="-\\|/";
|
||||||
char output[120];
|
char output[120];
|
||||||
|
|
||||||
static int i = 0;
|
static unsigned i = 0, len = 0;
|
||||||
static unsigned len = 0;
|
|
||||||
|
|
||||||
if (clear)
|
if (clear)
|
||||||
backspace (len);
|
backspace (len);
|
||||||
@ -164,12 +165,10 @@ print_stats (MuIndexStats* stats, gboolean clear, gboolean color)
|
|||||||
len = (unsigned)snprintf
|
len = (unsigned)snprintf
|
||||||
(output, sizeof(output),
|
(output, sizeof(output),
|
||||||
MU_COLOR_BLUE "%c " MU_COLOR_DEFAULT
|
MU_COLOR_BLUE "%c " MU_COLOR_DEFAULT
|
||||||
"processing mail; processed: "
|
"processing mail; "
|
||||||
MU_COLOR_GREEN "%u; " MU_COLOR_DEFAULT
|
"processed: " MU_COLOR_GREEN "%u; " MU_COLOR_DEFAULT
|
||||||
"updated/new: "
|
"updated/new: " MU_COLOR_GREEN "%u" MU_COLOR_DEFAULT
|
||||||
MU_COLOR_GREEN "%u" MU_COLOR_DEFAULT
|
", cleaned-up: " MU_COLOR_GREEN "%u" MU_COLOR_DEFAULT,
|
||||||
", cleaned-up: "
|
|
||||||
MU_COLOR_GREEN "%u" MU_COLOR_DEFAULT,
|
|
||||||
(unsigned)kars[++i % 4],
|
(unsigned)kars[++i % 4],
|
||||||
(unsigned)stats->_processed,
|
(unsigned)stats->_processed,
|
||||||
(unsigned)stats->_updated,
|
(unsigned)stats->_updated,
|
||||||
@ -177,8 +176,7 @@ print_stats (MuIndexStats* stats, gboolean clear, gboolean color)
|
|||||||
else
|
else
|
||||||
len = (unsigned)snprintf
|
len = (unsigned)snprintf
|
||||||
(output, sizeof(output),
|
(output, sizeof(output),
|
||||||
"%c "
|
"%c processing mail; processed: %u; "
|
||||||
"processing mail; processed: %u; "
|
|
||||||
"updated/new: %u, cleaned-up: %u",
|
"updated/new: %u, cleaned-up: %u",
|
||||||
(unsigned)kars[++i % 4],
|
(unsigned)kars[++i % 4],
|
||||||
(unsigned)stats->_processed,
|
(unsigned)stats->_processed,
|
||||||
|
|||||||
Reference in New Issue
Block a user