c++filt: flush output after newline

Some tools spawn c++filt and pass it a single line at a time for
demangling. This is akin to r276689 for addr2line.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2016-11-09 15:04:29 +00:00
parent 2b064d4653
commit a402c1e54f

View File

@ -188,6 +188,8 @@ main(int argc, char **argv)
if (c == EOF)
break;
putchar(c);
if (c == '\n')
fflush(stdout);
} else {
if ((size_t) p >= sizeof(buf) - 1)
warnx("buffer overflowed");