]> gitweb.factorcode.org Git - factor.git/commitdiff
io.streams.c: remove -seek and -tell methods
authorJoe Groff <arcata@gmail.com>
Sat, 15 Oct 2011 04:36:25 +0000 (21:36 -0700)
committerJoe Groff <arcata@gmail.com>
Tue, 18 Oct 2011 04:23:10 +0000 (21:23 -0700)
M: c-stream stream-seek was broken and bootstrap doesn't need it so save some code.

core/io/streams/c/c-tests.factor
core/io/streams/c/c.factor

index 038f44d99d0f75cdf76eaf189635ed51aad70bf4..ab7840c3870e5b2e3b7b293d2ad8594c68b7e6a1 100644 (file)
@@ -11,15 +11,6 @@ IN: io.streams.c.tests
     >string
 ] unit-test
 
-[ 0 ]
-[ "test.txt" temp-file "rb" fopen <c-reader> [ stream-tell ] [ dispose ] bi ] unit-test
-
-[ 3 ] [
-    "test.txt" temp-file "rb" fopen <c-reader>
-    3 over stream-read drop
-    [ stream-tell ] [ dispose ] bi
-] unit-test
-
 ! Writing specialized arrays to binary streams
 [ ] [
     "test.txt" temp-file "wb" fopen <c-writer> [
index a78e21d2d9a25e16666baa78a9ac3e0b370c2477..ea5443a58aebeafb8a0852ea1befaf8e10f2cb6b 100644 (file)
@@ -13,18 +13,6 @@ TUPLE: c-stream < disposable handle ;
 
 M: c-stream dispose* handle>> fclose ;
 
-M: c-stream stream-tell handle>> ftell ;
-
-M: c-stream stream-seek
-    [
-        {
-            { seek-absolute [ 0 ] }
-            { seek-relative [ 1 ] }
-            { seek-end      [ 2 ] }
-            [ bad-seek-type ]
-        } case
-    ] [ handle>> ] bi* fseek ;
-
 TUPLE: c-writer < c-stream ;
 
 : <c-writer> ( handle -- stream ) c-writer new-c-stream ;