]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.wc: use re-decode here also.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 2 Aug 2018 04:03:40 +0000 (21:03 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 2 Aug 2018 04:03:40 +0000 (21:03 -0700)
extra/tools/wc/wc.factor

index c0535df1bd807de040417ff322351206ab3d1ee5..94d8d3f1dfd17984ea7042a97d563ddd55101e7d 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2016 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
 
-USING: accessors alien.data command-line formatting io
-io.encodings io.encodings.binary io.files kernel math
-math.bitwise math.vectors math.vectors.simd namespaces sequences
+USING: alien.data command-line formatting io io.encodings
+io.encodings.binary io.files kernel math math.bitwise
+math.vectors math.vectors.simd namespaces sequences
 specialized-arrays ;
 
 SPECIALIZED-ARRAY: uchar-16
@@ -27,7 +27,7 @@ IN: tools.wc
     ] each-block-slice ; inline
 
 : wc-stdin ( -- n )
-    input-stream get dup decoder? [ stream>> ] when
+    input-stream get binary re-decode
     [ count-lines ] with-input-stream* ;
 
 PRIVATE>