From 07c086c1b9ea74996f20339d42ca91c3411966f5 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 1 Feb 2013 12:24:22 +0100 Subject: [stdlib] Add new SDTLIB application variable 'shell_strings' Use the new function shell:strings/1 to toggle how the Erlang shell outputs lists of integers. --- lib/stdlib/src/io_lib_format.erl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/stdlib/src/io_lib_format.erl') diff --git a/lib/stdlib/src/io_lib_format.erl b/lib/stdlib/src/io_lib_format.erl index 19eccf9355..56e15a17ec 100644 --- a/lib/stdlib/src/io_lib_format.erl +++ b/lib/stdlib/src/io_lib_format.erl @@ -58,7 +58,7 @@ collect_cseq(Fmt0, Args0) -> {P,Fmt2,Args2} = precision(Fmt1, Args1), {Pad,Fmt3,Args3} = pad_char(Fmt2, Args2), {Encoding,Fmt4,Args4} = encoding(Fmt3, Args3), - {Strings,Fmt5,Args5} = pretty_lists(Fmt4, Args4), + {Strings,Fmt5,Args5} = strings(Fmt4, Args4), {C,As,Fmt6,Args6} = collect_cc(Fmt5, Args5), {{C,As,F,Ad,P,Pad,Encoding,Strings},Fmt6,Args6}. @@ -68,11 +68,11 @@ encoding([$t|Fmt],Args) -> encoding(Fmt,Args) -> {latin1,Fmt,Args}. -pretty_lists([$l|Fmt],Args) -> +strings([$l|Fmt],Args) -> true = hd(Fmt) =/= $t, - {no,Fmt,Args}; -pretty_lists(Fmt,Args) -> - {unicode,Fmt,Args}. + {false,Fmt,Args}; +strings(Fmt,Args) -> + {true,Fmt,Args}. field_width([$-|Fmt0], Args0) -> {F,Fmt,Args} = field_value(Fmt0, Args0), -- cgit v1.2.3