From 8b7cb0bc212047c6ac0ddecdafd9dcd550c6bd06 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 9 Jul 2010 14:26:17 -0700 Subject: [PATCH] images.p[bgp]m: use throws-on-eof --- basis/images/pbm/pbm.factor | 4 ++-- basis/images/pgm/pgm.factor | 4 ++-- basis/images/ppm/ppm.factor | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/basis/images/pbm/pbm.factor b/basis/images/pbm/pbm.factor index 9b8c7c11f9..40db85f58d 100644 --- a/basis/images/pbm/pbm.factor +++ b/basis/images/pbm/pbm.factor @@ -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 { diff --git a/basis/images/pgm/pgm.factor b/basis/images/pgm/pgm.factor index 52e594ddff..914bdcdccb 100644 --- a/basis/images/pgm/pgm.factor +++ b/basis/images/pgm/pgm.factor @@ -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 { diff --git a/basis/images/ppm/ppm.factor b/basis/images/ppm/ppm.factor index 9610189094..93c36e60a1 100755 --- a/basis/images/ppm/ppm.factor +++ b/basis/images/ppm/ppm.factor @@ -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 {