From 0b40f7c1c35770622511eda71ec5353784ea1dc6 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Fri, 10 Feb 2012 12:00:28 +0100 Subject: [PATCH 1/1] scan: Don't fflush manually. Let stdio care for this. Common stdio implementations flush stdout-on-TTY automatically on newline. --- uip/scan.c | 5 ----- 1 file changed, 5 deletions(-) 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); } } -- 1.7.10.4