Author: fperrad
Date: Sat Dec 13 00:59:00 2008
New Revision: 33846

Modified:
   trunk/src/pmc/filehandle.pmc

Log:
[pdd22io] 
Add the method 'isatty' (lost between ParrotIO and FileHandle)
The Lua interpreter needs it.



Modified: trunk/src/pmc/filehandle.pmc
==============================================================================
--- trunk/src/pmc/filehandle.pmc        (original)
+++ trunk/src/pmc/filehandle.pmc        Sat Dec 13 00:59:00 2008
@@ -228,6 +228,18 @@
 
 /*
 
+=item C<METHOD isatty()>
+
+=cut
+
+*/
+    METHOD isatty() {
+        INTVAL isatty = (PARROT_FILEHANDLE(SELF)->flags & PIO_F_CONSOLE) == 
PIO_F_CONSOLE;
+        RETURN(INTVAL isatty);
+    }
+
+/*
+
 =item C<METHOD close()>
 
 Close the filehandle.

Reply via email to