|
|
@ -24,7 +24,7 @@ |
|
|
|
|
|
|
|
-spec pPrint(term()) -> io_lib:chars(). |
|
|
|
pPrint(Term) -> |
|
|
|
print(Term, 1, 80, -1, -1, -1, no_fun, latin1, true). |
|
|
|
print(Term, 1, 120, -1, -1, -1, no_fun, latin1, true). |
|
|
|
|
|
|
|
%% print(Term, RecDefFun) -> [Chars] |
|
|
|
%% print(Term, Depth, RecDefFun) -> [Chars] |
|
|
@ -55,7 +55,7 @@ pPrint(Term) -> |
|
|
|
|
|
|
|
pPrint(Term, Options) when is_list(Options) -> |
|
|
|
Col = get_option(column, Options, 1), |
|
|
|
Ll = get_option(line_length, Options, 80), |
|
|
|
Ll = get_option(line_length, Options, 120), |
|
|
|
D = get_option(depth, Options, -1), |
|
|
|
M = get_option(line_max_chars, Options, -1), |
|
|
|
T = get_option(chars_limit, Options, -1), |
|
|
@ -69,7 +69,7 @@ pPrint(Term, RecDefFun) -> |
|
|
|
-spec pPrint(term(), depth(), rec_print_fun()) -> chars(). |
|
|
|
|
|
|
|
pPrint(Term, Depth, RecDefFun) -> |
|
|
|
pPrint(Term, 1, 80, Depth, RecDefFun). |
|
|
|
pPrint(Term, 1, 120, Depth, RecDefFun). |
|
|
|
|
|
|
|
-spec pPrint(term(), column(), line_length(), depth()) -> chars(). |
|
|
|
pPrint(Term, Col, Ll, D) -> |
|
|
@ -91,7 +91,7 @@ pPrint(Term, Col, Ll, D, M, RecDefFun) -> |
|
|
|
%% Used together with D to limit the output. It is possible that |
|
|
|
%% more than T characters are returned. |
|
|
|
%% Col = current column, default 1 |
|
|
|
%% Ll = line length/~p field width, default 80 |
|
|
|
%% Ll = line length/~p field width, default 120 |
|
|
|
%% M = CHAR_MAX (-1 if no max, 60 when printing from shell) |
|
|
|
%%Term, Precision, Width, Depth, -1, CharsLimit, no_fun, Encoding, Strings |
|
|
|
|
|
|
@ -423,14 +423,14 @@ write_tail(E, S) -> |
|
|
|
-spec pIntermediate(term(), depth(), pos_integer(), rec_print_fun(), |
|
|
|
encoding(), boolean()) -> intermediate_format(). |
|
|
|
|
|
|
|
pIntermediate(Term, D, T, RF, Enc, Str) when T > 0 -> |
|
|
|
pIntermediate(Term, Depth, CharsLimit, RF, Enc, Str) -> |
|
|
|
D0 = 1, |
|
|
|
If = print_length(Term, D0, T, RF, Enc, Str), |
|
|
|
If = print_length(Term, D0, CharsLimit, RF, Enc, Str), |
|
|
|
case If of |
|
|
|
{_, Len, Dots, _} when Dots =:= 0; Len > T; D =:= 1 -> |
|
|
|
{_, Len, Dots, _} when Dots =:= 0; Len > CharsLimit; Depth =:= 1 -> |
|
|
|
If; |
|
|
|
_ -> |
|
|
|
find_upper(If, Term, T, D0, 2, D, RF, Enc, Str) |
|
|
|
find_upper(If, Term, CharsLimit, D0, 2, Depth, RF, Enc, Str) |
|
|
|
end. |
|
|
|
|
|
|
|
find_upper(Lower, Term, T, Dl, Dd, D, RF, Enc, Str) -> |
|
|
|