aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/io_lib_format.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-02-01 12:24:22 +0100
committerHans Bolinder <[email protected]>2013-02-15 12:21:44 +0100
commit07c086c1b9ea74996f20339d42ca91c3411966f5 (patch)
tree0380f6ae63b5f059498b69b4b85398ba0438c14e /lib/stdlib/src/io_lib_format.erl
parent675b8108486919739dc2e213587489c0daab80cb (diff)
downloadotp-07c086c1b9ea74996f20339d42ca91c3411966f5.tar.gz
otp-07c086c1b9ea74996f20339d42ca91c3411966f5.tar.bz2
otp-07c086c1b9ea74996f20339d42ca91c3411966f5.zip
[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.
Diffstat (limited to 'lib/stdlib/src/io_lib_format.erl')
-rw-r--r--lib/stdlib/src/io_lib_format.erl10
1 files changed, 5 insertions, 5 deletions
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),