Permalink
Browse files

Change API function order

  • Loading branch information...
1 parent e0ca459 commit 7cc2ea1517538562f2fcf01a55082dbff00a7f4b @aerosol aerosol committed Oct 29, 2012
Showing with 24 additions and 24 deletions.
  1. +24 −24 src/binpp.erl
View
@@ -27,30 +27,6 @@
% API %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec convert(binary(), atom()) -> {ok, list()}.
-
-convert(Bin, hex) when is_binary(Bin) orelse is_bitstring(Bin) ->
- convert(Bin, [], fun hexstr/1);
-
-convert(Bin, bin) when is_binary(Bin) orelse is_bitstring(Bin) ->
- convert(Bin, [], fun binstr/1).
-
--spec convert(binary()) -> {ok, list()}.
-
-convert(Bin) when is_binary(Bin) ->
- convert(Bin, hex).
-
--spec format(binary(), atom()) -> ok.
-
-format(Bin, Base) ->
- {ok, Octets} = convert(Bin, Base),
- io:format("~p~n", [string:join(Octets, " ")]).
-
--spec format(binary()) -> ok.
-
-format(Bin) ->
- format(Bin, hex).
-
-spec pprint(binary()) -> ok.
pprint(Bin) ->
@@ -96,6 +72,30 @@ from_str(Str, hex) when is_list(Str) ->
from_str(Str) when is_list(Str) ->
from_str(Str, hex).
+-spec format(binary(), atom()) -> ok.
+
+format(Bin, Base) ->
+ {ok, Octets} = convert(Bin, Base),
+ io:format("~p~n", [string:join(Octets, " ")]).
+
+-spec format(binary()) -> ok.
+
+format(Bin) ->
+ format(Bin, hex).
+
+-spec convert(binary(), atom()) -> {ok, list()}.
+
+convert(Bin, hex) when is_binary(Bin) orelse is_bitstring(Bin) ->
+ convert(Bin, [], fun hexstr/1);
+
+convert(Bin, bin) when is_binary(Bin) orelse is_bitstring(Bin) ->
+ convert(Bin, [], fun binstr/1).
+
+-spec convert(binary()) -> {ok, list()}.
+
+convert(Bin) when is_binary(Bin) ->
+ convert(Bin, hex).
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Core :) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0 comments on commit 7cc2ea1

Please sign in to comment.