From: markus schnalke Date: Fri, 10 Feb 2012 11:00:28 +0000 (+0100) Subject: scan: Don't fflush manually. Let stdio care for this. X-Git-Tag: mmh-thesis-end~321 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=0b40f7c1c35770622511eda71ec5353784ea1dc6;p=mmh scan: Don't fflush manually. Let stdio care for this. Common stdio implementations flush stdout-on-TTY automatically on newline. --- diff --git a/uip/scan.c b/uip/scan.c index 1b58eb5..d5cc50f 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -31,7 +31,6 @@ static struct swit switches[] = { int main(int argc, char **argv) { - int ontty; int width = 0; int i, state, msgnum; int seqnum[NUMATTRS], unseen, num_unseen_seq = 0; @@ -188,8 +187,6 @@ main(int argc, char **argv) } } - ontty = isatty(fileno(stdout)); - for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) { if (is_selected(mp, msgnum)) { if ((in = fopen(cp = m_name(msgnum), "r")) == NULL) { @@ -225,8 +222,6 @@ main(int argc, char **argv) break; } fclose(in); - if (ontty) - fflush(stdout); } }