This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
let () =
|
||||
let ic = open_in_bin Sys.argv.(1) in
|
||||
let col = ref 0 in
|
||||
try
|
||||
while true do
|
||||
let x = Char.code (input_char ic) in
|
||||
(match !col with
|
||||
| 0 -> ()
|
||||
| 8 -> print_string " "
|
||||
| _ -> print_char ' ');
|
||||
incr col;
|
||||
Printf.printf "%02x" x;
|
||||
if !col = 16 then begin
|
||||
print_newline ();
|
||||
col := 0;
|
||||
end
|
||||
done
|
||||
with End_of_file ->
|
||||
if !col <> 0 then print_newline ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue