summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/buffer.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-12-02 03:13:37 +0000
committerpeter <peter@FreeBSD.org>2002-12-02 03:13:37 +0000
commit3dc96f7243ece1d1f7f87b03334f840415e0db63 (patch)
tree15f00bd8ebd718713d8c0a8707ebebfced99c550 /contrib/cvs/src/buffer.c
parentcf46dfb750863d760d19b9858b0a336b158275da (diff)
downloadFreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.zip
FreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.tar.gz
Import cvs-1.11.2.1 as of 2002/12/01 onto vendor branch. This fixes all
of the bugs that I know of. We've been running a slightly older version of this on freefall/repoman, where it was afflicted by a silly merge error on my part (fixed). Approved by: re
Diffstat (limited to 'contrib/cvs/src/buffer.c')
-rw-r--r--contrib/cvs/src/buffer.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/contrib/cvs/src/buffer.c b/contrib/cvs/src/buffer.c
index 0c13cde..ba98b4f 100644
--- a/contrib/cvs/src/buffer.c
+++ b/contrib/cvs/src/buffer.c
@@ -1247,6 +1247,20 @@ stdio_buffer_initialize (fp, child_pid, input, memory)
(void *) bc);
}
+/* Return the file associated with a stdio buffer. */
+FILE *
+stdio_buffer_get_file (buf)
+ struct buffer *buf;
+{
+ struct stdio_buffer_closure *bc;
+
+ assert(buf->shutdown == stdio_buffer_shutdown);
+
+ bc = (struct stdio_buffer_closure *) buf->closure;
+
+ return(bc->fp);
+}
+
/* The buffer input function for a buffer built on a stdio FILE. */
static int
@@ -1378,8 +1392,7 @@ stdio_buffer_shutdown (buf)
if (buf->input)
{
- if (! buf_empty_p (buf)
- || getc (bc->fp) != EOF)
+ if ( !buf_empty_p (buf) )
{
# ifdef SERVER_SUPPORT
if (server_active)
OpenPOWER on IntegriCloud