summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-08-07 19:32:50 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-08-07 19:32:50 +0000
commitab3d861ede415b77ad637c85fd164413388cd21a (patch)
treed2c4c22f1f4eec471b0622a1cc8f07e068e17d9a
parent82ef16fada3bbe9a34e417e486b970049f79ebf1 (diff)
Flush printf buffer before directly writing to STDIN_FILENO. Prevents
the printf output from printing after the rcs_buf_write_fd output. ``ok!'' joris@
-rw-r--r--usr.bin/rcs/ident.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/rcs/ident.c b/usr.bin/rcs/ident.c
index 972d4495407..48f008cf4a0 100644
--- a/usr.bin/rcs/ident.c
+++ b/usr.bin/rcs/ident.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ident.c,v 1.21 2006/08/01 05:14:17 ray Exp $ */
+/* $OpenBSD: ident.c,v 1.22 2006/08/07 19:32:49 ray Exp $ */
/*
* Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -143,6 +143,7 @@ ident_line(FILE *fp)
/* Append newline for printing. */
rcs_buf_putc(bp, '\n');
printf(" %c", KEYDELIM);
+ fflush(stdout);
rcs_buf_write_fd(bp, STDOUT_FILENO);
found++;