]> gitweb.factorcode.org Git - factor.git/commitdiff
io: implement stream protocols on f
authorJoe Groff <arcata@gmail.com>
Tue, 29 Nov 2011 04:36:34 +0000 (20:36 -0800)
committerJoe Groff <arcata@gmail.com>
Tue, 29 Nov 2011 04:36:34 +0000 (20:36 -0800)
Fixes deployed applications that write to output-stream

core/io/io.factor

index b2485a614170f1c0121bfaf6ade7a98c2d35af46..d4d54b885250e4ea17f97795504b0b1deb665235 100644 (file)
@@ -248,3 +248,15 @@ M: output-stream stream-nl CHAR: \n swap stream-write1 ; inline
 M: output-stream stream-seekable? drop f ; inline
 M: output-stream stream-length drop f ; inline
 
+M: f stream-read1 drop f ; inline
+M: f stream-read-unsafe 3drop 0 ; inline
+M: f stream-read-until 2drop f f ; inline
+M: f stream-read-partial-unsafe 3drop 0 ; inline
+M: f stream-readln drop f ; inline
+M: f stream-contents drop f ; inline
+
+M: f stream-write1 2drop ; inline
+M: f stream-write 2drop ; inline
+M: f stream-flush drop ; inline
+M: f stream-nl drop ; inline
+