tools.hexdump: enable use from command-line.
parent
174f0f02a1
commit
24101fbaeb
|
@ -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 ascii byte-arrays byte-vectors grouping io
|
USING: arrays ascii byte-arrays byte-vectors command-line
|
||||||
io.encodings.binary io.files io.streams.string kernel math
|
grouping io io.encodings.binary io.files io.streams.string
|
||||||
math.parser namespaces sequences splitting strings ;
|
kernel math math.parser namespaces sequences splitting strings ;
|
||||||
IN: tools.hexdump
|
IN: tools.hexdump
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
@ -45,3 +45,8 @@ M: byte-vector hexdump. hexdump-bytes ;
|
||||||
|
|
||||||
: hexdump-file ( path -- )
|
: hexdump-file ( path -- )
|
||||||
binary file-contents hexdump. ;
|
binary file-contents hexdump. ;
|
||||||
|
|
||||||
|
: hexdump-main ( -- )
|
||||||
|
command-line get [ hexdump-file ] each ;
|
||||||
|
|
||||||
|
MAIN: hexdump-main
|
||||||
|
|
Loading…
Reference in New Issue