Permalink
Browse files

Output the whole binary at once when using pprint

  • Loading branch information...
1 parent 233a6e1 commit 5c69538f7f52df08ae843698e765284e6e50dc99 @benbro benbro committed Sep 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/binpp.erl
View
@@ -54,7 +54,7 @@ format(Bin) ->
pprint(Bin) ->
{ok, Octets} = convert(Bin, hex),
Buckets = buckets(16, Octets),
- lists:foreach(fun print_bucket/1, Buckets).
+ io:format("~s~n", [lists:map(fun print_bucket/1, Buckets)]).
pprint(Bin, Pos, Len) when Len =< size(Bin) ->
pprint(binary:part(Bin, Pos, Len));
@@ -113,7 +113,7 @@ print_bucket(Bucket) ->
end
end,
Bucket),
- io:format("~s ~s~n", [string:left(OctetLine, 16*2 + 16, $ ), OctetRepr]).
+ io_lib:format("~s ~s~n", [string:left(OctetLine, 16*2 + 16, $ ), OctetRepr]).
print_comparsion([], []) ->
ok;

0 comments on commit 5c69538

Please sign in to comment.