Age | Commit message (Collapse) | Author |
|
* hasse/stdlib/chars_limit_bug/OTP-15875/ERL-967:
stdlib: Fix a bug concerning io_lib option 'chars_limit'
# Conflicts:
# lib/stdlib/test/io_SUITE.erl
|
|
See also https://bugs.erlang.org/browse/ERL-967.
|
|
* hasse/stdlib/chars_limit_bug/OTP-15847/ERL-957:
stdlib: Fix a bug concerning io_lib option 'chars_limit'
# Conflicts:
# lib/stdlib/test/io_SUITE.erl
|
|
See also https://bugs.erlang.org/browse/ERL-957.
|
|
|
|
Avoid traversing all of the list/string when only part of it will be
used. An explicit check that the list is flat is needed since
string:slice() accepts deep lists and more.
|
|
Try calling iolist_size() before calling string:length().
The reason is that calls to string:length/1 are slow when the argument
is not a list of integers (or contains UNICODE).
|
|
|
|
See also https://bugs.erlang.org/browse/ERL-607.
A zero field width used to insert line breaks "everywhere", but with
this patch no line breaks are inserted.
|
|
Use the same depth for all (printed) elements of a map.
Since the order of keys can vary when printing a map--maps:iterator/1
and maps:next/1 are used--it is more consistent to print all
associations with the same depth.
If the associations printed are limited by the depth, the selection
of associations is arbitrary, as before.
|
|
Inspiration from module lager_format.
Also some improvements of Unicode handling.
io_lib:format/3 and io_lib:fwrite/3 are new functions. The
representation of the options is a list, but we are considering using
a map instead. If we change, it will happen after Erlang/OTP 21.0-rc1
is released.
|
|
A bug fix: limited maps end with "...", not "...=>...".
A modification: wW separate pairs with " => ", not "=>".
When the output is limited on number of characters, the term is
balanced by wW the same way as is done with pP (see commit bc38638).
|
|
|
|
The name of the io_lib_pretty:print/2 option 'max_chars' is changed to
'line_max_chars' (used by module shell only).
The new option for limiting the number of returned characters of
io_lib_pretty:print() is called 'chars_limit'.
|
|
|
|
The field width calculation did not handle graphem clusters well.
|
|
|
|
|
|
* maint:
[xmerl] Remove faulty throws
[xmerl] Fix XML "well-formedness" bug i SAX parser
[xmerl] Correct bug handling multiple documents on a stream
stdlib: Improve pretty-printing of terms with maps
Conflicts:
lib/stdlib/test/io_SUITE.erl
|
|
As of committing this branch maps:fold/3 calls maps:to_list/1, which
means that the time and memory needed for printing maps is not always
proportional to the size of the generated deep list of characters.
|
|
|
|
|
|
|
|
|
|
* Vagabond/adt-faster-io_lib_pretty/OTP-11752:
Use lists:keyfind in io_lib_pretty as it is faster
|
|
As all the options to the pretty printer are 2-tuples, lists:keyfind/3 is
faster replacement for proplists:get_value/3.
|
|
The HiPE compiler crashes when trying to compile these files because
it does not currently support maps. So, add a -compile(no_native)
attribute to these files to allow the system to be made even when
configured with --enable-native-libs.
This is a temporary fix and will be removed when the HiPE compiler
gets proper support for maps.
|
|
Pretty printing behaviour mimic records.
This commit requires Map enabled bootstrap compiler.
|
|
|
|
This means that only UTF-8 characters in binaries that conform
to the printable_range are printed as <<"..."/utf8>> in io_lib_pretty.
|
|
Use the new function shell:strings/1 to toggle how the Erlang shell
outputs lists of integers.
|
|
The modifier 'l' can be used for turning off the string recognition of
~p and ~P.
|
|
Binaries were pretty printed too often.
|
|
In order to simplify the testing of Unicode atoms a minor adjustment
has been made in io_lib_pretty. Unicode atoms will not be introduced
until R18 but it may come in handy to be able to pretty-print such
atoms in R16. This update affects ~p only; ~w already works.
|
|
The code related to the introduction of unicode_string() and
unicode_char() has been removed. The types char() and string() have
been extended to include Unicode characters.
In fact char() was changed some time ago; this commit is about
cleaning up the documentation and introduce better names for some
functions.
|
|
Expect modifications, additions and corrections.
There is a kludge in file_io_server and
erl_scan:continuation_location() that's not so pleasing.
|
|
|