]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix indentation in read-token
authorErik Charlebois <erikcharlebois@gmail.com>
Mon, 12 Apr 2010 08:15:49 +0000 (01:15 -0700)
committerErik Charlebois <erikcharlebois@gmail.com>
Mon, 12 Apr 2010 08:15:49 +0000 (01:15 -0700)
basis/images/pbm/pbm.factor

index ba27c545cf2818a4b4e90e58cd63d7acebf9f95b..7db7ccedc6e0d53fcf1b7f076e88163377ffd7f2 100644 (file)
@@ -1,10 +1,9 @@
 ! Copyright (C) 2010 Erik Charlebois.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.c-types 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 specialized-arrays ;
-SPECIALIZED-ARRAY: ushort
+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 ;
 IN: images.pbm
 
 SINGLETON: pbm-image
@@ -12,12 +11,14 @@ SINGLETON: pbm-image
 
 <PRIVATE
 : read-token ( -- token )
-    [ read1 dup blank?
-      [ t ]
-      [ dup CHAR: # =
-        [ "\n" read-until 2drop t ]
-        [ f ] if
-      ] if
+    [
+        read1 dup blank?
+        [ t ]
+        [
+            dup CHAR: # =
+            [ "\n" read-until 2drop t ]
+            [ f ] if
+        ] if
     ] [ drop ] while
     " \n\r\t" read-until drop swap
     prefix ascii decode ;
@@ -59,12 +60,12 @@ SINGLETON: pbm-image
     read-number    :> height
     width height * :> npixels
     width 8 mod    :> leftover
-    
+
     type {
         { "P1" [ [ [ read-ascii-bits ] ignore-errors ] B{ } make ] }
         { "P4" [ [ width height read-binary-bits ] B{ } make ] }
     } case :> data
-                     
+
     image new
     L                >>component-order
     { width height } >>dim