File 0505-otp-Fix-various-small-documentation-issues.patch of Package erlang
From da165af343c6dcf1d953d1674670b29423ea7a60 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Mon, 9 Oct 2023 15:27:31 +0200
Subject: [PATCH 4/4] otp: Fix various small documentation issues
---
erts/doc/src/erl_nif.xml | 9 +++++----
erts/doc/src/erlang.xml | 4 ++--
lib/crypto/doc/src/crypto.xml | 2 +-
lib/debugger/doc/src/i.xml | 20 ++++++++++----------
lib/diameter/doc/src/diameter_app.xml | 4 ++--
lib/erl_docgen/doc/src/block_tags.xmlsrc | 4 ++--
lib/erl_interface/doc/src/ei.xml | 24 ++++++++++++------------
lib/inets/doc/src/httpd.xml | 2 +-
lib/inets/doc/src/httpd_util.xml | 2 +-
lib/inets/doc/src/mod_esi.xml | 6 +++---
lib/kernel/doc/src/notes.xml | 2 +-
lib/megaco/doc/src/megaco_tcp.xml | 2 +-
lib/megaco/doc/src/megaco_udp.xml | 3 +--
lib/stdlib/doc/src/dets.xml | 2 +-
lib/stdlib/doc/src/uri_string_usage.xml | 2 +-
15 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 4d31879c6a..3c6a1c594d 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -1802,14 +1802,15 @@ enif_free_iovec(iovec);]]></code>
<c>NULL</c> or a ErlNifIOVec structure that should be used if
possible. e.g.
</p>
- <code type="none">
+ <code type="none"><![CDATA[
/* Don't use a pre-allocated structure */
ErlNifIOVec *iovec = NULL;
-enif_inspect_iovec(env, max_elements, term, &tail, &iovec);
+enif_inspect_iovec(env, max_elements, term, &tail, &iovec);
/* Use a stack-allocated vector as an optimization for vectors with few elements */
-ErlNifIOVec vec, *iovec = &vec;
-enif_inspect_iovec(env, max_elements, term, &tail, &iovec);
+ErlNifIOVec vec, *iovec = &vec;
+enif_inspect_iovec(env, max_elements, term, &tail, &iovec);
+]]>
</code>
<p>The contents of the <c>iovec</c> is valid until the called nif
function returns. If the <c>iovec</c> should be valid after the nif
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 6c9d3e1d5a..366de5ce52 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -191,7 +191,7 @@
<name name="maybe_improper_list" n_vars="0"/>
<desc>
<p>An Erlang <seeguide marker="system/reference_manual:data_types#list">list</seeguide>
- that is not guaranteed to end with a <seetype marker="#nil">[]</seetype>, and where the
+ that is not guaranteed to end with a <seetype marker="#nil"><c>[]</c></seetype>, and where the
list elements can be of any type.
</p>
</desc>
@@ -200,7 +200,7 @@
<name name="maybe_improper_list" n_vars="2"/>
<desc>
<p>An Erlang <seeguide marker="system/reference_manual:data_types#list">list</seeguide>,
- that is not guaranteed to end with a <seetype marker="#nil">[]</seetype>,
+ that is not guaranteed to end with a <seetype marker="#nil"><c>[]</c></seetype>,
and where the list elements are of the type <c><anno>ContentType</anno></c>.
</p>
</desc>
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index 98c82f5fec..d97d02163b 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -237,7 +237,7 @@
<p>The <c>cryptolib_padding</c> are paddings that may be present in the underlying cryptolib
linked to the Erlang/OTP crypto app.
</p>
- <p>For OpenSSL, see the <url href="http:www.openssl.org">OpenSSL documentation</url>.
+ <p>For OpenSSL, see the <url href="https://openssl.org">OpenSSL documentation</url>.
and find <c>EVP_CIPHER_CTX_set_padding()</c> in cryptolib for your linked version.
</p>
</desc>
diff --git a/lib/debugger/doc/src/i.xml b/lib/debugger/doc/src/i.xml
index f874b33394..dcf55a416b 100644
--- a/lib/debugger/doc/src/i.xml
+++ b/lib/debugger/doc/src/i.xml
@@ -175,7 +175,7 @@
<name since="">ia(X,Y,Z) -> ok | no_proc</name>
<fsummary>Attache to a process.</fsummary>
<type>
- <v>X = Y = Z = int()</v>
+ <v>X = Y = Z = integer()</v>
</type>
<desc>
<p>Same as <c>ia(Pid)</c>, where <c>Pid</c> is the result of
@@ -202,7 +202,7 @@
<name since="">ia(X,Y,Z, Function) -> ok | no_proc</name>
<fsummary>Attache to a process.</fsummary>
<type>
- <v>X = Y = Z = int()</v>
+ <v>X = Y = Z = integer()</v>
<v>Function = {Module,Name}</v>
<v> Module = Name = atom()</v>
</type>
@@ -221,7 +221,7 @@
<fsummary>Create a breakpoint.</fsummary>
<type>
<v>Module = atom()</v>
- <v>Line = int()</v>
+ <v>Line = integer()</v>
</type>
<desc>
<p>Creates a breakpoint at <c>Line</c> in <c>Module</c>.</p>
@@ -234,7 +234,7 @@
<fsummary>Create breakpoints in the specified function.</fsummary>
<type>
<v>Module = Name = atom()</v>
- <v>Arity = int()</v>
+ <v>Arity = integer()</v>
</type>
<desc>
<p>Creates breakpoints at the first line of every clause of
@@ -266,7 +266,7 @@
<fsummary>Delete a breakpoint.</fsummary>
<type>
<v>Module = atom()</v>
- <v>Line = int()</v>
+ <v>Line = integer()</v>
</type>
<desc>
<p>Deletes the breakpoint at <c>Line</c> in <c>Module</c>.</p>
@@ -279,7 +279,7 @@
<fsummary>Delete breakpoints from the specified function.</fsummary>
<type>
<v>Module = Name = atom()</v>
- <v>Arity = int()</v>
+ <v>Arity = integer()</v>
</type>
<desc>
<p>Deletes the breakpoints at the first line of every clause of
@@ -292,7 +292,7 @@
<fsummary>Make a breakpoint inactive.</fsummary>
<type>
<v>Module = atom()</v>
- <v>Line = int()</v>
+ <v>Line = integer()</v>
</type>
<desc>
<p>Makes the breakpoint at <c>Line</c> in <c>Module</c> inactive.</p>
@@ -304,7 +304,7 @@
<fsummary>Make a breakpoint active.</fsummary>
<type>
<v>Module = atom()</v>
- <v>Line = int()</v>
+ <v>Line = integer()</v>
</type>
<desc>
<p>Makes the breakpoint at <c>Line</c> in <c>Module</c> active.</p>
@@ -316,7 +316,7 @@
<fsummary>Set the trigger action of a breakpoint.</fsummary>
<type>
<v>Module = atom()</v>
- <v>Line = int()</v>
+ <v>Line = integer()</v>
<v>Action = enable | disable | delete</v>
</type>
<desc>
@@ -330,7 +330,7 @@
<fsummary>Set the conditional test of a breakpoint.</fsummary>
<type>
<v>Module = atom()</v>
- <v>Line = int()</v>
+ <v>Line = integer()</v>
<v>Function = {Module,Name}</v>
<v> Name = atom()</v>
</type>
diff --git a/lib/diameter/doc/src/diameter_app.xml b/lib/diameter/doc/src/diameter_app.xml
index b4fdd2516e..f06ebb96bc 100644
--- a/lib/diameter/doc/src/diameter_app.xml
+++ b/lib/diameter/doc/src/diameter_app.xml
@@ -320,7 +320,7 @@ or &peer_down; callback.</p>
<v>Action = Send | Discard | {eval_packet, Action, PostF}</v>
<v>Send = {send, &packet; | &message;}</v>
<v>Discard = {discard, Reason} | discard</v>
-<v>PostF = &mod_eval;}</v>
+<v>PostF = &mod_eval;</v>
</type>
<desc>
<p>
@@ -372,7 +372,7 @@ discarded}</c>.</p>
<v>Action = Send | Discard | {eval_packet, Action, PostF}</v>
<v>Send = {send, &packet; | &message;}</v>
<v>Discard = {discard, Reason} | discard</v>
-<v>PostF = &mod_eval;}</v>
+<v>PostF = &mod_eval;</v>
</type>
<desc>
<p>
diff --git a/lib/erl_docgen/doc/src/block_tags.xmlsrc b/lib/erl_docgen/doc/src/block_tags.xmlsrc
index 402945e0d0..cac46889e6 100644
--- a/lib/erl_docgen/doc/src/block_tags.xmlsrc
+++ b/lib/erl_docgen/doc/src/block_tags.xmlsrc
@@ -40,8 +40,8 @@
<seeguide marker="#preTAG"><pre></seeguide>,
<seeguide marker="#codeTAG"><code></seeguide>,
<seeguide marker="#listTAG"><list></seeguide>,
- <seeguide marker="#taglistTAG"><taglist></seeguide>,
- <seeguide marker="#codeincludeTAG"><codeinclude></seeguide> and
+ <seeguide marker="#taglistTAG"><taglist></seeguide> and
+ <seeguide marker="#codeincludeTAG"><codeinclude></seeguide>
</p>
<section>
diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml
index d17e7a8a7c..305591bd27 100644
--- a/lib/erl_interface/doc/src/ei.xml
+++ b/lib/erl_interface/doc/src/ei.xml
@@ -102,7 +102,7 @@
<taglist>
<tag><marker id="ei_term"/><c>ei_term</c></tag>
<item>
- <code type="none">
+ <code type="c">
typedef struct {
char ei_type;
int arity;
@@ -150,7 +150,7 @@ typedef struct {
</item>
<tag><marker id="erlang_char_encoding"/><c>erlang_char_encoding</c></tag>
<item>
- <code type="none">
+ <code type="c">
typedef enum {
ERLANG_ASCII = 1,
ERLANG_LATIN1 = 2,
@@ -783,14 +783,14 @@ typedef enum {
list can contain another list or tuple.</p>
<p>For example, to encode the list
<c>[c, d, [e | f]]</c>:</p>
- <pre>
+ <code type="c">
ei_encode_list_header(buf, &i, 3);
ei_encode_atom(buf, &i, "c");
ei_encode_atom(buf, &i, "d");
ei_encode_list_header(buf, &i, 1);
ei_encode_atom(buf, &i, "e");
ei_encode_atom(buf, &i, "f");
-ei_encode_empty_list(buf, &i);</pre>
+ei_encode_empty_list(buf, &i);</code>
<note>
<p>It may seem that there is no way to create a list without
knowing the number of elements in advance. But indeed
@@ -799,12 +799,12 @@ ei_encode_empty_list(buf, &i);</pre>
Using this, a list can be written as conses.</p>
</note>
<p>To encode a list, without knowing the arity in advance:</p>
- <pre>
+ <code type="c">
while (something()) {
ei_x_encode_list_header(&x, 1);
ei_x_encode_ulong(&x, i); /* just an example */
}
-ei_x_encode_empty_list(&x);</pre>
+ei_x_encode_empty_list(&x);</code>
</desc>
</func>
@@ -849,12 +849,12 @@ ei_x_encode_empty_list(&x);</pre>
</p>
<p>For example, to encode the map <c>#{a => "Apple", b =>
"Banana"}</c>:</p>
- <pre>
+ <code type="c">
ei_x_encode_map_header(&x, 2);
ei_x_encode_atom(&x, "a");
ei_x_encode_string(&x, "Apple");
ei_x_encode_atom(&x, "b");
-ei_x_encode_string(&x, "Banana");</pre>
+ei_x_encode_string(&x, "Banana");</code>
<p>A correctly encoded map cannot have duplicate keys.</p>
</desc>
</func>
@@ -961,12 +961,12 @@ ei_x_encode_string(&x, "Banana");</pre>
elements of the tuple. Tuples and lists are encoded
recursively, so that a tuple can contain another tuple or list.</p>
<p>For example, to encode the tuple <c>{a, {b, {}}}</c>:</p>
- <pre>
+ <code type="c">
ei_encode_tuple_header(buf, &i, 2);
ei_encode_atom(buf, &i, "a");
ei_encode_tuple_header(buf, &i, 2);
ei_encode_atom(buf, &i, "b");
-ei_encode_tuple_header(buf, &i, 0);</pre>
+ei_encode_tuple_header(buf, &i, 0);</code>
</desc>
</func>
@@ -1271,9 +1271,9 @@ ei_encode_tuple_header(buf, &i, 0);</pre>
~d A double float, double float
~p An Erlang pid, erlang_pid*</pre>
<p>For example, to encode a tuple with some stuff:</p>
- <pre>
+ <code type="c">
ei_x_format("{~a,~i,~d}", "numbers", 12, 3.14159)
-encodes the tuple {numbers,12,3.14159}</pre>
+encodes the tuple {numbers,12,3.14159}</code>
<p><c>ei_x_format_wo_ver()</c> formats into a buffer,
without the initial version byte.</p>
</desc>
diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml
index 118d38ba2a..b9987d3887 100644
--- a/lib/inets/doc/src/httpd.xml
+++ b/lib/inets/doc/src/httpd.xml
@@ -1065,7 +1065,7 @@ Transport: TLS
<v>| location | pragma | retry_after</v>
<v>| server | trailer | transfer_encoding</v>
<v>Value = string()</v>
- <v>Fun = fun( Arg ) -> sent| close | Body </v>
+ <v>Fun = fun(( Arg ) -> sent| close | Body) </v>
<v>Arg = [term()]</v>
</type>
<desc>
diff --git a/lib/inets/doc/src/httpd_util.xml b/lib/inets/doc/src/httpd_util.xml
index f8bd403efa..dce3264207 100644
--- a/lib/inets/doc/src/httpd_util.xml
+++ b/lib/inets/doc/src/httpd_util.xml
@@ -254,7 +254,7 @@
<desc>
<p><c>split/3</c> splits <c>String</c> in <c>N</c> chunks
using <c>RegExp</c>. <c>split/3</c> is equivalent to
- <c>regexp:split/2</c> with the exception that <c>N</c>
+ <c>re:split/3</c> with the exception that <c>N</c>
defines the maximum number of fields in
<c>FieldList</c>.</p>
</desc>
diff --git a/lib/inets/doc/src/mod_esi.xml b/lib/inets/doc/src/mod_esi.xml
index 9bdaac7a95..58b777370f 100644
--- a/lib/inets/doc/src/mod_esi.xml
+++ b/lib/inets/doc/src/mod_esi.xml
@@ -127,9 +127,9 @@
to the server process by calling <c>mod_esi:deliver/2</c>.</fsummary>
<type>
<v>SessionID = term()</v>
- <v>Env = env()</v>
- <v>Input = string() | chunked_data()</v>
- <v>chunked_data() = {first, Data::binary()} |
+ <v>Env = [env()]</v>
+ <v>Input = string() | ChunkedData</v>
+ <v>ChunkedData = {first, Data::binary()} |
{continue, Data::binary(), State::term()} |
{last, Data::binary(), State::term()} </v>
<v>State = term()</v>
diff --git a/lib/kernel/doc/src/notes.xml b/lib/kernel/doc/src/notes.xml
index 662320b5d6..7c400a3508 100644
--- a/lib/kernel/doc/src/notes.xml
+++ b/lib/kernel/doc/src/notes.xml
@@ -1237,7 +1237,7 @@
A bug in <c>inet_res</c> has been fixed where a missing
internal <c>{ok,_}</c> wrapper caused
<c>inet_res:resolve/*</c> to return a calculated host
- name instead of an `<c>{ok,Msg}</c> tuple, when resolving
+ name instead of an <c>{ok,Msg}</c> tuple, when resolving
an IP address or a host name that is an IP address
string.</p>
<p>
diff --git a/lib/megaco/doc/src/megaco_tcp.xml b/lib/megaco/doc/src/megaco_tcp.xml
index 013b3f5e66..a746a8dda1 100644
--- a/lib/megaco/doc/src/megaco_tcp.xml
+++ b/lib/megaco/doc/src/megaco_tcp.xml
@@ -178,7 +178,7 @@
</desc>
</func>
<func>
- <name since="">upgrade_receive_handle(ControlPid) -> ok</name>
+ <name since="">upgrade_receive_handle(ControlPid, NewHandle) -> ok</name>
<fsummary></fsummary>
<type>
<v>ControlPid = pid()</v>
diff --git a/lib/megaco/doc/src/megaco_udp.xml b/lib/megaco/doc/src/megaco_udp.xml
index 80a25ce702..c837f0b81c 100644
--- a/lib/megaco/doc/src/megaco_udp.xml
+++ b/lib/megaco/doc/src/megaco_udp.xml
@@ -96,11 +96,10 @@
</desc>
</func>
<func>
- <name since="">close(Handle, Msg) -> ok</name>
+ <name since="">close(Handle) -> ok</name>
<fsummary></fsummary>
<type>
<v>Handle = socket_handle()</v>
- <v>Msg</v>
</type>
<desc>
<p>This function is used for closing an active UDP socket.</p>
diff --git a/lib/stdlib/doc/src/dets.xml b/lib/stdlib/doc/src/dets.xml
index 873167714c..51577944dd 100644
--- a/lib/stdlib/doc/src/dets.xml
+++ b/lib/stdlib/doc/src/dets.xml
@@ -376,7 +376,7 @@
<p><c>{bchunk_format, binary()}</c> - An opaque binary
describing the format of the objects returned by
<c>bchunk/2</c>. The binary can be used as argument to
- <c>is_compatible_chunk_format/2</c>.</p>
+ <c>is_compatible_bchunk_format/2</c>.</p>
</item>
<item>
<p><c>{hash, Hash}</c> - Describes which BIF is
diff --git a/lib/stdlib/doc/src/uri_string_usage.xml b/lib/stdlib/doc/src/uri_string_usage.xml
index 31e2c23c45..90dd444a5f 100644
--- a/lib/stdlib/doc/src/uri_string_usage.xml
+++ b/lib/stdlib/doc/src/uri_string_usage.xml
@@ -194,7 +194,7 @@
</p>
<pre>
1> uri_string:allowed_characters().
- <![CDATA[{scheme,
+ <![CDATA[[{scheme,
"+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"},
{userinfo,
"!$%&'()*+,-.0123456789:;=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"},
--
2.35.3