aboutsummaryrefslogtreecommitdiffstats
path: root/doc/info
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-06 21:21:31 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-06 21:21:31 +0100
commit0b61cca3c2b5c2d7b87a6871501bc8f38da3b823 (patch)
treea4dcb532daa4a808e02d046bb4b370cca3418705 /doc/info
parentmds-kbdc: parse_keys (diff)
downloadmds-0b61cca3c2b5c2d7b87a6871501bc8f38da3b823.tar.gz
mds-0b61cca3c2b5c2d7b87a6871501bc8f38da3b823.tar.bz2
mds-0b61cca3c2b5c2d7b87a6871501bc8f38da3b823.tar.xz
mds-kbdc: m + function calling
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/info')
-rw-r--r--doc/info/mds.texinfo34
1 files changed, 29 insertions, 5 deletions
diff --git a/doc/info/mds.texinfo b/doc/info/mds.texinfo
index f2913af..afcd8a5 100644
--- a/doc/info/mds.texinfo
+++ b/doc/info/mds.texinfo
@@ -3769,7 +3769,16 @@ provide one place to do modifications to port the
system.
@table @asis
-@item @code{xsnprintf} [(@code{char buffer[], char* format, ...}) @arrow{} @code{int}]
+@item @code{xasprintf} [(@code{char* buffer, ...}) @arrow{} @code{int}]
+This is a wrapper for @code{asprintf} that has two
+important properties, the buffer is guaranteed to
+be @code{NULL} on failure, and it will return zero
+on and only on success. Unlike @code{asprintf},
+@code{xasprintf} takes the buffer's variable as
+its first argument rather than the address of that
+variable.
+
+@item @code{xsnprintf} [(@code{char buffer[], ...}) @arrow{} @code{int}]
This is a wrapper for @code{snprintf} that allows you
to forget about the buffer size. When you know how long
a string can be, you should use @code{sprintf}. But when
@@ -3897,6 +3906,13 @@ on success. On failure, @code{var} will be
into another variable in case this macro
fails.
+@item @code{xxrealloc} [(@code{type* old, type* var, size_t elements, type}) @arrow{} @code{int}]
+Variant of @code{xrealloc} that will
+return with @code{old} set to @code{NULL}
+on success, and @code{old} set to @code{var}
+on error. Like @code{xrealloc}, @code{xxrealloc}
+returns zero on and only on success.
+
@item @code{growalloc} [(@code{type* old, type* var, size_t elements, type}) @arrow{} @code{int}]
When using this macro @code{var} should
be a @code{type*} pointer allocated for
@@ -5781,10 +5797,9 @@ function less_eq/2
end function
@end example
-A final constract to make layout code less
+A final construct to make layout code less
repetitive is let-statements. This can be
-used to assign values to variables, and
-declar variables in undefined.
+used to assign values to variables.
The code
@@ -5800,7 +5815,7 @@ macro latter/1
end macro
@end example
-can equivalently be writen using @code{let} as
+can equivalently be written using @code{let} as
@example
macro latter/1
@@ -5853,6 +5868,15 @@ macro and function names must be suffixed with `/'
follwed by the exact number of arguments the macro
or function takes.
+Variable indices are constrained to the 31:th power
+of 2, exclusively. Attempts to use higher variable
+indices invoke undefined behaviour. Additionally
+there is no guarantee that the compiler allocates
+indexwise spares variables efficiently.
+
+Like variables, the size of arrays are also
+restricted to the 31:th power of 2.
+
@node Escaping