Flushed stdout after every group is printed in an iteration. This allows us to redirect ascii based output to a file.

This commit is contained in:
Adam Drescher 2016-10-17 18:54:46 -05:00
parent 29fb4317d7
commit a5301347f6
2 changed files with 2 additions and 0 deletions

View File

@ -212,6 +212,7 @@ static void ascii_draw_group(struct element_group *g, void *arg)
static void ascii_draw(void) static void ascii_draw(void)
{ {
group_foreach(ascii_draw_group, NULL); group_foreach(ascii_draw_group, NULL);
fflush(stdout);
if (c_quit_after > 0) if (c_quit_after > 0)
if (--c_quit_after == 0) if (--c_quit_after == 0)

View File

@ -166,6 +166,7 @@ static void draw_element(struct element_group *g, struct element *e, void *arg)
static void format_draw(void) static void format_draw(void)
{ {
group_foreach_recursive(draw_element, NULL); group_foreach_recursive(draw_element, NULL);
fflush(stdout);
if (c_quit_after > 0) if (c_quit_after > 0)
if (--c_quit_after == 0) if (--c_quit_after == 0)