From 036c56d3ee969daa39c1e03de69744ba394f0fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 20 Oct 2016 14:08:31 +0200 Subject: erl_interface: Fix editorial changes --- lib/erl_interface/doc/src/ei.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/erl_interface/doc/src/ei.xml') diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml index 6d416028a5..9b01f4af98 100644 --- a/lib/erl_interface/doc/src/ei.xml +++ b/lib/erl_interface/doc/src/ei.xml @@ -97,7 +97,7 @@ buffer must be allocated large enough, and for non-compound types the function returns the size required (notice that for strings an - extra byte is needed for the 0 string terminator).

+ extra byte is needed for the NULL-terminator).

@@ -110,14 +110,14 @@ typedef enum { ERLANG_ASCII = 1, ERLANG_LATIN1 = 2, ERLANG_UTF8 = 4 -}erlang_char_encoding; +} erlang_char_encoding;

The character encodings used for atoms. ERLANG_ASCII represents 7-bit ASCII. Latin-1 and UTF-8 are different extensions of 7-bit ASCII. All 7-bit ASCII characters are valid Latin-1 and UTF-8 characters. ASCII and Latin-1 both represent each character - by one byte. An UTF-8 character can consist of 1-4 bytes. - Notice that these - constants are bit-flags and can be combined with bitwise OR.

+ by one byte. An UTF-8 character can consist of 1-4 bytes. + Notice that these constants are bit-flags and can be combined with + bitwise OR.

@@ -409,7 +409,7 @@ typedef enum {

Encodes an atom in the binary format. Parameter is the name of the atom in Latin-1 encoding. Only up to MAXATOMLEN-1 bytes - are encoded. The name is to be zero-terminated, except for + are encoded. The name is to be NULL-terminated, except for the function.

@@ -426,7 +426,7 @@ typedef enum { (Latin-1 or UTF-8). Parameter p is the name of the atom with character encoding from_enc - (ASCII, Latin-1, or UTF-8). The name must either be zero-terminated or + (ASCII, Latin-1, or UTF-8). The name must either be NULL-terminated or a function variant with a len parameter must be used. If to_enc is set to the bitwise OR'd combination (ERLANG_LATIN1|ERLANG_UTF8), UTF-8 encoding is only used if the @@ -645,7 +645,7 @@ ei_x_encode_string(&x, "Banana");

Encodes a string in the binary format. (A string in Erlang is a list, but is encoded as a character array in the binary - format.) The string is to be zero-terminated, except for + format.) The string is to be NULL-terminated, except for the function.

@@ -731,7 +731,7 @@ ei_encode_tuple_header(buf, &i, 0);

Returns the type in and size in of the encoded term. For strings and atoms, size is the number of characters not including the - terminating 0. For binaries, is the number of + terminating NULL. For binaries, is the number of bytes. For lists and tuples, is the arity of the object. For other types, is 0. In all cases, is left unchanged.

@@ -753,7 +753,7 @@ ei_encode_tuple_header(buf, &i, 0); bytes or a NULL pointer. The string can be reallocated (and can be updated) by this function if the result is more than - characters. The string returned is zero-terminated.

+ characters. The string returned is NULL-terminated.

The return value is the number of characters written to the file or string, or -1 if does not contain a valid term. -- cgit v1.2.3