Flush output buffer at each line

This commit is contained in:
Jolan 2012-02-23 10:21:09 +01:00 committed by Daniel Beer
parent 0581e74339
commit a7a71b993f
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ static int write_text(struct outbuf *out, const char *buf, FILE *fout)
if (*buf == '\n') { if (*buf == '\n') {
fputc('\n', fout); fputc('\n', fout);
fflush(fout);
out->buf[out->len] = 0; out->buf[out->len] = 0;
if (capture_func) if (capture_func)
capture_func(capture_data, out->buf); capture_func(capture_data, out->buf);