Brian Wheeler
bdwh...@indiana.edu
cvs diff: Diffing .
cvs diff: Diffing ops
Index: ops/io.ops
===================================================================
RCS file: /cvs/public/parrot/ops/io.ops,v
retrieving revision 1.51
diff -u -r1.51 io.ops
--- ops/io.ops 29 Sep 2004 15:44:29 -0000 1.51
+++ ops/io.ops 24 Nov 2004 21:28:57 -0000
@@ -42,6 +42,19 @@
########################################
+=item B<eof>(out INT, in PMC)
+
+Check for end-of-file condition in IO object $2 and return the status
in $1
+
+=cut
+
+inline op eof(out INT, in PMC) :base_io {
+ $1 = PIO_eof(interpreter,$2);
+ goto NEXT();
+}
+
+########################################
+
=item B<fdopen>(out PMC, in INT, in STR)
Create ParrotIO object in $1 as a copy of file descriptor $2.
--
brian wheeler <bdwh...@indiana.edu>
Please just use the "eof" method of the PIO object:
$I0 = $P0."eof"()
leo
Brian
--
brian wheeler <bdwh...@indiana.edu>
They should -- it'll make it easier to abstract things out later when
people start wanting to do bizarre things with pseudo-filehandles.
>On Thu, 2004-11-25 at 08:00 +0100, Leopold Toetsch wrote:
>> Brian Wheeler <bdwh...@indiana.edu> wrote:
>> > I noticed a hole in the io.ops where the PIO stuff wasn't covered. This
>> > patch creates an eof opcode which checks for end of file.
>>
>> Please just use the "eof" method of the PIO object:
>>
> > $I0 = $P0."eof"()
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk