aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/doc')
-rw-r--r--lib/stdlib/doc/src/beam_lib.xml152
-rw-r--r--lib/stdlib/doc/src/epp.xml26
-rw-r--r--lib/stdlib/doc/src/erl_lint.xml8
-rw-r--r--lib/stdlib/doc/src/erl_parse.xml26
-rw-r--r--lib/stdlib/doc/src/file_sorter.xml14
-rw-r--r--lib/stdlib/doc/src/gb_sets.xml8
-rw-r--r--lib/stdlib/doc/src/gb_trees.xml8
-rw-r--r--lib/stdlib/doc/src/io.xml11
-rw-r--r--lib/stdlib/doc/src/lists.xml17
-rw-r--r--lib/stdlib/doc/src/proplists.xml9
-rw-r--r--lib/stdlib/doc/src/re.xml2
-rw-r--r--lib/stdlib/doc/src/shell.xml41
-rw-r--r--lib/stdlib/doc/src/sofs.xml17
-rw-r--r--lib/stdlib/doc/src/stdlib_app.xml34
-rw-r--r--lib/stdlib/doc/src/supervisor.xml44
-rw-r--r--lib/stdlib/doc/src/unicode.xml4
-rw-r--r--lib/stdlib/doc/src/unicode_usage.xml6
17 files changed, 265 insertions, 162 deletions
diff --git a/lib/stdlib/doc/src/beam_lib.xml b/lib/stdlib/doc/src/beam_lib.xml
index f2a9c2a671..b9286f1402 100644
--- a/lib/stdlib/doc/src/beam_lib.xml
+++ b/lib/stdlib/doc/src/beam_lib.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>beam_lib</title>
@@ -70,82 +70,88 @@
using <seealso marker="#strip/1">strip/1</seealso>,
<seealso marker="#strip_files/1">strip_files/1</seealso> and/or
<seealso marker="#strip_release/1">strip_release/1</seealso>.</p>
- <p><em>Reconstructing source code</em></p>
- <p>Here is an example of how to reconstruct source code from
- the debug information in a BEAM file <c>Beam</c>:</p>
- <code type="none">
+ <section>
+ <title>Reconstructing source code</title>
+ <p>Here is an example of how to reconstruct source code from
+ the debug information in a BEAM file <c>Beam</c>:</p>
+ <code type="none">
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(Beam,[abstract_code]).
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).</code>
- <p><em>Encrypted debug information</em></p>
- <p>The debug information can be encrypted in order to keep
- the source code secret, but still being able to use tools such as
- Xref or Debugger. </p>
- <p>To use encrypted debug information, a key must be provided to
- the compiler and <c>beam_lib</c>. The key is given as a string and
- it is recommended that it contains at least 32 characters and
- that both upper and lower case letters as well as digits and
- special characters are used.</p>
- <p></p>
- <p>The default type -- and currently the only type -- of crypto
- algorithm is <c>des3_cbc</c>, three rounds of DES. The key string
- will be scrambled using <c>erlang:md5/1</c> to generate
- the actual keys used for <c>des3_cbc</c>.</p>
- <note>
- <p>As far as we know by the time of writing, it is
- infeasible to break <c>des3_cbc</c> encryption without any
- knowledge of the key. Therefore, as long as the key is kept
- safe and is unguessable, the encrypted debug information
- <em>should</em> be safe from intruders.</p>
- </note>
- <p>There are two ways to provide the key:</p>
- <list type="ordered">
- <item>
- <p>Use the compiler option <c>{debug_info,Key}</c>, see
- <seealso marker="compiler:compile#debug_info_key">compile(3)</seealso>,
- and the function
- <seealso marker="#crypto_key_fun/1">crypto_key_fun/1</seealso>
- to register a fun which returns the key whenever
- <c>beam_lib</c> needs to decrypt the debug information.</p>
- <p>If no such fun is registered, <c>beam_lib</c> will instead
- search for a <c>.erlang.crypt</c> file, see below.</p>
- </item>
- <item>
- <p>Store the key in a text file named <c>.erlang.crypt</c>.</p>
- <p>In this case, the compiler option <c>encrypt_debug_info</c>
- can be used, see
- <seealso marker="compiler:compile#encrypt_debug_info">compile(3)</seealso>.</p>
- </item>
- </list>
- <p><em>.erlang.crypt</em></p>
- <p><c>beam_lib</c> searches for <c>.erlang.crypt</c> in the current
- directory and then the home directory for the current user. If
- the file is found and contains a key, <c>beam_lib</c> will
- implicitly create a crypto key fun and register it.</p>
- <p>The <c>.erlang.crypt</c> file should contain a single list of
- tuples:</p>
- <code type="none">
+ </section>
+ <section>
+ <title>Encrypted debug information</title>
+ <p>The debug information can be encrypted in order to keep
+ the source code secret, but still being able to use tools such as
+ Xref or Debugger. </p>
+ <p>To use encrypted debug information, a key must be provided to
+ the compiler and <c>beam_lib</c>. The key is given as a string and
+ it is recommended that it contains at least 32 characters and
+ that both upper and lower case letters as well as digits and
+ special characters are used.</p>
+ <p></p>
+ <p>The default type -- and currently the only type -- of crypto
+ algorithm is <c>des3_cbc</c>, three rounds of DES. The key string
+ will be scrambled using <c>erlang:md5/1</c> to generate
+ the actual keys used for <c>des3_cbc</c>.</p>
+ <note>
+ <p>As far as we know by the time of writing, it is
+ infeasible to break <c>des3_cbc</c> encryption without any
+ knowledge of the key. Therefore, as long as the key is kept
+ safe and is unguessable, the encrypted debug information
+ <em>should</em> be safe from intruders.</p>
+ </note>
+ <p>There are two ways to provide the key:</p>
+ <list type="ordered">
+ <item>
+ <p>Use the compiler option <c>{debug_info,Key}</c>, see
+ <seealso marker="compiler:compile#debug_info_key">compile(3)</seealso>,
+ and the function
+ <seealso marker="#crypto_key_fun/1">crypto_key_fun/1</seealso>
+ to register a fun which returns the key whenever
+ <c>beam_lib</c> needs to decrypt the debug information.</p>
+ <p>If no such fun is registered, <c>beam_lib</c> will instead
+ search for a <c>.erlang.crypt</c> file, see below.</p>
+ </item>
+ <item>
+ <p>Store the key in a text file named <c>.erlang.crypt</c>.</p>
+ <p>In this case, the compiler option <c>encrypt_debug_info</c>
+ can be used, see
+ <seealso marker="compiler:compile#encrypt_debug_info">compile(3)</seealso>.</p>
+ </item>
+ </list>
+ </section>
+ <section>
+ <title>.erlang.crypt</title>
+ <p><c>beam_lib</c> searches for <c>.erlang.crypt</c> in the current
+ directory and then the home directory for the current user. If
+ the file is found and contains a key, <c>beam_lib</c> will
+ implicitly create a crypto key fun and register it.</p>
+ <p>The <c>.erlang.crypt</c> file should contain a single list of
+ tuples:</p>
+ <code type="none">
{debug_info, Mode, Module, Key}</code>
- <p><c>Mode</c> is the type of crypto algorithm; currently, the only
- allowed value thus is <c>des3_cbc</c>. <c>Module</c> is either an
- atom, in which case <c>Key</c> will only be used for the module
- <c>Module</c>, or <c>[]</c>, in which case <c>Key</c> will be
- used for all modules. <c>Key</c> is the non-empty key string.</p>
- <p>The <c>Key</c> in the first tuple where both <c>Mode</c> and
- <c>Module</c> matches will be used.</p>
- <p>Here is an example of an <c>.erlang.crypt</c> file that returns
- the same key for all modules:</p>
- <code type="none"><![CDATA[
+ <p><c>Mode</c> is the type of crypto algorithm; currently, the only
+ allowed value thus is <c>des3_cbc</c>. <c>Module</c> is either an
+ atom, in which case <c>Key</c> will only be used for the module
+ <c>Module</c>, or <c>[]</c>, in which case <c>Key</c> will be
+ used for all modules. <c>Key</c> is the non-empty key string.</p>
+ <p>The <c>Key</c> in the first tuple where both <c>Mode</c> and
+ <c>Module</c> matches will be used.</p>
+ <p>Here is an example of an <c>.erlang.crypt</c> file that returns
+ the same key for all modules:</p>
+ <code type="none"><![CDATA[
[{debug_info, des3_cbc, [], "%>7}|pc/DM6Cga*68$Mw]L#&_Gejr]G^"}].]]></code>
- <p>And here is a slightly more complicated example of an
- <c>.erlang.crypt</c> which provides one key for the module
- <c>t</c>, and another key for all other modules:</p>
- <code type="none"><![CDATA[
+ <p>And here is a slightly more complicated example of an
+ <c>.erlang.crypt</c> which provides one key for the module
+ <c>t</c>, and another key for all other modules:</p>
+ <code type="none"><![CDATA[
[{debug_info, des3_cbc, t, "My KEY"},
{debug_info, des3_cbc, [], "%>7}|pc/DM6Cga*68$Mw]L#&_Gejr]G^"}].]]></code>
- <note>
- <p>Do not use any of the keys in these examples. Use your own
- keys.</p>
- </note>
+ <note>
+ <p>Do not use any of the keys in these examples. Use your own
+ keys.</p>
+ </note>
+ </section>
</section>
<section>
diff --git a/lib/stdlib/doc/src/epp.xml b/lib/stdlib/doc/src/epp.xml
index 455d9dc124..e6b48b270a 100644
--- a/lib/stdlib/doc/src/epp.xml
+++ b/lib/stdlib/doc/src/epp.xml
@@ -4,23 +4,21 @@
<erlref>
<header>
<copyright>
- <year>1996</year>
- <year>2007</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
+ <year>1996</year><year>2010</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
- 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
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
+ 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
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
- The Initial Developer of the Original Code is Ericsson AB.
</legalnotice>
<title>epp</title>
@@ -112,7 +110,7 @@
<p>A string which describes the error is obtained with the following call:
</p>
<code type="none">
-apply(Module, format_error, ErrorDescriptor) </code>
+ Module:format_error(ErrorDescriptor) </code>
</section>
<section>
diff --git a/lib/stdlib/doc/src/erl_lint.xml b/lib/stdlib/doc/src/erl_lint.xml
index e339f484cc..6a7d37765c 100644
--- a/lib/stdlib/doc/src/erl_lint.xml
+++ b/lib/stdlib/doc/src/erl_lint.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>erl_lint</title>
@@ -147,7 +147,7 @@
<p>A string which describes the error is obtained with the following call:
</p>
<code type="none">
-apply(Module, format_error, ErrorDescriptor) </code>
+ Module:format_error(ErrorDescriptor) </code>
</section>
<section>
diff --git a/lib/stdlib/doc/src/erl_parse.xml b/lib/stdlib/doc/src/erl_parse.xml
index 739fde7a40..ae8a8afd5c 100644
--- a/lib/stdlib/doc/src/erl_parse.xml
+++ b/lib/stdlib/doc/src/erl_parse.xml
@@ -4,23 +4,21 @@
<erlref>
<header>
<copyright>
- <year>1996</year>
- <year>2007</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
+ <year>1996</year><year>2010</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
- 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
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
+ 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
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
- The Initial Developer of the Original Code is Ericsson AB.
</legalnotice>
<title>erl_parse</title>
@@ -188,7 +186,7 @@
<p>A string which describes the error is obtained with the following call:
</p>
<code type="none">
-apply(Module, format_error, ErrorDescriptor) </code>
+ Module:format_error(ErrorDescriptor) </code>
</section>
<section>
diff --git a/lib/stdlib/doc/src/file_sorter.xml b/lib/stdlib/doc/src/file_sorter.xml
index b3f4da294c..ccb32659a0 100644
--- a/lib/stdlib/doc/src/file_sorter.xml
+++ b/lib/stdlib/doc/src/file_sorter.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>file_sorter</title>
@@ -83,13 +83,15 @@
An ordering function is antisymmetric, transitive and total.
<c>Fun(A,&nbsp;B)</c> should return <c>true</c> if <c>A</c>
comes before <c>B</c> in the ordering, <c>false</c> otherwise.
+ An example of a typical ordering function is less than or equal
+ to, <c>=&lt;/2</c>.
Using an ordering function will slow down the sort
considerably. The <c>keysort</c>, <c>keymerge</c> and
<c>keycheck</c> functions do not accept ordering functions.
</item>
<item><c>{unique, bool()}</c>. When sorting or merging files,
- only the first of a sequence of terms that compare equal is
- output if this option is set to <c>true</c>. The default
+ only the first of a sequence of terms that compare equal (<c>==</c>)
+ is output if this option is set to <c>true</c>. The default
value is <c>false</c> which implies that all terms that
compare equal are output. When checking files for
sortedness, a check that no pair of consecutive terms
@@ -301,7 +303,7 @@ Value = Term</pre>
<desc>
<p>Sorts tuples on files. The sort is performed on the
element(s) mentioned in <c>KeyPos</c>. If two tuples
- compare equal on one element, next element according to
+ compare equal (<c>==</c>) on one element, next element according to
<c>KeyPos</c> is compared. The sort is stable.
</p>
<p><c>keysort(N, FileName)</c> is equivalent to
diff --git a/lib/stdlib/doc/src/gb_sets.xml b/lib/stdlib/doc/src/gb_sets.xml
index accec623b9..60d8bcbfa3 100644
--- a/lib/stdlib/doc/src/gb_sets.xml
+++ b/lib/stdlib/doc/src/gb_sets.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>gb_sets</title>
@@ -34,6 +34,8 @@
General Balanced Trees. This can be much more efficient than
using ordered lists, for larger sets, but depends on the
application.</p>
+ <p>This module considers two elements as different if and only if
+ they do not compare equal (<c>==</c>).</p>
</description>
<section>
diff --git a/lib/stdlib/doc/src/gb_trees.xml b/lib/stdlib/doc/src/gb_trees.xml
index 2bf18138c0..94f40c28bd 100644
--- a/lib/stdlib/doc/src/gb_trees.xml
+++ b/lib/stdlib/doc/src/gb_trees.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>gb_trees</title>
@@ -34,6 +34,8 @@
Balanced Trees. These have no storage overhead compared to
unbalanced binary trees, and their performance is in general
better than AVL trees.</p>
+ <p>This module considers two keys as different if and only if
+ they do not compare equal (<c>==</c>).</p>
</description>
<section>
diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
index c075f11792..efbb1fc078 100644
--- a/lib/stdlib/doc/src/io.xml
+++ b/lib/stdlib/doc/src/io.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>io</title>
@@ -1003,7 +1003,8 @@ enter><input>bar.</input>
<title>Standard Error</title>
<p>In certain situations, especially when the standard output is redirected, access to an io_server() specific for error messages might be convenient. The io_device 'standard_error' can be used to direct output to whatever the current operating system considers a suitable device for error output. Example on a Unix-like operating system:</p>
<pre>
-$ <input>erl -noshell -noinput -eval 'io:format(standard_error,"Error: ~s~n",["error 11"]),init:stop().' > /dev/null</input>
+$ <input>erl -noshell -noinput -eval 'io:format(standard_error,"Error: ~s~n",["error 11"]),'\</input>
+<input>'init:stop().' > /dev/null</input>
Error: error 11</pre>
@@ -1020,7 +1021,7 @@ Error: error 11</pre>
<p>A string which describes the error is obtained with the following
call:</p>
<code type="none">
-apply(Module, format_error, ErrorDescriptor)</code>
+Module:format_error(ErrorDescriptor)</code>
</section>
</erlref>
diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml
index 39fc05420d..855a7e0244 100644
--- a/lib/stdlib/doc/src/lists.xml
+++ b/lib/stdlib/doc/src/lists.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>lists</title>
@@ -30,15 +30,16 @@
<module>lists</module>
<modulesummary>List Processing Functions</modulesummary>
<description>
- <p>This module contains functions for list processing. The functions
- are organized in two groups: those in the first group perform a
- particular operation on one or more lists, whereas those in the
- second group are higher-order functions, using a fun as argument
- to perform an operation on one list.</p>
+ <p>This module contains functions for list processing.</p>
+
<p>Unless otherwise stated, all functions assume that position
numbering starts at 1. That is, the first element of a list is at
position 1.</p>
+ <p>Two terms <c>T1</c> and <c>T2</c> compare equal if
+ <c>T1&nbsp;==&nbsp;T2</c> evaluates to <c>true</c>. They match
+ if <c>T1&nbsp;=:=&nbsp;T2</c> evaluates to <c>true</c>.</p>
+
<p>Whenever an <marker
id="ordering_function"></marker><em>ordering function</em>
<c>F</c> is expected as argument, it is assumed that the
diff --git a/lib/stdlib/doc/src/proplists.xml b/lib/stdlib/doc/src/proplists.xml
index a218dcf1fe..9f1c5b24ad 100644
--- a/lib/stdlib/doc/src/proplists.xml
+++ b/lib/stdlib/doc/src/proplists.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2002</year><year>2009</year>
+ <year>2002</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>proplists</title>
@@ -44,6 +44,9 @@
such as options passed to a function where a user may specify options
overriding the default settings, object properties, annotations,
etc.</p>
+ <p>Two keys are considered equal if they match (<c>=:=</c>). In other
+ words, numbers are compared literally rather than by value, so that,
+ for instance, <c>1</c> and <c>1.0</c> are different keys.</p>
</description>
<funcs>
<func>
diff --git a/lib/stdlib/doc/src/re.xml b/lib/stdlib/doc/src/re.xml
index e9a32a59d4..4d2a0e0995 100644
--- a/lib/stdlib/doc/src/re.xml
+++ b/lib/stdlib/doc/src/re.xml
@@ -592,7 +592,7 @@ This option makes it possible to include comments inside complicated patterns. N
<v>NLSpec = cr | crlf | lf | anycrlf | any </v>
<v>SplitList = [ RetData ] | [ GroupedRetData ]</v>
<v>GroupedRetData = [ RetData ]</v>
- <v>RetData = iodata() charlist() | binary() | list()</v>
+ <v>RetData = iodata() | charlist() | binary() | list()</v>
</type>
<desc>
<p>This function splits the input into parts by finding tokens
diff --git a/lib/stdlib/doc/src/shell.xml b/lib/stdlib/doc/src/shell.xml
index b8fc64f45e..73cc1b33bd 100644
--- a/lib/stdlib/doc/src/shell.xml
+++ b/lib/stdlib/doc/src/shell.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>shell</title>
@@ -739,6 +739,28 @@ loop(N) ->
returns <c>{error,Reason}</c>.</item>
</list>
</section>
+
+ <section>
+ <title>Prompting</title>
+ <p>The default shell prompt function displays the name of the node
+ (if the node can be part of a distributed system) and the
+ current command number. The user can customize the prompt
+ function by calling
+ <c>shell:prompt_func/1</c> or by setting the application
+ configuration parameter <c>shell_prompt_func</c> for the
+ application STDLIB.</p>
+ <p>A customized prompt function is stated as a tuple
+ <c>{Mod,&nbsp;Func}</c>. The function is called as
+ <c>Mod:Func(L)</c>, where <c>L</c> is a list of key-value pairs
+ created by the shell. Currently there is only one pair:
+ <c>{history, N}</c>, where N is the current command number. The
+ function should return a list of characters or an atom. This
+ constraint is due to the Erlang I/O-protocol. Unicode characters
+ beyond codepoint 255 are allowed in the list. Note
+ that in restricted mode the call <c>Mod:Func(L)</c> must be
+ allowed or the default shell prompt function will be called.</p>
+ </section>
+
<funcs>
<func>
<name>history(N) -> integer()</name>
@@ -782,6 +804,19 @@ loop(N) ->
</desc>
</func>
<func>
+ <name>prompt_func(PromptFunc) -> prompt_func()</name>
+ <fsummary>Sets the shell prompt</fsummary>
+ <type>
+ <v>PromptFunc = prompt_func()</v>
+ <v>prompt_func() = default | {Mod, Func}</v>
+ <v>Mod = Func = atom()</v>
+ </type>
+ <desc>
+ <p>Sets the shell prompt function to <c>PromptFunc</c>. The
+ previous prompt function is returned.</p>
+ </desc>
+ </func>
+ <func>
<name>start_restricted(Module) -> ok | {error, Reason}</name>
<fsummary>Exits a normal shell and starts a restricted shell.</fsummary>
<type>
diff --git a/lib/stdlib/doc/src/sofs.xml b/lib/stdlib/doc/src/sofs.xml
index ac434ec5b7..8c8ae51262 100644
--- a/lib/stdlib/doc/src/sofs.xml
+++ b/lib/stdlib/doc/src/sofs.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>sofs</title>
@@ -311,7 +311,7 @@
applying Fun to the type of the given set), and that Fun does
nothing but selecting, duplicating or rearranging parts of the
elements. Specifying a SetFun as an integer I is equivalent to
- specifying <c>{external, fun(X)&nbsp;-> element(I,&nbsp;X)}</c>,
+ specifying <c>{external, fun(X)&nbsp;-> element(I,&nbsp;X)&nbsp;end}</c>,
but is to be preferred since it makes it possible to handle this
case even more efficiently. Examples of SetFuns:</p>
<pre>
@@ -336,6 +336,7 @@ fun(S) -> sofs:partition(1, S) end
<c>badarg</c>, <c>bad_function</c>, or <c>type_mismatch</c>
message when given badly formed arguments or sets the types of
which are not compatible.</p>
+ <p>When comparing external sets the operator <c>==/2</c> is used.</p>
<p><em>Types</em></p>
<pre>
anyset() = -&nbsp;an unordered, ordered or atomic set&nbsp;-
@@ -1108,7 +1109,13 @@ type() = -&nbsp;a type&nbsp;- </pre>
<desc>
<p>Returns <c>true</c> if the AnySet1 and AnySet2
are <seealso marker="#equal">equal</seealso>, <c>false</c>
- otherwise.</p>
+ otherwise. This example shows that <c>==/2</c> is used when
+ comparing sets for equality:</p>
+ <pre>
+1> <input>S1 = sofs:set([1.0]),</input>
+<input>S2 = sofs:set([1]),</input>
+<input>sofs:is_equal(S1, S2).</input>
+true</pre>
</desc>
</func>
<func>
diff --git a/lib/stdlib/doc/src/stdlib_app.xml b/lib/stdlib/doc/src/stdlib_app.xml
index da046b8a8d..a615c1bf88 100644
--- a/lib/stdlib/doc/src/stdlib_app.xml
+++ b/lib/stdlib/doc/src/stdlib_app.xml
@@ -4,23 +4,21 @@
<appref>
<header>
<copyright>
- <year>2005</year>
- <year>2007</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
+ <year>2005</year><year>2010</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
- 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
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
+ 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
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
- The Initial Developer of the Original Code is Ericsson AB.
</legalnotice>
<title>STDLIB</title>
@@ -63,6 +61,16 @@
<p>This parameter can be used to determine how many
commands are saved by the Erlang shell.</p>
</item>
+ <tag><c>shell_prompt_func = {Mod, Func} | default</c></tag>
+ <item>
+ <p>where</p>
+ <list type="bulleted">
+ <item><c>Mod = atom()</c></item>
+ <item><c>Func = atom()</c></item>
+ </list>
+ <p>This parameter can be used to set a customized
+ Erlang shell prompt function.</p>
+ </item>
<tag><c>shell_saved_results = integer() >= 0</c></tag>
<item>
<p>This parameter can be used to determine how many
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index adf9d24eae..c696434d49 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>supervisor</title>
@@ -402,9 +402,12 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
<v>&nbsp;Module = atom()</v>
</type>
<desc>
- <p>Returns a list with information about all child
+ <p>Returns a newly created list with information about all child
specifications and child processes belonging to
the supervisor <c>SupRef</c>.</p>
+ <p>Note that calling this function when supervising a large
+ number of children under low memory conditions can cause an
+ out of memory exception.</p>
<p>See <c>start_child/2</c> for a description of <c>SupRef</c>.</p>
<p>The information given for each child specification/process
is:</p>
@@ -428,6 +431,39 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
</desc>
</func>
<func>
+ <name>count_children(SupRef) -> PropListOfCounts</name>
+ <fsummary>Return counts for the number of childspecs, active children, supervisors and workers.</fsummary>
+ <type>
+ <v>SupRef = Name | {Name,Node} | {global,Name} | pid()</v>
+ <v>&nbsp;Name = Node = atom()</v>
+ <v>PropListOfCounts = [{specs, ChildSpecCount}, {active, ActiveProcessCount}, {supervisors, ChildSupervisorCount}, {workers, ChildWorkerCount}]</v>
+ </type>
+ <desc>
+ <p>Returns a property list (see <c>proplists</c>) containing the
+ counts for each of the following elements of the supervisor's
+ child specifications and managed processes:</p>
+ <list type="bulleted">
+ <item>
+ <p><c>specs</c> - the total count of children, dead or alive.</p>
+ </item>
+ <item>
+ <p><c>active</c> - the count of all actively running child processes
+ managed by this supervisor.</p>
+ </item>
+ <item>
+ <p><c>supervisors</c> - the count of all children marked as
+ child_type = supervisor in the spec list, whether or not the
+ child process is still alive.</p>
+ </item>
+ <item>
+ <p><c>workers</c> - the count of all children marked as
+ child_type = worker in the spec list, whether or not the child
+ process is still alive.</p>
+ </item>
+ </list>
+ </desc>
+ </func>
+ <func>
<name>check_childspecs([ChildSpec]) -> Result</name>
<fsummary>Check if children specifications are syntactically correct.</fsummary>
<type>
diff --git a/lib/stdlib/doc/src/unicode.xml b/lib/stdlib/doc/src/unicode.xml
index b3aad51591..60edd8ade9 100644
--- a/lib/stdlib/doc/src/unicode.xml
+++ b/lib/stdlib/doc/src/unicode.xml
@@ -51,7 +51,9 @@ charlist() = [unicode_char() | unicode_binary() | charlist()]
a unicode_binary is allowed as the tail of the list</code>
<code type="none">
-external_unicode_binary() = binary() with characters coded in a user specified Unicode encoding other than UTF-8 (UTF-16 or UTF-32)
+external_unicode_binary() = binary()
+ with characters coded in a user specified Unicode encoding other
+ than UTF-8 (UTF-16 or UTF-32)
external_chardata() = external_charlist() | external_unicode_binary()
diff --git a/lib/stdlib/doc/src/unicode_usage.xml b/lib/stdlib/doc/src/unicode_usage.xml
index 06347b3aae..c5bf10b63d 100644
--- a/lib/stdlib/doc/src/unicode_usage.xml
+++ b/lib/stdlib/doc/src/unicode_usage.xml
@@ -76,7 +76,8 @@ charlist() = [unicode_char() | unicode_binary() | charlist()]
a unicode_binary is allowed as the tail of the list</code>
<p>The module <c>unicode</c> in stdlib even supports similar mixes with binaries containing other encodings than UTF-8, but that is a special case to allow for conversions to and from external data:</p>
<code type="none">
-external_unicode_binary() = binary() with characters coded in a user specified Unicode encoding other than UTF-8 (UTF-16 or UTF-32)
+external_unicode_binary() = binary() with characters coded in a user specified Unicode
+ encoding other than UTF-8 (UTF-16 or UTF-32)
external_chardata() = external_charlist() | external_unicode_binary()
@@ -93,7 +94,8 @@ external_charlist() = [unicode_char() | external_unicode_binary() | external_cha
<code>
&lt;&lt;Ch/utf8,_/binary&gt;&gt; = Bin1,
&lt;&lt;Ch/utf16-little,_/binary&gt;&gt; = Bin2,
-Bin3 = &lt;&lt;$H/utf32-little, $e/utf32-little, $l/utf32-little, $l/utf32-little, $o/utf32-little&gt;&gt;,</code>
+Bin3 = &lt;&lt;$H/utf32-little, $e/utf32-little, $l/utf32-little, $l/utf32-little,
+ $o/utf32-little&gt;&gt;,</code>
<p>For convenience, literal strings can be encoded with a Unicode encoding in binaries using the following (or similar) syntax:</p>
<code>
Bin4 = &lt;&lt;"Hello"/utf16&gt;&gt;,</code>