multiprogress.c: Set the terminal stream to be fully buffered.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 01:32:37 +0000 (01:32 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 18:51:48 +0000 (18:51 +0000)
The `free_render_state' function correctly forces output when we're done.

multiprogress.c

index 450f7f1..0088932 100644 (file)
@@ -136,6 +136,7 @@ int progress_init(struct progress_state *progress)
     { fclose(tty->fp); tty->fp = 0; return (-1); }
   if (!tty->cap.af || !tty->cap.ab || !tty->cap.op) tty->cap.op = 0;
   if (!tty->cap.me) tty->cap.mr = tty->cap.md = 0;
+  setvbuf(tty->fp, 0, _IOFBF, BUFSIZ);
   return (0);
 }