From ed9df3303dacca89e7fc842e054c1a1b24c72fce Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 1 Aug 2018 14:25:25 -0700 Subject: [PATCH] tools.cat: use re-encode/re-decode. --- extra/tools/cat/cat.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/tools/cat/cat.factor b/extra/tools/cat/cat.factor index 0798d757e0..45694598df 100644 --- a/extra/tools/cat/cat.factor +++ b/extra/tools/cat/cat.factor @@ -1,14 +1,14 @@ ! Copyright (C) 2010 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: accessors command-line formatting fry io io.encodings +USING: command-line formatting fry io io.encodings io.encodings.binary io.files kernel namespaces sequences ; IN: tools.cat : cat-stream ( -- ) - input-stream get dup decoder? [ stream>> ] when - output-stream get dup encoder? [ stream>> ] when + input-stream get binary re-decode + output-stream get binary re-encode '[ _ stream-write ] each-stream-block ; : cat-file ( path -- ) -- 2.34.1