diff options
Diffstat (limited to 'lib/stdlib')
118 files changed, 408 insertions, 326 deletions
diff --git a/lib/stdlib/doc/src/array.xml b/lib/stdlib/doc/src/array.xml index a79fcd487e..b0b3aa6dc1 100644 --- a/lib/stdlib/doc/src/array.xml +++ b/lib/stdlib/doc/src/array.xml @@ -1,9 +1,9 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2007</year><year>2011</year> + <year>2007</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/base64.xml b/lib/stdlib/doc/src/base64.xml index f90a82187d..c4982f4eaa 100644 --- a/lib/stdlib/doc/src/base64.xml +++ b/lib/stdlib/doc/src/base64.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/beam_lib.xml b/lib/stdlib/doc/src/beam_lib.xml index db65eb3848..eb4974a79f 100644 --- a/lib/stdlib/doc/src/beam_lib.xml +++ b/lib/stdlib/doc/src/beam_lib.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2000</year><year>2011</year> + <year>2000</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/binary.xml b/lib/stdlib/doc/src/binary.xml index 06cfad0b0b..2410f1f9b8 100644 --- a/lib/stdlib/doc/src/binary.xml +++ b/lib/stdlib/doc/src/binary.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>2009</year> - <year>2012</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/book.xml b/lib/stdlib/doc/src/book.xml index 10ee6f3855..b1b67d661c 100644 --- a/lib/stdlib/doc/src/book.xml +++ b/lib/stdlib/doc/src/book.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE book SYSTEM "book.dtd"> <book xmlns:xi="http://www.w3.org/2001/XInclude"> <header titlestyle="normal"> <copyright> - <year>1997</year><year>2009</year> + <year>1997</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/c.xml b/lib/stdlib/doc/src/c.xml index 9cd4581a89..b49fa6ad67 100644 --- a/lib/stdlib/doc/src/c.xml +++ b/lib/stdlib/doc/src/c.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/calendar.xml b/lib/stdlib/doc/src/calendar.xml index f8db48e00c..e32a639b81 100644 --- a/lib/stdlib/doc/src/calendar.xml +++ b/lib/stdlib/doc/src/calendar.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/dets.xml b/lib/stdlib/doc/src/dets.xml index 215ec154ed..6bbedb0662 100644 --- a/lib/stdlib/doc/src/dets.xml +++ b/lib/stdlib/doc/src/dets.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/dict.xml b/lib/stdlib/doc/src/dict.xml index b01acd02bf..b8cf61af80 100644 --- a/lib/stdlib/doc/src/dict.xml +++ b/lib/stdlib/doc/src/dict.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/digraph.xml b/lib/stdlib/doc/src/digraph.xml index 0afc70ebe0..c5d5707f4f 100644 --- a/lib/stdlib/doc/src/digraph.xml +++ b/lib/stdlib/doc/src/digraph.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/digraph_utils.xml b/lib/stdlib/doc/src/digraph_utils.xml index ef6e1cb46f..ef6f9d8611 100644 --- a/lib/stdlib/doc/src/digraph_utils.xml +++ b/lib/stdlib/doc/src/digraph_utils.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2000</year><year>2012</year> + <year>2000</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/epp.xml b/lib/stdlib/doc/src/epp.xml index df7bf883fc..cf33530395 100644 --- a/lib/stdlib/doc/src/epp.xml +++ b/lib/stdlib/doc/src/epp.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/erl_eval.xml b/lib/stdlib/doc/src/erl_eval.xml index 24940f8396..b707dbcc02 100644 --- a/lib/stdlib/doc/src/erl_eval.xml +++ b/lib/stdlib/doc/src/erl_eval.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/erl_expand_records.xml b/lib/stdlib/doc/src/erl_expand_records.xml index 8ead438b31..1b5ee5de36 100644 --- a/lib/stdlib/doc/src/erl_expand_records.xml +++ b/lib/stdlib/doc/src/erl_expand_records.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>2005</year> - <year>2011</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/erl_id_trans.xml b/lib/stdlib/doc/src/erl_id_trans.xml index 18cc2460f9..0f7042f0c6 100644 --- a/lib/stdlib/doc/src/erl_id_trans.xml +++ b/lib/stdlib/doc/src/erl_id_trans.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>1996</year> - <year>2011</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/erl_internal.xml b/lib/stdlib/doc/src/erl_internal.xml index b8d5ad73b3..54e560f8b9 100644 --- a/lib/stdlib/doc/src/erl_internal.xml +++ b/lib/stdlib/doc/src/erl_internal.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>1996</year> - <year>2011</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/erl_lint.xml b/lib/stdlib/doc/src/erl_lint.xml index b7fbdd8799..1ca58baf9a 100644 --- a/lib/stdlib/doc/src/erl_lint.xml +++ b/lib/stdlib/doc/src/erl_lint.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/erl_parse.xml b/lib/stdlib/doc/src/erl_parse.xml index 56a7131821..2d5aff3c6c 100644 --- a/lib/stdlib/doc/src/erl_parse.xml +++ b/lib/stdlib/doc/src/erl_parse.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/erl_pp.xml b/lib/stdlib/doc/src/erl_pp.xml index 9ae4f3d91f..005c101973 100644 --- a/lib/stdlib/doc/src/erl_pp.xml +++ b/lib/stdlib/doc/src/erl_pp.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>1996</year> - <year>2012</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/erl_scan.xml b/lib/stdlib/doc/src/erl_scan.xml index 54240dea19..855c8fc195 100644 --- a/lib/stdlib/doc/src/erl_scan.xml +++ b/lib/stdlib/doc/src/erl_scan.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/erl_tar.xml b/lib/stdlib/doc/src/erl_tar.xml index fe166dbd01..f81e36f810 100644 --- a/lib/stdlib/doc/src/erl_tar.xml +++ b/lib/stdlib/doc/src/erl_tar.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2003</year><year>2011</year> + <year>2003</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml index 6db1ae3aa3..21cf8e4149 100644 --- a/lib/stdlib/doc/src/ets.xml +++ b/lib/stdlib/doc/src/ets.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/fascicules.xml b/lib/stdlib/doc/src/fascicules.xml index b30d34186e..0ded9007e0 100644 --- a/lib/stdlib/doc/src/fascicules.xml +++ b/lib/stdlib/doc/src/fascicules.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE fascicules SYSTEM "fascicules.dtd"> <fascicules> diff --git a/lib/stdlib/doc/src/file_sorter.xml b/lib/stdlib/doc/src/file_sorter.xml index a6b3633066..16572df3c5 100644 --- a/lib/stdlib/doc/src/file_sorter.xml +++ b/lib/stdlib/doc/src/file_sorter.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2001</year><year>2011</year> + <year>2001</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/filelib.xml b/lib/stdlib/doc/src/filelib.xml index bd780b2b2f..3a97f38ec2 100644 --- a/lib/stdlib/doc/src/filelib.xml +++ b/lib/stdlib/doc/src/filelib.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/filename.xml b/lib/stdlib/doc/src/filename.xml index 9296319b83..49b652f969 100644 --- a/lib/stdlib/doc/src/filename.xml +++ b/lib/stdlib/doc/src/filename.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1997</year><year>2011</year> + <year>1997</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/gb_sets.xml b/lib/stdlib/doc/src/gb_sets.xml index f91fac9c82..8ca95df8fc 100644 --- a/lib/stdlib/doc/src/gb_sets.xml +++ b/lib/stdlib/doc/src/gb_sets.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2001</year><year>2011</year> + <year>2001</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/gb_trees.xml b/lib/stdlib/doc/src/gb_trees.xml index 9316d60b1a..57e60eacb7 100644 --- a/lib/stdlib/doc/src/gb_trees.xml +++ b/lib/stdlib/doc/src/gb_trees.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2001</year><year>2011</year> + <year>2001</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/gen_event.xml b/lib/stdlib/doc/src/gen_event.xml index 1601ea9892..b9dfff833e 100644 --- a/lib/stdlib/doc/src/gen_event.xml +++ b/lib/stdlib/doc/src/gen_event.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2012</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/gen_fsm.xml b/lib/stdlib/doc/src/gen_fsm.xml index 73c1911f1e..1713367bd8 100644 --- a/lib/stdlib/doc/src/gen_fsm.xml +++ b/lib/stdlib/doc/src/gen_fsm.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/gen_server.xml b/lib/stdlib/doc/src/gen_server.xml index abb4c73c7b..4c83fde237 100644 --- a/lib/stdlib/doc/src/gen_server.xml +++ b/lib/stdlib/doc/src/gen_server.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2012</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml index 90f24c4cbc..a28180b42a 100644 --- a/lib/stdlib/doc/src/io.xml +++ b/lib/stdlib/doc/src/io.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/io_lib.xml b/lib/stdlib/doc/src/io_lib.xml index 3dac259477..9cbc54d8bd 100644 --- a/lib/stdlib/doc/src/io_lib.xml +++ b/lib/stdlib/doc/src/io_lib.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/io_protocol.xml b/lib/stdlib/doc/src/io_protocol.xml index d36bf2042f..9328704e11 100644 --- a/lib/stdlib/doc/src/io_protocol.xml +++ b/lib/stdlib/doc/src/io_protocol.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> <header> <copyright> <year>1999</year> - <year>2012</year> + <year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/lib.xml b/lib/stdlib/doc/src/lib.xml index 19fb827cbf..30f164826c 100644 --- a/lib/stdlib/doc/src/lib.xml +++ b/lib/stdlib/doc/src/lib.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml index 1aff78f4fc..251a383cf8 100644 --- a/lib/stdlib/doc/src/lists.xml +++ b/lib/stdlib/doc/src/lists.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2012</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/log_mf_h.xml b/lib/stdlib/doc/src/log_mf_h.xml index f2b09b58eb..3ef659f579 100644 --- a/lib/stdlib/doc/src/log_mf_h.xml +++ b/lib/stdlib/doc/src/log_mf_h.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>1996</year> - <year>2011</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/math.xml b/lib/stdlib/doc/src/math.xml index 0219dcce10..43cd20e726 100644 --- a/lib/stdlib/doc/src/math.xml +++ b/lib/stdlib/doc/src/math.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>1996</year> - <year>2012</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/ms_transform.xml b/lib/stdlib/doc/src/ms_transform.xml index ad5f8bd5ac..e89dd41f26 100644 --- a/lib/stdlib/doc/src/ms_transform.xml +++ b/lib/stdlib/doc/src/ms_transform.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2002</year><year>2011</year> + <year>2002</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml index 2ec0d6a60f..c36cc310aa 100644 --- a/lib/stdlib/doc/src/notes.xml +++ b/lib/stdlib/doc/src/notes.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> @@ -124,7 +124,7 @@ <p> Two adjacent * used as a single pattern will match all files and zero or more directories and subdirectories. - (Thanks to Jos� Valim)</p> + (Thanks to José Valim)</p> <p> Own Id: OTP-10431</p> </item> @@ -362,7 +362,7 @@ Fix filename:nativename/1 on Win32</p> <p> Don't choke on paths given as binary argument on Win32. - Thanks to Jan Kl�tzke</p> + Thanks to Jan Klötzke</p> <p> Own Id: OTP-10188</p> </item> @@ -471,7 +471,7 @@ <item> <p> Fix the type spec from the doc of binary:part/3 (Thanks - to Ricardo Catalinas Jim�nez)</p> + to Ricardo Catalinas Jiménez)</p> <p> Own Id: OTP-9920</p> </item> @@ -3036,7 +3036,7 @@ It is now possible to hibernate a gen_server/gen_event/gen_fsm. In gen_server and gen_fsm, hibernation is triggered by returning the atom - 'hibernate'�instead of a timeout value. In the gen_event + 'hibernate' instead of a timeout value. In the gen_event case hibernation is triggered by a event handler returning a tuple with an extra element containing the atom 'hibernate'.</p> diff --git a/lib/stdlib/doc/src/notes_history.xml b/lib/stdlib/doc/src/notes_history.xml index 85997f1717..328855f6dd 100644 --- a/lib/stdlib/doc/src/notes_history.xml +++ b/lib/stdlib/doc/src/notes_history.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> <header> <copyright> - <year>2006</year><year>2009</year> + <year>2006</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/orddict.xml b/lib/stdlib/doc/src/orddict.xml index 319083d35b..b6aee7a7d6 100644 --- a/lib/stdlib/doc/src/orddict.xml +++ b/lib/stdlib/doc/src/orddict.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2000</year><year>2011</year> + <year>2000</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/ordsets.xml b/lib/stdlib/doc/src/ordsets.xml index 1e26fc2022..277c1c32ab 100644 --- a/lib/stdlib/doc/src/ordsets.xml +++ b/lib/stdlib/doc/src/ordsets.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/part.xml b/lib/stdlib/doc/src/part.xml index 25ca56ad86..5589d11e3e 100644 --- a/lib/stdlib/doc/src/part.xml +++ b/lib/stdlib/doc/src/part.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE part SYSTEM "part.dtd"> <part xmlns:xi="http://www.w3.org/2001/XInclude"> <header> <copyright> <year>1996</year> - <year>2009</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/part_notes.xml b/lib/stdlib/doc/src/part_notes.xml index 66ad294753..cdd35ac370 100644 --- a/lib/stdlib/doc/src/part_notes.xml +++ b/lib/stdlib/doc/src/part_notes.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE part SYSTEM "part.dtd"> <part xmlns:xi="http://www.w3.org/2001/XInclude"> <header> <copyright> - <year>2004</year><year>2009</year> + <year>2004</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/part_notes_history.xml b/lib/stdlib/doc/src/part_notes_history.xml index 5e055ee606..15e0a0f1d3 100644 --- a/lib/stdlib/doc/src/part_notes_history.xml +++ b/lib/stdlib/doc/src/part_notes_history.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE part SYSTEM "part.dtd"> <part> <header> <copyright> <year>2006</year> - <year>2011</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/pg.xml b/lib/stdlib/doc/src/pg.xml index c56db8c6e6..7cc1b805b4 100644 --- a/lib/stdlib/doc/src/pg.xml +++ b/lib/stdlib/doc/src/pg.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>1996</year> - <year>2011</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/pool.xml b/lib/stdlib/doc/src/pool.xml index 39a79e5dc5..1b903984f9 100644 --- a/lib/stdlib/doc/src/pool.xml +++ b/lib/stdlib/doc/src/pool.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/proc_lib.xml b/lib/stdlib/doc/src/proc_lib.xml index b597074044..5bf5744622 100644 --- a/lib/stdlib/doc/src/proc_lib.xml +++ b/lib/stdlib/doc/src/proc_lib.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/proplists.xml b/lib/stdlib/doc/src/proplists.xml index a0063a58d3..1655133b2b 100644 --- a/lib/stdlib/doc/src/proplists.xml +++ b/lib/stdlib/doc/src/proplists.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/qlc.xml b/lib/stdlib/doc/src/qlc.xml index ce50631ca9..8682936c08 100644 --- a/lib/stdlib/doc/src/qlc.xml +++ b/lib/stdlib/doc/src/qlc.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2004</year><year>2011</year> + <year>2004</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/queue.xml b/lib/stdlib/doc/src/queue.xml index 383f52d10d..bcf063bf0f 100644 --- a/lib/stdlib/doc/src/queue.xml +++ b/lib/stdlib/doc/src/queue.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/random.xml b/lib/stdlib/doc/src/random.xml index 1b8fa44883..e001058e19 100644 --- a/lib/stdlib/doc/src/random.xml +++ b/lib/stdlib/doc/src/random.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/re.xml b/lib/stdlib/doc/src/re.xml index 71a6e34513..1f8115ddc2 100644 --- a/lib/stdlib/doc/src/re.xml +++ b/lib/stdlib/doc/src/re.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>2007</year> - <year>2012</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/ref_man.xml b/lib/stdlib/doc/src/ref_man.xml index 0f277f6c5e..4ecd02a4bf 100644 --- a/lib/stdlib/doc/src/ref_man.xml +++ b/lib/stdlib/doc/src/ref_man.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE application SYSTEM "application.dtd"> <application xmlns:xi="http://www.w3.org/2001/XInclude"> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/sets.xml b/lib/stdlib/doc/src/sets.xml index 071ee437cb..4b220bdd85 100644 --- a/lib/stdlib/doc/src/sets.xml +++ b/lib/stdlib/doc/src/sets.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2000</year><year>2011</year> + <year>2000</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/shell.xml b/lib/stdlib/doc/src/shell.xml index 7f251c863e..3ca80ed900 100644 --- a/lib/stdlib/doc/src/shell.xml +++ b/lib/stdlib/doc/src/shell.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/shell_default.xml b/lib/stdlib/doc/src/shell_default.xml index f7e7d5388a..2355ba92f9 100644 --- a/lib/stdlib/doc/src/shell_default.xml +++ b/lib/stdlib/doc/src/shell_default.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>1996</year> - <year>2011</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/slave.xml b/lib/stdlib/doc/src/slave.xml index 15b6711731..f5d0436a20 100644 --- a/lib/stdlib/doc/src/slave.xml +++ b/lib/stdlib/doc/src/slave.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/sofs.xml b/lib/stdlib/doc/src/sofs.xml index 37c41501ae..6c97fd0bc0 100644 --- a/lib/stdlib/doc/src/sofs.xml +++ b/lib/stdlib/doc/src/sofs.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2001</year><year>2012</year> + <year>2001</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/specs.xml b/lib/stdlib/doc/src/specs.xml index 49c60529d2..213ce7563f 100644 --- a/lib/stdlib/doc/src/specs.xml +++ b/lib/stdlib/doc/src/specs.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <specs xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="../specs/specs_array.xml"/> <xi:include href="../specs/specs_base64.xml"/> diff --git a/lib/stdlib/doc/src/stdlib_app.xml b/lib/stdlib/doc/src/stdlib_app.xml index 2391bb6f03..de4cc65396 100644 --- a/lib/stdlib/doc/src/stdlib_app.xml +++ b/lib/stdlib/doc/src/stdlib_app.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE appref SYSTEM "appref.dtd"> <appref> diff --git a/lib/stdlib/doc/src/string.xml b/lib/stdlib/doc/src/string.xml index 549c871aed..c96cc95a44 100644 --- a/lib/stdlib/doc/src/string.xml +++ b/lib/stdlib/doc/src/string.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2012</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml index 3f36c58d24..612626540a 100644 --- a/lib/stdlib/doc/src/supervisor.xml +++ b/lib/stdlib/doc/src/supervisor.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2012</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/supervisor_bridge.xml b/lib/stdlib/doc/src/supervisor_bridge.xml index f6712d6c1d..d16b258b6c 100644 --- a/lib/stdlib/doc/src/supervisor_bridge.xml +++ b/lib/stdlib/doc/src/supervisor_bridge.xml @@ -1,11 +1,11 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> <year>1996</year> - <year>2011</year> + <year>2013</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml index 0ffc5bc433..ab8b380f49 100644 --- a/lib/stdlib/doc/src/sys.xml +++ b/lib/stdlib/doc/src/sys.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/timer.xml b/lib/stdlib/doc/src/timer.xml index 0c1e398dc4..eca9a72d36 100644 --- a/lib/stdlib/doc/src/timer.xml +++ b/lib/stdlib/doc/src/timer.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>1996</year><year>2011</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/unicode.xml b/lib/stdlib/doc/src/unicode.xml index deba6adb11..6f8a289432 100644 --- a/lib/stdlib/doc/src/unicode.xml +++ b/lib/stdlib/doc/src/unicode.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/doc/src/unicode_usage.xml b/lib/stdlib/doc/src/unicode_usage.xml index 1f64b38554..33cd70e0b7 100644 --- a/lib/stdlib/doc/src/unicode_usage.xml +++ b/lib/stdlib/doc/src/unicode_usage.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf8" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> diff --git a/lib/stdlib/doc/src/win32reg.xml b/lib/stdlib/doc/src/win32reg.xml index 99fd7fdeb6..8835f931b2 100644 --- a/lib/stdlib/doc/src/win32reg.xml +++ b/lib/stdlib/doc/src/win32reg.xml @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> <header> <copyright> - <year>2000</year><year>2011</year> + <year>2000</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> diff --git a/lib/stdlib/doc/src/zip.xml b/lib/stdlib/doc/src/zip.xml index 484bf0e080..66c21da193 100644 --- a/lib/stdlib/doc/src/zip.xml +++ b/lib/stdlib/doc/src/zip.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE erlref SYSTEM "erlref.dtd"> <erlref> diff --git a/lib/stdlib/src/beam_lib.erl b/lib/stdlib/src/beam_lib.erl index 121f9febed..1a7b7d5a5e 100644 --- a/lib/stdlib/src/beam_lib.erl +++ b/lib/stdlib/src/beam_lib.erl @@ -904,7 +904,7 @@ call_crypto_server(Req) -> end. call_crypto_server_1(Req) -> - gen_server:start({local,?CRYPTO_KEY_SERVER}, ?MODULE, [], []), + {ok, _} = gen_server:start({local,?CRYPTO_KEY_SERVER}, ?MODULE, [], []), erlang:yield(), call_crypto_server(Req). diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl index 6e96e3d564..fb6b8c8661 100644 --- a/lib/stdlib/src/c.erl +++ b/lib/stdlib/src/c.erl @@ -694,7 +694,7 @@ pwd() -> Dir :: file:name(). cd(Dir) -> - file:set_cwd(Dir), + _ = file:set_cwd(Dir), pwd(). %% ls() diff --git a/lib/stdlib/src/dets.erl b/lib/stdlib/src/dets.erl index 50812cc532..d743467e97 100644 --- a/lib/stdlib/src/dets.erl +++ b/lib/stdlib/src/dets.erl @@ -469,7 +469,7 @@ is_compatible_bchunk_format(Tab, Term) -> is_dets_file(FileName) -> case catch read_file_header(FileName, read, false) of {ok, Fd, FH} -> - file:close(Fd), + _ = file:close(Fd), FH#fileheader.cookie =:= ?MAGIC; {error, {tooshort, _}} -> false; @@ -1384,7 +1384,8 @@ do_apply_op(Op, From, Head, N) -> end, if From =/= self() -> - From ! {self(), {error, {dets_bug, Name, Op, Bad}}}; + From ! {self(), {error, {dets_bug, Name, Op, Bad}}}, + ok; true -> % auto_save | may_grow | {delayed_write, _} ok end, @@ -1634,7 +1635,8 @@ start_auto_save_timer(Head) when Head#head.auto_save =:= infinity -> ok; start_auto_save_timer(Head) -> Millis = Head#head.auto_save, - erlang:send_after(Millis, self(), ?DETS_CALL(self(), auto_save)). + _Ref = erlang:send_after(Millis, self(), ?DETS_CALL(self(), auto_save)), + ok. %% Version 9: Peek the message queue and try to evaluate several %% lookup requests in parallel. Evalute delete_object, delete and @@ -1683,7 +1685,7 @@ stream_end(Head, Pids0, C, N, Next) -> %% replies to delete and insert requests even if the %% latter requests were made before the lookup requests, %% which can be confusing.) - lookup_replies(Found), + _ = lookup_replies(Found), stream_end1(Pids0, Next, N, C, Head1, PwriteList); Head1 when is_record(Head1, head) -> stream_end2(Pids0, Pids0, Next, N, C, Head1, ok); @@ -1733,7 +1735,7 @@ lookup_replies(Q) -> lookup_replies(P, O, []) -> lookup_reply(P, O); lookup_replies(P, O, [{P2,O2} | L]) -> - lookup_reply(P, O), + _ = lookup_reply(P, O), lookup_replies(P2, lists:append(O2), L). %% If a list of Pid then op was {member, Key}. Inlined. @@ -1790,12 +1792,15 @@ fclose(Head) -> {Head1, Res} = perform_save(Head, false), case Head1#head.ram_file of true -> - ignore; + Res; false -> dets_utils:stop_disk_map(), - file:close(Head1#head.fptr) - end, - Res. + Res2 = file:close(Head1#head.fptr), + if + Res2 =:= ok -> Res; + true -> Res2 + end + end. %% -> {NewHead, Res} perform_save(Head, DoSync) when Head#head.update_mode =:= dirty; @@ -2002,7 +2007,7 @@ remove_fix(Head, Pid, How) -> end. do_stop(Head) -> - unlink_fixing_procs(Head), + _NewHead = unlink_fixing_procs(Head), fclose(Head). unlink_fixing_procs(Head) -> @@ -2010,7 +2015,7 @@ unlink_fixing_procs(Head) -> false -> Head; {_, Counters} -> - lists:map(fun({Pid, _Counter}) -> unlink(Pid) end, Counters), + lists:foreach(fun({Pid, _Counter}) -> unlink(Pid) end, Counters), Head#head{fixed = false, freelists = dets_utils:get_freelists(Head)} end. @@ -2021,8 +2026,9 @@ check_growth(Head) -> NoThings = no_things(Head), if NoThings > Head#head.next -> - erlang:send_after(200, self(), - ?DETS_CALL(self(), may_grow)); % Catch up. + _Ref = erlang:send_after + (200, self(), ?DETS_CALL(self(), may_grow)), % Catch up. + ok; true -> ok end. @@ -2123,7 +2129,7 @@ do_open_file([Fname, Verbose], Parent, Server, Ref) -> do_open_file([Tab, OpenArgs, Verb], Parent, Server, Ref) -> case catch fopen3(Tab, OpenArgs) of {error, {tooshort, _}} -> - file:delete(OpenArgs#open_args.file), + _ = file:delete(OpenArgs#open_args.file), do_open_file([Tab, OpenArgs, Verb], Parent, Server, Ref); {error, _Reason} = Error -> err(Error); @@ -2671,11 +2677,11 @@ fopen_init_file(Tab, OpenArgs) -> case catch Mod:initiate_file(Fd, Tab, Fname, Type, Kp, MinSlots, MaxSlots, Ram, CacheSz, Auto, true) of {error, Reason} when Ram -> - file:close(Fd), + _ = file:close(Fd), throw({error, Reason}); {error, Reason} -> - file:close(Fd), - file:delete(Fname), + _ = file:close(Fd), + _ = file:delete(Fname), throw({error, Reason}); {ok, Head} -> start_auto_save_timer(Head), @@ -2730,8 +2736,8 @@ compact(SourceHead) -> {ok, H} -> H; Error -> - file:close(Fd), - file:delete(Tmp), + _ = file:close(Fd), + _ = file:delete(Tmp), throw(Error) end, @@ -2748,12 +2754,12 @@ compact(SourceHead) -> if R =:= ok -> ok; true -> - file:delete(Tmp), + _ = file:delete(Tmp), throw(R) end; Err -> - file:close(Fd), - file:delete(Tmp), + _ = file:close(Fd), + _ = file:delete(Tmp), throw(Err) end. @@ -2777,7 +2783,7 @@ fsck(Fd, Tab, Fname, FH, MinSlotsArg, MaxSlotsArg, Version) -> BetterSlotNumbers = {MinSlots, BetterNoSlots, MaxSlots}, case fsck_try(Fd, Tab, FH, Fname, BetterSlotNumbers, Version) of {try_again, _} -> - file:close(Fd), + _ = file:close(Fd), {error, {cannot_repair, Fname}}; Else -> Else @@ -2818,15 +2824,15 @@ fsck_try(Fd, Tab, FH, Fname, SlotNumbers, Version) -> if R =:= ok -> ok; true -> - file:delete(Tmp), + _ = file:delete(Tmp), R end; TryAgainOrError -> - file:delete(Tmp), + _ = file:delete(Tmp), TryAgainOrError end; Error -> - file:close(Fd), + _ = file:close(Fd), Error end. @@ -2855,13 +2861,13 @@ fsck_try_est(Head, Fd, Fname, SlotNumbers, FH) -> Bulk = false, case Reply of {ok, NoDups, H1} -> - file:close(Fd), + _ = file:close(Fd), fsck_copy(SizeData, H1, Bulk, NoDups); {try_again, _} = Return -> close_files(Bulk, SizeData, Head), Return; Else -> - file:close(Fd), + _ = file:close(Fd), close_files(Bulk, SizeData, Head), Else end. @@ -2896,14 +2902,20 @@ fsck_copy1([SzData | L], Head, Bulk, NoDups) -> {LogSz, Pos, {FileName, Fd}, NoObjects} = SzData, Size = if NoObjects =:= 0 -> 0; true -> ?POW(LogSz-1) end, ExpectedSize = Size * NoObjects, - close_tmp(Fd), - case file:position(Out, Pos) of - {ok, Pos} -> ok; - PError -> dets_utils:file_error(FileName, PError) + case close_tmp(Fd) of + ok -> ok; + Err -> + close_files(Bulk, L, Head), + dets_utils:file_error(FileName, Err) end, - {ok, Pos} = file:position(Out, Pos), + case file:position(Out, Pos) of + {ok, Pos} -> ok; + Err2 -> + close_files(Bulk, L, Head), + dets_utils:file_error(Head#head.filename, Err2) + end, CR = file:copy({FileName, [raw,binary]}, Out), - file:delete(FileName), + _ = file:delete(FileName), case CR of {ok, Copied} when Copied =:= ExpectedSize; NoObjects =:= 0 -> % the segments @@ -2937,11 +2949,11 @@ free_n_objects(Head, Addr, Size, N) -> free_n_objects(NewHead, NewAddr, Size, N-1). close_files(false, SizeData, Head) -> - file:close(Head#head.fptr), + _ = file:close(Head#head.fptr), close_files(true, SizeData, Head); close_files(true, SizeData, _Head) -> Fun = fun({_Size, _Pos, {FileName, Fd}, _No}) -> - close_tmp(Fd), + _ = close_tmp(Fd), file:delete(FileName); (_) -> ok @@ -3261,7 +3273,7 @@ err(Error) -> file_info(FileName) -> case catch read_file_header(FileName, read, false) of {ok, Fd, FH} -> - file:close(Fd), + _ = file:close(Fd), (FH#fileheader.mod):file_info(FH); Other -> Other @@ -3290,7 +3302,7 @@ view(FileName) -> X -> X end - after file:close(Fd) + after _ = file:close(Fd) end; X -> X diff --git a/lib/stdlib/src/dets_server.erl b/lib/stdlib/src/dets_server.erl index 931112088e..268c201047 100644 --- a/lib/stdlib/src/dets_server.erl +++ b/lib/stdlib/src/dets_server.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -241,8 +241,8 @@ ensure_started() -> init() -> set_verbose(verbose_flag()), process_flag(trap_exit, true), - ets:new(?REGISTRY, [set, named_table]), - ets:new(?OWNERS, [set, named_table]), + ?REGISTRY = ets:new(?REGISTRY, [set, named_table]), + ?OWNERS = ets:new(?OWNERS, [set, named_table]), ets:new(?STORE, [duplicate_bag]). verbose_flag() -> @@ -338,7 +338,7 @@ handle_close(State, Req, {FromPid,_Tag}=From, Tab) -> [{Tab, _Counter, Pid}] -> do_unlink(Store, FromPid), true = ets:match_delete(Store, {FromPid, Tab}), - [true = ets:insert(Store, K) || K <- Keep], + true = ets:insert(Store, Keep), ets:update_counter(?REGISTRY, Tab, -1), pending_call(Tab, Pid, make_ref(), From, [], remove_user, State) diff --git a/lib/stdlib/src/dets_utils.erl b/lib/stdlib/src/dets_utils.erl index 7bbb34dd15..6c176ad513 100644 --- a/lib/stdlib/src/dets_utils.erl +++ b/lib/stdlib/src/dets_utils.erl @@ -230,8 +230,12 @@ write_file(Head, Bin) -> {ok, Fd} -> R1 = file:write(Fd, Bin), R2 = file:sync(Fd), - file:close(Fd), - if R1 =:= ok -> R2; true -> R1 end; + R3 = file:close(Fd), + case {R1, R2, R3} of + {ok, ok, R3} -> R3; + {ok, R2, _} -> R2; + {R1, _, _} -> R1 + end; Else -> Else end, @@ -277,12 +281,7 @@ open(FileSpec, Args) -> end. truncate(Fd, FileName, Pos) -> - if - Pos =:= cur -> - ok; - true -> - position(Fd, FileName, Pos) - end, + _ = [position(Fd, FileName, Pos) || Pos =/= cur], case file:truncate(Fd) of ok -> ok; @@ -327,10 +326,10 @@ pread_close(Fd, FileName, Pos, Size) -> {error, Error} -> file_error_close(Fd, FileName, {error, Error}); {ok, Bin} when byte_size(Bin) < Size -> - file:close(Fd), + _ = file:close(Fd), throw({error, {tooshort, FileName}}); eof -> - file:close(Fd), + _ = file:close(Fd), throw({error, {tooshort, FileName}}); OK -> OK end. @@ -339,7 +338,7 @@ file_error(FileName, {error, Reason}) -> throw({error, {file_error, FileName, Reason}}). file_error_close(Fd, FileName, {error, Reason}) -> - file:close(Fd), + _ = file:close(Fd), throw({error, {file_error, FileName, Reason}}). debug_mode() -> @@ -977,7 +976,8 @@ dm([{P,<<Sz:32,X:32>>} | Bs], T) -> true = ets:insert(T, {P,{pointer,X,Sz}}), if Sz =:= 0 -> - X = 0; + X = 0, + true; true -> true = ets:insert(T, {{pointer,X}, P}) end, diff --git a/lib/stdlib/src/dets_v8.erl b/lib/stdlib/src/dets_v8.erl index 24d6e06ec8..f188502017 100644 --- a/lib/stdlib/src/dets_v8.erl +++ b/lib/stdlib/src/dets_v8.erl @@ -199,10 +199,10 @@ %% -> ok | throw({NewHead,Error}) mark_dirty(Head) -> Dirty = [{?CLOSED_PROPERLY_POS, <<?NOT_PROPERLY_CLOSED:32>>}], - dets_utils:pwrite(Head, Dirty), - dets_utils:sync(Head), - dets_utils:position(Head, Head#head.freelists_p), - dets_utils:truncate(Head, cur). + {_NewHead, ok} = dets_utils:pwrite(Head, Dirty), + ok = dets_utils:sync(Head), + {ok, _Pos} = dets_utils:position(Head, Head#head.freelists_p), + ok = dets_utils:truncate(Head, cur). %% -> {ok, head()} | throw(Error) initiate_file(Fd, Tab, Fname, Type, Kp, MinSlots, MaxSlots, diff --git a/lib/stdlib/src/dets_v9.erl b/lib/stdlib/src/dets_v9.erl index 308f81c23b..2af93ec800 100644 --- a/lib/stdlib/src/dets_v9.erl +++ b/lib/stdlib/src/dets_v9.erl @@ -284,9 +284,9 @@ %% -> ok | throw({NewHead,Error}) mark_dirty(Head) -> Dirty = [{?CLOSED_PROPERLY_POS, <<?NOT_PROPERLY_CLOSED:32>>}], - dets_utils:pwrite(Head, Dirty), - dets_utils:sync(Head), - dets_utils:position(Head, Head#head.freelists_p), + {_H, ok} = dets_utils:pwrite(Head, Dirty), + ok = dets_utils:sync(Head), + {ok, _Pos} = dets_utils:position(Head, Head#head.freelists_p), dets_utils:truncate(Head, cur). %% -> {ok, head()} | throw(Error) | throw(badarg) @@ -1385,13 +1385,13 @@ segment_file(SizeT, Head, FileData, SegEnd) -> case Data of {InFile,In0} -> {OutFile, Out} = temp_file(Head, SizeT, I), - file:close(In0), + _ = file:close(In0), {ok, In} = dets_utils:open(InFile, [raw,binary,read]), {ok, 0} = dets_utils:position(In, InFile, bof), seg_file(SegAddr, SegAddr, In, InFile, Out, OutFile, SizeT, SegEnd), - file:close(In), - file:delete(InFile), + _ = file:close(In), + _ = file:delete(InFile), {OutFile,Out}; Objects -> {LastAddr, B} = seg_file(Objects, SegAddr, SegAddr, SizeT, []), @@ -1702,7 +1702,7 @@ free_list_to_file(Ftab, H, Pos, Sz, Ws, WsSz) -> free_list_to_file(Ftab, H, Pos+1, Sz, NWs, NWsSz). free_lists_from_file(H, Pos) -> - dets_utils:position(H#head.fptr, H#head.filename, Pos), + {ok, Pos} = dets_utils:position(H#head.fptr, H#head.filename, Pos), FL = dets_utils:empty_free_lists(), case catch bin_to_tree([], H, start, FL, -1, []) of {'EXIT', _} -> diff --git a/lib/stdlib/src/dict.erl b/lib/stdlib/src/dict.erl index 4f8d45dc8d..e3bfb6c2e2 100644 --- a/lib/stdlib/src/dict.erl +++ b/lib/stdlib/src/dict.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2012. All Rights Reserved. +%% Copyright Ericsson AB 2000-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/src/digraph_utils.erl b/lib/stdlib/src/digraph_utils.erl index 807b5c12a1..0e248df453 100644 --- a/lib/stdlib/src/digraph_utils.erl +++ b/lib/stdlib/src/digraph_utils.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2012. All Rights Reserved. +%% Copyright Ericsson AB 1999-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -370,5 +370,5 @@ condense('$end_of_table', _T, _SC, _G, _SCG, _I2C) -> condense(I, T, SC, G, SCG, I2C) -> [{_,C}] = ets:lookup(I2C, I), digraph:add_vertex(SCG, C), - [digraph:add_edge(SCG, SC, C) || C =/= SC], + _ = [digraph:add_edge(SCG, SC, C) || C =/= SC], condense(ets:next(T, I), T, SC, G, SCG, I2C). diff --git a/lib/stdlib/src/edlin.erl b/lib/stdlib/src/edlin.erl index 3192879f09..6318c229be 100644 --- a/lib/stdlib/src/edlin.erl +++ b/lib/stdlib/src/edlin.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl index d1d060ebc8..dd0512be4d 100644 --- a/lib/stdlib/src/epp.erl +++ b/lib/stdlib/src/epp.erl @@ -219,7 +219,7 @@ parse_file(Epp) -> [{eof,Location}] end. --define(DEFAULT_ENCODING, latin1). +-define(DEFAULT_ENCODING, utf8). -spec default_encoding() -> source_encoding(). @@ -644,7 +644,7 @@ leave_file(From, St) -> enter_file_reply(From, OldName, CurrLoc, CurrLoc), case OldName2 =:= OldName of true -> - From; + ok; false -> NFrom = wait_request(NextSt), enter_file_reply(NFrom, OldName2, OldLoc, diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl index d988a4d8c7..4ba6dd01fa 100644 --- a/lib/stdlib/src/erl_scan.erl +++ b/lib/stdlib/src/erl_scan.erl @@ -1,4 +1,3 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% diff --git a/lib/stdlib/src/erl_tar.erl b/lib/stdlib/src/erl_tar.erl index 4b654833ed..f49c2a64f4 100644 --- a/lib/stdlib/src/erl_tar.erl +++ b/lib/stdlib/src/erl_tar.erl @@ -45,10 +45,7 @@ open(Name, Mode) -> open1({binary,Bin}, read, _Raw, Opts) -> case file:open(Bin, [ram,binary,read]) of {ok,File} -> - case Opts of - [compressed] -> ram_file:uncompress(File); - [] -> ok - end, + _ = [ram_file:uncompress(File) || Opts =:= [compressed]], {ok,{read,File}}; Error -> Error diff --git a/lib/stdlib/src/error_logger_tty_h.erl b/lib/stdlib/src/error_logger_tty_h.erl index ad5891f191..e92142d154 100644 --- a/lib/stdlib/src/error_logger_tty_h.erl +++ b/lib/stdlib/src/error_logger_tty_h.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -54,7 +54,7 @@ init([]) -> handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() -> {ok, State}; handle_event(Event, State) -> - write_event(tag_event(Event),io), + ok = write_event(tag_event(Event),io), {ok, State}. handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) -> @@ -66,10 +66,10 @@ handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) -> PrevHandler, go_back} end; handle_info({emulator, GL, Chars}, State) when node(GL) == node() -> - write_event(tag_event({emulator, GL, Chars}),io), + ok = write_event(tag_event({emulator, GL, Chars}),io), {ok, State}; handle_info({emulator, noproc, Chars}, State) -> - write_event(tag_event({emulator, noproc, Chars}),io), + ok = write_event(tag_event({emulator, noproc, Chars}),io), {ok, State}; handle_info(_, State) -> {ok, State}. @@ -99,10 +99,11 @@ set_group_leader() -> tag_event(Event) -> {erlang:universaltime(), Event}. +%% IOMOd is always 'io' write_events(Events,IOMod) -> write_events1(lists:reverse(Events),IOMod). write_events1([Event|Es],IOMod) -> - write_event(Event,IOMod), + ok = write_event(Event,IOMod), write_events1(Es,IOMod); write_events1([],_IOMod) -> ok. diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl index fea718541d..35f6dff57e 100644 --- a/lib/stdlib/src/escript.erl +++ b/lib/stdlib/src/escript.erl @@ -771,9 +771,11 @@ interpret(Forms, HasRecs, File, Args) -> ArgsA = erl_parse:abstract(Args, 0), Call = {call,0,{atom,0,main},[ArgsA]}, try - erl_eval:expr(Call, - erl_eval:new_bindings(), - {value,fun(I, J) -> code_handler(I, J, Dict, File) end}), + _ = erl_eval:expr(Call, + erl_eval:new_bindings(), + {value,fun(I, J) -> + code_handler(I, J, Dict, File) + end}), my_halt(0) catch Class:Reason -> diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl index 77c8029f59..f05bfd12a7 100644 --- a/lib/stdlib/src/ets.erl +++ b/lib/stdlib/src/ets.erl @@ -719,7 +719,7 @@ tab2file(Tab, File) -> tab2file(Tab, File, Options) -> try {ok, FtOptions} = parse_ft_options(Options), - file:delete(File), + _ = file:delete(File), case file:read_file_info(File) of {error, enoent} -> ok; _ -> throw(eaccess) @@ -750,14 +750,18 @@ tab2file(Tab, File, Options) -> {fun(Oldstate,Termlist) -> {NewState,BinList} = md5terms(Oldstate,Termlist), - disk_log:blog_terms(Name,BinList), - NewState + case disk_log:blog_terms(Name,BinList) of + ok -> NewState; + {error, Reason2} -> throw(Reason2) + end end, erlang:md5_init()}; false -> {fun(_,Termlist) -> - disk_log:log_terms(Name,Termlist), - true + case disk_log:log_terms(Name,Termlist) of + ok -> true; + {error, Reason2} -> throw(Reason2) + end end, true} end, @@ -792,16 +796,16 @@ tab2file(Tab, File, Options) -> disk_log:close(Name) catch throw:TReason -> - disk_log:close(Name), - file:delete(File), + _ = disk_log:close(Name), + _ = file:delete(File), throw(TReason); exit:ExReason -> - disk_log:close(Name), - file:delete(File), + _ = disk_log:close(Name), + _ = file:delete(File), exit(ExReason); error:ErReason -> - disk_log:close(Name), - file:delete(File), + _ = disk_log:close(Name), + _ = file:delete(File), erlang:raise(error,ErReason,erlang:get_stacktrace()) end catch @@ -892,25 +896,32 @@ file2tab(File, Opts) -> try {ok,Verify,TabArg} = parse_f2t_opts(Opts,false,[]), Name = make_ref(), - {ok, Major, Minor, FtOptions, MD5State, FullHeader, DLContext} = + {ok, Name} = case disk_log:open([{name, Name}, {file, File}, {mode, read_only}]) of {ok, Name} -> - get_header_data(Name,Verify); + {ok, Name}; {repaired, Name, _,_} -> %Uh? cannot happen? case Verify of true -> - disk_log:close(Name), + _ = disk_log:close(Name), throw(badfile); false -> - get_header_data(Name,Verify) + {ok, Name} end; {error, Other1} -> throw({read_error, Other1}); Other2 -> throw(Other2) end, + {ok, Major, Minor, FtOptions, MD5State, FullHeader, DLContext} = + try get_header_data(Name, Verify) + catch + badfile -> + _ = disk_log:close(Name), + throw(badfile) + end, try if Major > ?MAJOR_F2T_VERSION -> @@ -974,7 +985,7 @@ file2tab(File, Opts) -> erlang:raise(error,ErReason,erlang:get_stacktrace()) end after - disk_log:close(Name) + _ = disk_log:close(Name) end catch throw:TReason2 -> @@ -1293,20 +1304,30 @@ named_table(false) -> []. tabfile_info(File) when is_list(File) ; is_atom(File) -> try Name = make_ref(), - {ok, Major, Minor, _FtOptions, _MD5State, FullHeader, _DLContext} = + {ok, Name} = case disk_log:open([{name, Name}, {file, File}, {mode, read_only}]) of {ok, Name} -> - get_header_data(Name,false); + {ok, Name}; {repaired, Name, _,_} -> %Uh? cannot happen? - get_header_data(Name,false); + {ok, Name}; {error, Other1} -> throw({read_error, Other1}); Other2 -> throw(Other2) end, - disk_log:close(Name), + {ok, Major, Minor, _FtOptions, _MD5State, FullHeader, _DLContext} = + try get_header_data(Name, false) + catch + badfile -> + _ = disk_log:close(Name), + throw(badfile) + end, + case disk_log:close(Name) of + ok -> ok; + {error, Reason} -> throw(Reason) + end, {value, N} = lists:keysearch(name, 1, FullHeader), {value, Type} = lists:keysearch(type, 1, FullHeader), {value, P} = lists:keysearch(protection, 1, FullHeader), diff --git a/lib/stdlib/src/file_sorter.erl b/lib/stdlib/src/file_sorter.erl index 2bf88959b7..687d72b4bd 100644 --- a/lib/stdlib/src/file_sorter.erl +++ b/lib/stdlib/src/file_sorter.erl @@ -547,7 +547,7 @@ files(_I, L, _LSz, #w{seq = 1, out = Out}=W, []) -> NW = close_input(W1), outfun(close, NW); Out -> - write_run(L, W, Out), + _ = write_run(L, W, Out), ok end; files(_I, L, _LSz, W, []) -> @@ -638,7 +638,7 @@ last_merge(R, W) when length(R) =< W#w.no_files -> NW = close_input(W2), outfun(close, NW); Out -> - merge_files(R, W, Out), + _ = merge_files(R, W, Out), ok end; last_merge(R, W) -> @@ -1110,10 +1110,12 @@ read_fun2(Fd, Bin, Size, FileName, Owner) -> end. close_read_fun(Fd, _FileName, user) -> - file:close(Fd); + _ = file:close(Fd), + ok; close_read_fun(Fd, FileName, fsort) -> - file:close(Fd), - file:delete(FileName). + _ = file:close(Fd), + _ = file:delete(FileName), + ok. read_objs(Fd, FileName, I, L, Bin0, Size0, LSz, W) -> Max = erlang:max(Size0, ?CHUNKSIZE), @@ -1481,10 +1483,10 @@ cleanup(W) -> F = fun(IFun) when is_function(IFun) -> IFun(close); ({Fd,FileName}) -> - file:close(Fd), - file:delete(FileName); + _ = file:close(Fd), + _= file:delete(FileName); (FileName) -> - file:delete(FileName) + _= file:delete(FileName) end, lists:foreach(F, W1#w.temp). @@ -1502,8 +1504,12 @@ close_out(_) -> close_file(Fd, W) -> {Fd, FileName} = lists:keyfind(Fd, 1, W#w.temp), ?DEBUG("closing ~tp~n", [FileName]), - file:close(Fd), - W#w{temp = [FileName | lists:keydelete(Fd, 1, W#w.temp)]}. + case file:close(Fd) of + ok -> + W#w{temp = [FileName | lists:keydelete(Fd, 1, W#w.temp)]}; + Error -> + file_error(FileName, Error, W) + end. %%% %%% Format 'term'. @@ -1536,10 +1542,10 @@ file_rterms2(Fd, L, LSz, FileName, Files) when LSz < ?CHUNKSIZE -> B = term_to_binary(Term), file_rterms2(Fd, [B | L], LSz + byte_size(B), FileName, Files); eof -> - file:close(Fd), + _ = file:close(Fd), {lists:reverse(L), file_rterms(no_file, Files)}; _Error -> - file:close(Fd), + _ = file:close(Fd), {error, {bad_term, FileName}} end; file_rterms2(Fd, L, _LSz, FileName, Files) -> @@ -1568,7 +1574,7 @@ write_terms(Fd, F, [B | Bs], Args) -> ok -> write_terms(Fd, F, Bs, Args); {error, Reason} -> - file:close(Fd), + _ = file:close(Fd), {error, {file_error, F, Reason}} end; write_terms(Fd, F, [], Args) -> diff --git a/lib/stdlib/src/filelib.erl b/lib/stdlib/src/filelib.erl index 42ef3679a2..42885bcdcf 100644 --- a/lib/stdlib/src/filelib.erl +++ b/lib/stdlib/src/filelib.erl @@ -231,7 +231,7 @@ ensure_dir(F) -> %% Protect against infinite loop {error,einval}; false -> - ensure_dir(Dir), + _ = ensure_dir(Dir), case file:make_dir(Dir) of {error,eexist}=EExist -> case do_is_dir(Dir, file) of diff --git a/lib/stdlib/src/gb_sets.erl b/lib/stdlib/src/gb_sets.erl index ba35a7170a..237317ac94 100644 --- a/lib/stdlib/src/gb_sets.erl +++ b/lib/stdlib/src/gb_sets.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2012. All Rights Reserved. +%% Copyright Ericsson AB 2001-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/src/gb_trees.erl b/lib/stdlib/src/gb_trees.erl index de0c239e26..7a4dfe1a0b 100644 --- a/lib/stdlib/src/gb_trees.erl +++ b/lib/stdlib/src/gb_trees.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2012. All Rights Reserved. +%% Copyright Ericsson AB 2001-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/src/gen_fsm.erl b/lib/stdlib/src/gen_fsm.erl index d9411e58cf..e9654322f1 100644 --- a/lib/stdlib/src/gen_fsm.erl +++ b/lib/stdlib/src/gen_fsm.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -549,7 +549,7 @@ handle_msg(Msg, Parent, Name, StateName, StateData, Mod, _Time, Debug) -> {stop, Reason, Reply, NStateData} when From =/= undefined -> {'EXIT', R} = (catch terminate(Reason, Name, Msg, Mod, StateName, NStateData, Debug)), - reply(Name, From, Reply, Debug, StateName), + _ = reply(Name, From, Reply, Debug, StateName), exit(R); {'EXIT', What} -> terminate(What, Name, Msg, Mod, StateName, StateData, Debug); diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl index 30a81ade49..4a16ed120f 100644 --- a/lib/stdlib/src/gen_server.erl +++ b/lib/stdlib/src/gen_server.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -623,7 +623,7 @@ handle_msg({'$gen_call', From, Msg}, Parent, Name, State, Mod, Debug) -> {stop, Reason, Reply, NState} -> {'EXIT', R} = (catch terminate(Reason, Name, Msg, Mod, NState, Debug)), - reply(Name, From, Reply, NState, Debug), + _ = reply(Name, From, Reply, NState, Debug), exit(R); Other -> handle_common_reply(Other, Parent, Name, Msg, Mod, State, Debug) diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl index a9b6d4131e..7c4c2742bc 100644 --- a/lib/stdlib/src/io_lib.erl +++ b/lib/stdlib/src/io_lib.erl @@ -1,4 +1,3 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% diff --git a/lib/stdlib/src/log_mf_h.erl b/lib/stdlib/src/log_mf_h.erl index 19b555a48c..6b42363979 100644 --- a/lib/stdlib/src/log_mf_h.erl +++ b/lib/stdlib/src/log_mf_h.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -135,7 +135,12 @@ handle_event(Event, State) -> State#state{cur_fd = NewFd, curF = NewF, curB = 0} end, [Hi,Lo] = put_int16(Size), - file:write(NewState#state.cur_fd, [Hi, Lo, Bin]), + case file:write(NewState#state.cur_fd, [Hi, Lo, Bin]) of + ok -> + ok; + {error, Reason} -> + exit({file_exit, Reason}) + end, {ok, NewState#state{curB = NewState#state.curB + Size + 2}}; _ -> {ok, State} @@ -174,7 +179,7 @@ file_open(Dir, FileNo) -> write_index_file(Dir, FileNo), {ok, Fd}; _ -> - exit({file, open}) + exit(file_open) end. put_int16(I) -> @@ -211,7 +216,7 @@ write_index_file(Dir, Index) -> ok = file:close(Fd), ok = file:rename(TmpFile,File), ok; - _ -> exit(open_index_file) + _ -> exit(write_index_file) end. inc(N, Max) -> diff --git a/lib/stdlib/src/pool.erl b/lib/stdlib/src/pool.erl index a5eb191ab2..dfe6318dea 100644 --- a/lib/stdlib/src/pool.erl +++ b/lib/stdlib/src/pool.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2011. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -63,7 +63,7 @@ start(Name) -> Args :: string(), Nodes :: [node()]. start(Name, Args) when is_atom(Name) -> - gen_server:start({global, pool_master}, pool, [], []), + _ = gen_server:start({global, pool_master}, pool, [], []), Hosts = net_adm:host_file(), Nodes = start_nodes(Hosts, Name, Args), lists:foreach(fun attach/1, Nodes), diff --git a/lib/stdlib/src/sets.erl b/lib/stdlib/src/sets.erl index e6f05b71d4..ebf011a7d9 100644 --- a/lib/stdlib/src/sets.erl +++ b/lib/stdlib/src/sets.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2000-2012. All Rights Reserved. +%% Copyright Ericsson AB 2000-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl index c6c706c3a7..0d2fc47d13 100644 --- a/lib/stdlib/src/shell.erl +++ b/lib/stdlib/src/shell.erl @@ -58,7 +58,7 @@ start(NoCtrlG) -> start(NoCtrlG, false). start(NoCtrlG, StartSync) -> - code:ensure_loaded(user_default), + _ = code:ensure_loaded(user_default), spawn(fun() -> server(NoCtrlG, StartSync) end). %% Find the pid of the current evaluator process. @@ -677,8 +677,10 @@ exprs([E0|Es], Bs1, RT, Lf, Ef, Bs0, W) -> if Es =:= [] -> VS = pp(V0, 1, RT), - [io:requests([{put_chars, unicode, VS}, nl]) || - W =:= cmd], + case W of + cmd -> io:requests([{put_chars, unicode, VS}, nl]); + pmt -> ok + end, %% Don't send the result back if it will be %% discarded anyway. V = if diff --git a/lib/stdlib/src/stdlib.appup.src b/lib/stdlib/src/stdlib.appup.src index 55c8087475..4c828e4434 100644 --- a/lib/stdlib/src/stdlib.appup.src +++ b/lib/stdlib/src/stdlib.appup.src @@ -1,7 +1,7 @@ %% -*- erlang -*- %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2011. All Rights Reserved. +%% Copyright Ericsson AB 1999-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -17,11 +17,11 @@ %% %CopyrightEnd% {"%VSN%", %% Up from - max two major revisions back - [{<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 - {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15 - {<<"1\\.17(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R14 + [{<<"1\\.20(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17 + {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 + {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R15 %% Down to - max two major revisions back - [{<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 - {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R15 - {<<"1\\.17(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R14 + [{<<"1\\.20(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17 + {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16 + {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R15 }. diff --git a/lib/stdlib/src/string.erl b/lib/stdlib/src/string.erl index 4ed27ff4eb..0675afb877 100644 --- a/lib/stdlib/src/string.erl +++ b/lib/stdlib/src/string.erl @@ -1,4 +1,3 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl index 54328cd9ff..d18387568d 100644 --- a/lib/stdlib/src/supervisor.erl +++ b/lib/stdlib/src/supervisor.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -260,7 +260,7 @@ init_children(State, StartSpec) -> {ok, NChildren} -> {ok, State#state{children = NChildren}}; {error, NChildren, Reason} -> - terminate_children(NChildren, SupName), + _ = terminate_children(NChildren, SupName), {stop, {shutdown, Reason}} end; Error -> @@ -752,10 +752,16 @@ restart(Child, State) -> Id = if ?is_simple(State) -> Child#child.pid; true -> Child#child.name end, - timer:apply_after(0,?MODULE,try_again_restart,[self(),Id]), + {ok, _TRef} = timer:apply_after(0, + ?MODULE, + try_again_restart, + [self(),Id]), {ok,NState2}; {try_again, NState2, #child{name=ChName}} -> - timer:apply_after(0,?MODULE,try_again_restart,[self(),ChName]), + {ok, _TRef} = timer:apply_after(0, + ?MODULE, + try_again_restart, + [self(),ChName]), {ok,NState2}; Other -> Other @@ -850,7 +856,7 @@ terminate_children(Children, SupName) -> %% we do want them to be shut down as many functions from this module %% use this function to just clear everything. terminate_children([Child = #child{restart_type=temporary} | Children], SupName, Res) -> - do_terminate(Child, SupName), + _ = do_terminate(Child, SupName), terminate_children(Children, SupName, Res); terminate_children([Child | Children], SupName, Res) -> NChild = do_terminate(Child, SupName), @@ -1008,7 +1014,7 @@ wait_dynamic_children(_Child, _Pids, 0, undefined, EStack) -> wait_dynamic_children(_Child, _Pids, 0, TRef, EStack) -> %% If the timer has expired before its cancellation, we must empty the %% mail-box of the 'timeout'-message. - erlang:cancel_timer(TRef), + _ = erlang:cancel_timer(TRef), receive {timeout, TRef, kill} -> EStack diff --git a/lib/stdlib/src/sys.erl b/lib/stdlib/src/sys.erl index bffeb44179..04f8dfb61b 100644 --- a/lib/stdlib/src/sys.erl +++ b/lib/stdlib/src/sys.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -317,10 +317,10 @@ handle_system_msg(Msg, From, Parent, Mod, Debug, Misc, Hib) -> handle_system_msg(SysState, Msg, From, Parent, Mod, Debug, Misc, Hib) -> case do_cmd(SysState, Msg, Parent, Mod, Debug, Misc) of {suspended, Reply, NDebug, NMisc} -> - gen:reply(From, Reply), + _ = gen:reply(From, Reply), suspend_loop(suspended, Parent, Mod, NDebug, NMisc, Hib); {running, Reply, NDebug, NMisc} -> - gen:reply(From, Reply), + _ = gen:reply(From, Reply), Mod:system_continue(Parent, NDebug, NMisc) end. diff --git a/lib/stdlib/src/timer.erl b/lib/stdlib/src/timer.erl index e11fb046e9..72a2dd9616 100644 --- a/lib/stdlib/src/timer.erl +++ b/lib/stdlib/src/timer.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2011. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -258,7 +258,7 @@ ensure_started() -> undefined -> C = {timer_server, {?MODULE, start_link, []}, permanent, 1000, worker, [?MODULE]}, - supervisor:start_child(kernel_safe_sup, C), % kernel_safe_sup + _ = supervisor:start_child(kernel_safe_sup, C), ok; _ -> ok end. diff --git a/lib/stdlib/test/base64_SUITE.erl b/lib/stdlib/test/base64_SUITE.erl index b28df94221..b0da6408ff 100644 --- a/lib/stdlib/test/base64_SUITE.erl +++ b/lib/stdlib/test/base64_SUITE.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2007-2012. All Rights Reserved. +%% Copyright Ericsson AB 2007-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/test/binary_module_SUITE.erl b/lib/stdlib/test/binary_module_SUITE.erl index 9b6f628aa9..d6886ba1e5 100644 --- a/lib/stdlib/test/binary_module_SUITE.erl +++ b/lib/stdlib/test/binary_module_SUITE.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2012. All Rights Reserved. +%% Copyright Ericsson AB 1997-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/test/erl_eval_SUITE.erl b/lib/stdlib/test/erl_eval_SUITE.erl index 18ec17a4bf..7ceef727f1 100644 --- a/lib/stdlib/test/erl_eval_SUITE.erl +++ b/lib/stdlib/test/erl_eval_SUITE.erl @@ -1,4 +1,3 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% diff --git a/lib/stdlib/test/erl_pp_SUITE.erl b/lib/stdlib/test/erl_pp_SUITE.erl index ff3470349e..70688907b8 100644 --- a/lib/stdlib/test/erl_pp_SUITE.erl +++ b/lib/stdlib/test/erl_pp_SUITE.erl @@ -1082,7 +1082,7 @@ otp_10820(Config) when is_list(Config) -> C1 = <<"%% coding: utf-8\n -module(any).">>, ok = do_otp_10820(Config, C1, "+pc latin1"), ok = do_otp_10820(Config, C1, "+pc unicode"), - C2 = <<"-module(any).">>, + C2 = <<"%% coding: latin-1\n -module(any).">>, ok = do_otp_10820(Config, C2, "+pc latin1"), ok = do_otp_10820(Config, C2, "+pc unicode"). diff --git a/lib/stdlib/test/erl_scan_SUITE.erl b/lib/stdlib/test/erl_scan_SUITE.erl index 361abbb771..e628f7248d 100644 --- a/lib/stdlib/test/erl_scan_SUITE.erl +++ b/lib/stdlib/test/erl_scan_SUITE.erl @@ -1,4 +1,3 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% @@ -1065,8 +1064,8 @@ otp_10302(Config) when is_list(Config) -> {string,0,"str"} = erl_parse:abstract("str"), {cons,0, {integer,0,$a}, - {cons,0,{integer,0,1024},{string,0,"c"}}} = - erl_parse:abstract("a"++[1024]++"c"), + {cons,0,{integer,0,55296},{string,0,"c"}}} = + erl_parse:abstract("a"++[55296]++"c"), Line = 17, {integer,Line,1} = erl_parse:abstract(1, Line), @@ -1081,8 +1080,8 @@ otp_10302(Config) when is_list(Config) -> {string,Line,"str"} = erl_parse:abstract("str", Line), {cons,Line, {integer,Line,$a}, - {cons,Line,{integer,Line,1024},{string,Line,"c"}}} = - erl_parse:abstract("a"++[1024]++"c", Line), + {cons,Line,{integer,Line,55296},{string,Line,"c"}}} = + erl_parse:abstract("a"++[55296]++"c", Line), Opts1 = [{line,17}], {integer,Line,1} = erl_parse:abstract(1, Opts1), @@ -1097,8 +1096,8 @@ otp_10302(Config) when is_list(Config) -> {string,Line,"str"} = erl_parse:abstract("str", Opts1), {cons,Line, {integer,Line,$a}, - {cons,Line,{integer,Line,1024},{string,Line,"c"}}} = - erl_parse:abstract("a"++[1024]++"c", Opts1), + {cons,Line,{integer,Line,55296},{string,Line,"c"}}} = + erl_parse:abstract("a"++[55296]++"c", Opts1), [begin {integer,Line,1} = erl_parse:abstract(1, Opts2), diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl index bd69019892..85bd82a854 100644 --- a/lib/stdlib/test/ets_SUITE.erl +++ b/lib/stdlib/test/ets_SUITE.erl @@ -33,7 +33,7 @@ -export([ match1/1, match2/1, match_object/1, match_object2/1]). -export([ dups/1, misc1/1, safe_fixtable/1, info/1, tab2list/1]). -export([ tab2file/1, tab2file2/1, tabfile_ext1/1, - tabfile_ext2/1, tabfile_ext3/1, tabfile_ext4/1]). + tabfile_ext2/1, tabfile_ext3/1, tabfile_ext4/1, badfile/1]). -export([ heavy_lookup/1, heavy_lookup_element/1, heavy_concurrent/1]). -export([ lookup_element_mult/1]). -export([]). @@ -171,7 +171,7 @@ groups() -> [misc1, safe_fixtable, info, dups, tab2list]}, {files, [], [tab2file, tab2file2, tabfile_ext1, - tabfile_ext2, tabfile_ext3, tabfile_ext4]}, + tabfile_ext2, tabfile_ext3, tabfile_ext4, badfile]}, {heavy, [], [heavy_lookup, heavy_lookup_element, heavy_concurrent]}, {fold, [], @@ -4202,7 +4202,56 @@ tabfile_ext4(Config) when is_list(Config) -> file:delete(FName), ok. +badfile(suite) -> + []; +badfile(doc) -> + ["Tests that no disk_log is left open when file has been corrupted"]; +badfile(Config) when is_list(Config) -> + PrivDir = ?config(priv_dir,Config), + File = filename:join(PrivDir, "badfile"), + _ = file:delete(File), + T = ets:new(table, []), + true = ets:insert(T, [{a,1},{b,2}]), + ok = ets:tab2file(T, File, []), + true = ets:delete(T), + [H0 | Ts ] = get_all_terms(l, File), + H1 = tuple_to_list(H0), + H2 = [{K,V} || {K,V} <- H1, K =/= protection], + H = list_to_tuple(H2), + ok = file:delete(File), + write_terms(l, File, [H | Ts]), + %% All mandatory keys are no longer members of the header + {error, badfile} = ets:file2tab(File), + {error, badfile} = ets:tabfile_info(File), + file:delete(File), + {[],[]} = disk_log:accessible_logs(), + ok. + +get_all_terms(Log, File) -> + {ok, Log} = disk_log:open([{name,Log}, + {file, File}, + {mode, read_only}]), + Ts = get_all_terms(Log), + ok = disk_log:close(Log), + Ts. + +get_all_terms(Log) -> + get_all_terms1(Log, start, []). + +get_all_terms1(Log, Cont, Res) -> + case disk_log:chunk(Log, Cont) of + {error, _R} -> + throw(fel); + {Cont2, Terms} -> + get_all_terms1(Log, Cont2, Res ++ Terms); + eof -> + Res + end. +write_terms(Log, File, Terms) -> + {ok, Log} = disk_log:open([{name,Log},{file, File},{mode,read_write}]), + ok = disk_log:log(Log, Terms), + ok = disk_log:close(Log). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl index 9f828c6d2d..5a8971c071 100644 --- a/lib/stdlib/test/io_SUITE.erl +++ b/lib/stdlib/test/io_SUITE.erl @@ -1,4 +1,3 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% diff --git a/lib/stdlib/test/qlc_SUITE.erl b/lib/stdlib/test/qlc_SUITE.erl index a9ea78a58b..5f9244b479 100644 --- a/lib/stdlib/test/qlc_SUITE.erl +++ b/lib/stdlib/test/qlc_SUITE.erl @@ -2544,7 +2544,7 @@ info(Config) when is_list(Config) -> ets:delete(E)">>, <<"Q1 = qlc:q([W || W <- [a,b]]), - Q2 = qlc:q([Z || Z <- qlc:sort([1,2,300])], unique), + Q2 = qlc:q([Z || Z <- qlc:sort([55296,56296,57296])], unique), Q3 = qlc:q([{X,Y} || X <- qlc:keysort([2], [{1,a}]), Y <- qlc:append([Q1, Q2]), X > Y]), @@ -2552,7 +2552,7 @@ info(Config) when is_list(Config) -> [{generate, P1, {list, [{1,a}]}}, {generate, P2, {append, [{list, [a,b]}, {qlc, T2, [{generate, P3, - {sort, {list,[1,2,300]},[]}}], + {sort, {list,[55296,56296,57296]},[]}}], [{cache,ets},{unique,true}]}]}},F], []} = i(Q3, cache_all), {tuple, _, [{var,_,'X'}, {var,_,'Y'}]} = binary_to_term(T1), @@ -2562,7 +2562,7 @@ info(Config) when is_list(Config) -> {var, _, 'Z'} = binary_to_term(T2), {op, _, '>', {var, _, 'X'}, {var, _, 'Y'}} = binary_to_term(F), true = binary_to_list(<< - \"beginV1=qlc:q([Z||Z<-qlc:sort([1,2,300],[])],[{unique,true}]),\" + \"beginV1=qlc:q([Z||Z<-qlc:sort([55296,56296,57296],[])],[{unique,true}]),\" \"qlc:q([{X,Y}||X<-[{1,a}],Y<-qlc:append([[a,b],V1]),X>Y])end\" >>) == format_info(Q3, true)">>, @@ -6607,12 +6607,12 @@ otp_7232(Config) when is_list(Config) -> {nil,_}]} = qlc:info(qlc:sort(L),{format,abstract_code})">>, - <<"Q1 = qlc:q([X || X <- [1000,2000]]), + <<"Q1 = qlc:q([X || X <- [55296,56296]]), Q = qlc:sort(Q1, {order, fun(A,B)-> A>B end}), - \"qlc:sort([1000,2000],[{order,fun'-function/0-fun-2-'/2}])\" = + \"qlc:sort([55296,56296],[{order,fun'-function/0-fun-2-'/2}])\" = format_info(Q, true), AC = qlc:info(Q, {format, abstract_code}), - \"qlc:sort([1000,2000], [{order,fun '-function/0-fun-2-'/2}])\" = + \"qlc:sort([55296,56296], [{order,fun '-function/0-fun-2-'/2}])\" = binary_to_list(iolist_to_binary(erl_pp:expr(AC)))">>, %% OTP-7234. erl_parse:abstract() handles bit strings diff --git a/lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl b/lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl index b93b907392..56c998f761 100644 --- a/lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl +++ b/lib/stdlib/test/qlc_SUITE_data/join_info_compat.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2011. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/test/re_SUITE.erl b/lib/stdlib/test/re_SUITE.erl index 500f5fadb9..c05674b4f8 100644 --- a/lib/stdlib/test/re_SUITE.erl +++ b/lib/stdlib/test/re_SUITE.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2012. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/test/re_testoutput1_replacement_test.erl b/lib/stdlib/test/re_testoutput1_replacement_test.erl index 8f8d8762ad..30ebab277a 100644 --- a/lib/stdlib/test/re_testoutput1_replacement_test.erl +++ b/lib/stdlib/test/re_testoutput1_replacement_test.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2012. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/test/re_testoutput1_split_test.erl b/lib/stdlib/test/re_testoutput1_split_test.erl index 4fc85b95c0..0a7f54f2dc 100644 --- a/lib/stdlib/test/re_testoutput1_split_test.erl +++ b/lib/stdlib/test/re_testoutput1_split_test.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2012. All Rights Reserved. +%% Copyright Ericsson AB 2008-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl index 3c49aaa103..233ba0764f 100644 --- a/lib/stdlib/test/shell_SUITE.erl +++ b/lib/stdlib/test/shell_SUITE.erl @@ -1,4 +1,3 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% @@ -2601,9 +2600,9 @@ otp_7232(doc) -> "OTP-7232. qlc:info() bug."; otp_7232(suite) -> []; otp_7232(Config) when is_list(Config) -> - Info = <<"qlc:info(qlc:sort(qlc:q([X || X <- [1000,2000]]), " + Info = <<"qlc:info(qlc:sort(qlc:q([X || X <- [55296,56296]]), " "{order, fun(A,B)-> A>B end})).">>, - "qlc:sort([1000,2000],\n" + "qlc:sort([55296,56296],\n" " [{order,\n" " fun(A, B) ->\n" " A > B\n" diff --git a/lib/stdlib/test/string_SUITE.erl b/lib/stdlib/test/string_SUITE.erl index 96e653985f..fccd1bef95 100644 --- a/lib/stdlib/test/string_SUITE.erl +++ b/lib/stdlib/test/string_SUITE.erl @@ -1,8 +1,7 @@ -%% -*- coding: utf-8 -*- %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2012. All Rights Reserved. +%% Copyright Ericsson AB 2004-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/stdlib/vsn.mk b/lib/stdlib/vsn.mk index fbb838c686..c9d596f737 100644 --- a/lib/stdlib/vsn.mk +++ b/lib/stdlib/vsn.mk @@ -1 +1 @@ -STDLIB_VSN = 1.19.2 +STDLIB_VSN = 1.20 |