Browse Source

moved eof

Nicolas Cannasse 16 years ago
parent
commit
35ab6c0feb
3 changed files with 8 additions and 5 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 7 0
      std/neko/io/FileInput.hx
  3. 0 5
      std/neko/io/FileOutput.hx

+ 1 - 0
doc/CHANGES.txt

@@ -21,6 +21,7 @@ TODO :
 	"throw" type is now Unknown instead of Dynamic (prevent type-hole in "if A else if B else throw")
 	added __foreach__ for flash9/as3
 	fixed f9 verify error with different kind of functions
+	moved eof() from neko.io.FileOutput to FileInput
 
 2008-11-23: 2.02
 	Std.is(MyInterface, Class) now returns true (haXe/PHP)

+ 7 - 0
std/neko/io/FileInput.hx

@@ -71,6 +71,13 @@ class FileInput extends haxe.io.Input {
 		return file_tell(__f);
 	}
 
+
+	public function eof() : Bool {
+		return file_eof(__f);
+	}
+
+	private static var file_eof = neko.Lib.load("std","file_eof",1);
+
 	private static var file_read = neko.Lib.load("std","file_read",4);
 	private static var file_read_char = neko.Lib.load("std","file_read_char",1);
 

+ 0 - 5
std/neko/io/FileOutput.hx

@@ -61,14 +61,9 @@ class FileOutput extends haxe.io.Output {
 		return file_tell(__f);
 	}
 
-	public function eof() : Bool {
-		return file_eof(__f);
-	}
-
 	private static var file_close = neko.Lib.load("std","file_close",1);
 	private static var file_seek = neko.Lib.load("std","file_seek",3);
 	private static var file_tell = neko.Lib.load("std","file_tell",1);
-	private static var file_eof = neko.Lib.load("std","file_eof",1);
 
 	private static var file_flush = neko.Lib.load("std","file_flush",1);
 	private static var file_write = neko.Lib.load("std","file_write",4);