tools.wc: use re-decode here also.
parent
ed9df3303d
commit
62fd7e3bbd
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2016 John Benediktsson
|
! Copyright (C) 2016 John Benediktsson
|
||||||
! See http://factorcode.org/license.txt for BSD license
|
! See http://factorcode.org/license.txt for BSD license
|
||||||
|
|
||||||
USING: accessors alien.data command-line formatting io
|
USING: alien.data command-line formatting io io.encodings
|
||||||
io.encodings io.encodings.binary io.files kernel math
|
io.encodings.binary io.files kernel math math.bitwise
|
||||||
math.bitwise math.vectors math.vectors.simd namespaces sequences
|
math.vectors math.vectors.simd namespaces sequences
|
||||||
specialized-arrays ;
|
specialized-arrays ;
|
||||||
|
|
||||||
SPECIALIZED-ARRAY: uchar-16
|
SPECIALIZED-ARRAY: uchar-16
|
||||||
|
@ -27,7 +27,7 @@ IN: tools.wc
|
||||||
] each-block-slice ; inline
|
] each-block-slice ; inline
|
||||||
|
|
||||||
: wc-stdin ( -- n )
|
: wc-stdin ( -- n )
|
||||||
input-stream get dup decoder? [ stream>> ] when
|
input-stream get binary re-decode
|
||||||
[ count-lines ] with-input-stream* ;
|
[ count-lines ] with-input-stream* ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
Loading…
Reference in New Issue