images.p[bgp]m: use throws-on-eof

db4
Joe Groff 2010-07-09 14:26:17 -07:00
parent 90b962bbd3
commit 8b7cb0bc21
3 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
USING: accessors arrays ascii bit-arrays byte-arrays combinators
continuations grouping images images.loader io io.encodings.ascii
io.encodings.string kernel locals make math math.functions math.parser
sequences ;
sequences io.streams.throwing ;
IN: images.pbm
SINGLETON: pbm-image
@ -73,7 +73,7 @@ SINGLETON: pbm-image
PRIVATE>
M: pbm-image stream>image
drop [ read-pbm ] with-input-stream ;
drop [ [ read-pbm ] input-throws-on-eof ] with-input-stream ;
M: pbm-image image>stream
drop {

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types ascii combinators images images.loader
io io.encodings.ascii io.encodings.string kernel locals make math
math.parser sequences specialized-arrays ;
math.parser sequences specialized-arrays io.streams.throwing ;
SPECIALIZED-ARRAY: ushort
IN: images.pgm
@ -50,7 +50,7 @@ SINGLETON: pgm-image
wide [ ushort-components ] [ ubyte-components ] if >>component-type ;
M: pgm-image stream>image
drop [ read-pgm ] with-input-stream ;
drop [ [ read-pgm ] input-throws-on-eof ] with-input-stream ;
M: pgm-image image>stream
drop {

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors ascii combinators images images.loader io
io.encodings.ascii io.encodings.string kernel locals make math
math.parser sequences ;
math.parser sequences io.streams.throwing ;
IN: images.ppm
SINGLETON: ppm-image
@ -47,7 +47,7 @@ SINGLETON: ppm-image
ubyte-components >>component-type ;
M: ppm-image stream>image
drop [ read-ppm ] with-input-stream ;
drop [ [ read-ppm ] input-throws-on-eof ] with-input-stream ;
M: ppm-image image>stream
drop {