develooper Front page | perl.cvs.parrot | Postings from November 2008

[svn:parrot] r33387 - branches/pdd22io_part2/src/io

From:
allison
Date:
November 30, 2008 16:20
Subject:
[svn:parrot] r33387 - branches/pdd22io_part2/src/io
Message ID:
20081201002007.8E4C2CB9AF@x12.develooper.com
Author: allison
Date: Sun Nov 30 16:20:06 2008
New Revision: 33387

Modified:
   branches/pdd22io_part2/src/io/unix.c

Log:
[pdd22io] Line buffering always returns at least a newline, unless its at the end of the file.


Modified: branches/pdd22io_part2/src/io/unix.c
==============================================================================
--- branches/pdd22io_part2/src/io/unix.c	(original)
+++ branches/pdd22io_part2/src/io/unix.c	Sun Nov 30 16:20:06 2008
@@ -474,7 +474,7 @@
         }
         else {
             /* Read returned 0, EOF if len requested > 0 */
-            if (len > 0)
+            if (len > 0 || (file_flags & PIO_F_LINEBUF))
                 Parrot_io_set_flags(interp, filehandle, (file_flags | PIO_F_EOF));
             s->bufused = s->strlen = 0;
             return bytes;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About