diff --git a/src/eFmt.erl b/src/eFmt.erl index c5a4280..89de205 100644 --- a/src/eFmt.erl +++ b/src/eFmt.erl @@ -105,7 +105,7 @@ write(Term, Depth) -> write(Term, Depth, IsPretty) -> case IsPretty of true -> - eFmtPretty:pPrint(Term, 1, 80, Depth); + eFmtPretty:pPrint(Term, 1, 120, Depth); _ -> writeTerm(Term, Depth, latin1) end. @@ -118,8 +118,7 @@ write(Term, Depth, Encoding, CharsLimit) -> CharsLimit < 0 -> writeTerm(Term, Depth, Encoding); true -> - RecDefFun = fun(_, _) -> no end, - If = eFmtPretty:pIntermediate(Term, Depth, CharsLimit, RecDefFun, Encoding, _Str = false), + If = eFmtPretty:pIntermediate(Term, Depth, CharsLimit, no_fun, Encoding, _Str = false), eFmtPretty:pWrite(If) end. @@ -537,9 +536,9 @@ print(Term, Depth, Width, _Adjust, Precision, _PadChar, Encoding, Strings, Chars Width == none -> if Precision == none -> - eFmtPretty:print(Term, I + 1, 80, Depth, -1, CharsLimit, no_fun, Encoding, Strings); + eFmtPretty:print(Term, I + 1, 120, Depth, -1, CharsLimit, no_fun, Encoding, Strings); true -> - eFmtPretty:print(Term, Precision, 80, Depth, -1, CharsLimit, no_fun, Encoding, Strings) + eFmtPretty:print(Term, Precision, 120, Depth, -1, CharsLimit, no_fun, Encoding, Strings) end; true -> if diff --git a/src/eFmtPretty.erl b/src/eFmtPretty.erl index 782b699..beee8d2 100644 --- a/src/eFmtPretty.erl +++ b/src/eFmtPretty.erl @@ -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) ->