tools.hexdump: enable use from command-line.

db4
John Benediktsson 2015-04-09 10:43:20 -07:00
parent 174f0f02a1
commit 24101fbaeb
1 changed files with 8 additions and 3 deletions

View File

@ -1,8 +1,8 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays ascii byte-arrays byte-vectors grouping io
io.encodings.binary io.files io.streams.string kernel math
math.parser namespaces sequences splitting strings ;
USING: arrays ascii byte-arrays byte-vectors command-line
grouping io io.encodings.binary io.files io.streams.string
kernel math math.parser namespaces sequences splitting strings ;
IN: tools.hexdump
<PRIVATE
@ -45,3 +45,8 @@ M: byte-vector hexdump. hexdump-bytes ;
: hexdump-file ( path -- )
binary file-contents hexdump. ;
: hexdump-main ( -- )
command-line get [ hexdump-file ] each ;
MAIN: hexdump-main