add a hexdump-file word
parent
60a0170e38
commit
ce37c8e082
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays io io.streams.string kernel math math.parser
|
USING: arrays ascii byte-arrays byte-vectors grouping io
|
||||||
namespaces sequences splitting grouping strings ascii
|
io.encodings.binary io.files io.streams.string kernel math
|
||||||
byte-arrays byte-vectors ;
|
math.parser namespaces sequences splitting strings ;
|
||||||
IN: tools.hexdump
|
IN: tools.hexdump
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
@ -42,3 +42,6 @@ M: byte-vector hexdump. hexdump-bytes ;
|
||||||
|
|
||||||
: hexdump ( byte-array -- str )
|
: hexdump ( byte-array -- str )
|
||||||
[ hexdump. ] with-string-writer ;
|
[ hexdump. ] with-string-writer ;
|
||||||
|
|
||||||
|
: hexdump-file ( path -- )
|
||||||
|
binary file-contents hexdump. ;
|
||||||
|
|
Loading…
Reference in New Issue