From 9f5b69e8def226f1d1ce9262477d5bbd1cbc1fe7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?=
Date: Mon, 17 Oct 2016 15:07:55 +0200
Subject: erl_interface: Refactor documentation
---
lib/erl_interface/doc/src/erl_eterm.xml | 169 ++++++++++++++++----------------
1 file changed, 84 insertions(+), 85 deletions(-)
(limited to 'lib/erl_interface/doc/src/erl_eterm.xml')
diff --git a/lib/erl_interface/doc/src/erl_eterm.xml b/lib/erl_interface/doc/src/erl_eterm.xml
index 800f8a3207..e5207a271e 100644
--- a/lib/erl_interface/doc/src/erl_eterm.xml
+++ b/lib/erl_interface/doc/src/erl_eterm.xml
@@ -11,7 +11,7 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@@ -19,7 +19,7 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
+
erl_eterm
@@ -30,7 +30,7 @@
Torbjörn Törnkvist
980703
A
- erl_eterm.sgml
+ erl_eterm.xml
erl_eterm
Functions for Erlang Term Construction
@@ -167,18 +167,18 @@ erl_free_compound(list);
ETERM *erl_copy_term(term)
- Creates a copy of an Erlang term
+ Creates a copy of an Erlang term.
ETERM *term;
- This function creates and returns a copy of the Erlang term
+
This function creates and returns a copy of the Erlang term
.
ETERM *erl_element(position, tuple)
- Extracts an element from an Erlang tuple
+ Extracts an element from an Erlang tuple.
int position;
ETERM *tuple;
@@ -195,38 +195,54 @@ erl_free_compound(list);
the arity of .
+
+ ETERM *erl_hd(list)
+ Extracts the first element from a list.
+
+ ETERM *list;
+
+
+ Extracts the first element from a list.
+ is an Erlang term containing a list.
+ The function returns an Erlang term corresponding to the
+ head element in the list, or a NULL pointer if was
+ not a list.
+
+
voiderl_init(NULL, 0)
- Initialization routine
+ Initialization routine.
void *NULL;
int 0;
- This function must be called before any of the others in
+
This function must be called before any of the others in
the library in order to initialize the
- library functions. The arguments must be specified as
+ library functions. The arguments must be specified as
.
- ETERM *erl_hd(list)
- Extracts the first element from a list
+ interl_iolist_length(list)
+ Return the length of an IO list.
ETERM *list;
- Extracts the first element from a list.
- is an Erlang term containing a list.
- The function returns an Erlang term corresponding to the
- head element in the list, or a NULL pointer if was
- not a list.
+ Returns the length of an IO list.
+
+ is an Erlang term containing an IO list.
+ The function returns the length of , or -1 if
+ is not an IO list.
+ Refer to for the definition of
+ an IO list.
ETERM *erl_iolist_to_binary(term)
- Converts an IO list to a binary
+ Converts an IO list to a binary.
ETERM *list;
@@ -252,7 +268,7 @@ iohead ::= Binary
char *erl_iolist_to_string(list)
- Converts an IO list to a zero terminated string
+ Converts an IO list to a zero terminated string.
ETERM *list;
@@ -271,25 +287,9 @@ iohead ::= Binary
IO list.
-
- interl_iolist_length(list)
- Return the length of an IO list
-
- ETERM *list;
-
-
- Returns the length of an IO list.
-
- is an Erlang term containing an IO list.
- The function returns the length of , or -1 if
- is not an IO list.
- Refer to for the definition of
- an IO list.
-
-
interl_length(list)
- Determines the length of a list
+ Determines the length of a list.
ETERM *list;
@@ -303,7 +303,7 @@ iohead ::= Binary
ETERM *erl_mk_atom(string)
- Creates an atom
+ Creates an atom.
const char *string;
@@ -324,7 +324,7 @@ iohead ::= Binary
ETERM *erl_mk_binary(bptr, size)
- Creates a binary object
+ Creates a binary object.
char *bptr;
int size;
@@ -336,13 +336,13 @@ iohead ::= Binary
indicates the length of .
The function returns an Erlang binary object.
retrieves a pointer to
- the binary data. retrieves the
+ the binary data. retrieves the
size.
ETERM *erl_mk_empty_list()
- Creates an empty Erlang list
+ Creates an empty Erlang list.
This function creates and returns an empty Erlang list.
Note that NULL is not used to represent an empty list;
@@ -351,7 +351,7 @@ iohead ::= Binary
ETERM *erl_mk_estring(string, len)
- Creates an Erlang string
+ Creates an Erlang string.
char *string;
int len;
@@ -367,7 +367,7 @@ iohead ::= Binary
ETERM *erl_mk_float(f)
- Creates an Erlang float
+ Creates an Erlang float.
double f;
@@ -385,7 +385,7 @@ iohead ::= Binary
ETERM *erl_mk_int(n)
- Creates an Erlang integer
+ Creates an Erlang integer.
int n;
@@ -395,13 +395,13 @@ iohead ::= Binary
The function returns an Erlang integer object with the
value specified in .
- can be used to retrieve the value
+
can be used to retrieve the value
value from an Erlang integer.
ETERM *erl_mk_list(array, arrsize)
- Creates a list from an array
+ Creates a list from an array.
ETERM **array;
int arrsize;
@@ -417,9 +417,36 @@ iohead ::= Binary
.
+
+ ETERM *erl_mk_long_ref(node, n1, n2, n3, creation)
+ Creates an Erlang reference.
+
+ const char *node;
+ unsigned int n1, n2, n3;
+ unsigned int creation;
+
+
+ This function creates an Erlang reference, with 82 bits.
+ is the name of the C node.
+ , and can be seen as one big number
+ which should be chosen uniquely for
+ each reference
+ created for a given C node.
+ is an arbitrary number.
+ Note that and are limited in
+ precision, so only the low 18 and 2 bits of these numbers
+ are actually used.
+
+ The function returns an Erlang reference object.
+ , ,
+ and
+ to retrieve the values used
+ to create the reference.
+
+
ETERM *erl_mk_pid(node, number, serial, creation)
- Creates a process identifier
+ Creates a process identifier.
const char *node;
unsigned int number;
@@ -443,7 +470,7 @@ iohead ::= Binary
ETERM *erl_mk_port(node, number, creation)
- Creates a port identifier
+ Creates a port identifier.
const char *node;
unsigned int number;
@@ -464,7 +491,7 @@ iohead ::= Binary
ETERM *erl_mk_ref(node, number, creation)
- Creates an old Erlang reference
+ Creates an old Erlang reference.
const char *node;
unsigned int number;
@@ -487,36 +514,9 @@ iohead ::= Binary
to create the reference.
-
- ETERM *erl_mk_long_ref(node, n1, n2, n3, creation)
- Creates an Erlang reference
-
- const char *node;
- unsigned int n1, n2, n3;
- unsigned int creation;
-
-
- This function creates an Erlang reference, with 82 bits.
- is the name of the C node.
- , and can be seen as one big number
- which should be chosen uniquely for
- each reference
- created for a given C node.
- is an arbitrary number.
- Note that and are limited in
- precision, so only the low 18 and 2 bits of these numbers
- are actually used.
-
- The function returns an Erlang reference object.
- , ,
- and
- to retrieve the values used
- to create the reference.
-
-
ETERM *erl_mk_string(string)
- Creates a string
+ Creates a string.
char *string;
@@ -529,7 +529,7 @@ iohead ::= Binary
ETERM *erl_mk_tuple(array, arrsize)
- Creates an Erlang tuple from an array
+ Creates an Erlang tuple from an array.
ETERM **array;
int arrsize;
@@ -553,7 +553,7 @@ iohead ::= Binary
ETERM *erl_mk_uint(n)
- Creates an unsigned integer
+ Creates an unsigned integer.
unsigned int n;
@@ -570,7 +570,7 @@ iohead ::= Binary
ETERM *erl_mk_var(name)
- Creates an Erlang variable
+ Creates an Erlang variable.
char *name;
@@ -584,7 +584,7 @@ iohead ::= Binary
interl_print_term(stream, term)
- Prints an Erlang term
+ Prints an Erlang term.
FILE *stream;
ETERM *term;
@@ -601,7 +601,7 @@ iohead ::= Binary
voiderl_set_compat_rel(release_number)
- Set the erl_interface library in compatibility mode
+ Set the erl_interface library in compatibility mode.
unsigned release_number;
@@ -633,7 +633,7 @@ iohead ::= Binary
interl_size(term)
- Return the arity of a tuple or binary
+ Return the arity of a tuple or binary.
ETERM *term;
@@ -648,7 +648,7 @@ iohead ::= Binary
ETERM *erl_tl(list)
- Extracts the tail from a list
+ Extracts the tail from a list.
ETERM *list;
@@ -662,14 +662,14 @@ iohead ::= Binary
ETERM *erl_var_content(term, name)
- Extracts the content of a variable
+ Extracts the content of a variable.
ETERM *term;
char *name;
This function returns the contents of the specified
- variable in an Erlang term.
+ variable in an Erlang term.
is an Erlang term. In order for this function
to succeed, must be an Erlang variable with the
@@ -685,4 +685,3 @@ iohead ::= Binary
-
--
cgit v1.2.3