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.

Brian Wheeler
[EMAIL PROTECTED]


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 <[EMAIL PROTECTED]>

Reply via email to