aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man/ELEMSOF.3libsimple34
-rw-r--r--man/INTSTRLEN.3libsimple46
-rw-r--r--man/MAX.3libsimple58
-rw-r--r--man/MAX3.3libsimple61
-rw-r--r--man/MIN.3libsimple58
-rw-r--r--man/MIN3.3libsimple61
-rw-r--r--man/STRLEN.3libsimple41
-rw-r--r--man/TYPE_MAX.3libsimple77
-rw-r--r--man/TYPE_MIN.3libsimple77
9 files changed, 513 insertions, 0 deletions
diff --git a/man/ELEMSOF.3libsimple b/man/ELEMSOF.3libsimple
new file mode 100644
index 0000000..b40d563
--- /dev/null
+++ b/man/ELEMSOF.3libsimple
@@ -0,0 +1,34 @@
+.TH ELEMSOF 3 2018-11-05 libsimple
+.SH NAME
+ELEMSOF \- get the size of an array
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef ELEMSOF
+# define ELEMSOF(arr) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR ELEMSOF ()
+macro assumes
+.I arr
+is an array (not a pointer) and expands, as
+a constant expression. The type of the expression
+the macro expands to is
+.BR size_t .
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR STRLEN (3libsimple)
diff --git a/man/INTSTRLEN.3libsimple b/man/INTSTRLEN.3libsimple
new file mode 100644
index 0000000..63c1485
--- /dev/null
+++ b/man/INTSTRLEN.3libsimple
@@ -0,0 +1,46 @@
+.TH INTSTRLEN 3 2018-11-05 libsimple
+.SH NAME
+INTSTRLEN \- get the maximum length of an integer string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef INTSTRLEN
+# define INTSTRLEN(type) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR INTSTRLEN ()
+macro assumes
+.I type
+is an integer type, and expends to a value representing
+a number of bytes sufficiently large to store any value
+of the specified integer type as a string without leading
+zeroes or plus sign, and
+.IR "without a terminating NUL byte" ,
+as a constant expression in the type
+.BR size_t ;
+however it is not suitable for
+.BR #if .
+.PP
+The resulting value can depend in either the type is
+signed or unsigned, and can be slightly larger than
+necessary, it can however not be smaller. (For integers
+up to 64 bits, the result is only off by one for signed
+64-bit integer types.)
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR TYPE_MIN (3libsimple)
+.BR TYPE_MAX (3libsimple)
diff --git a/man/MAX.3libsimple b/man/MAX.3libsimple
new file mode 100644
index 0000000..e4a4d62
--- /dev/null
+++ b/man/MAX.3libsimple
@@ -0,0 +1,58 @@
+.TH MAX 3 2018-11-05 libsimple
+.SH NAME
+MAX \- get the greater of two values
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef MAX
+# define MAX(a, b) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR MAX ()
+macro is a function-like macro that
+returns the greater of the values
+.I a
+and
+.IR b .
+.PP
+The
+.I a
+and
+.I b
+expressions must not have side-effects.
+.PP
+If both of the
+.I a
+and
+.I b
+parameters are constants expressions, the
+return value is also a constant expression.
+.SH RETURN VALUE
+The
+.BR MAX ()
+macro returns to the greater value.
+.SH ERRORS
+The
+.BR libsimple_close ()
+function fail for the reasons specified for the
+.BR close (3)
+function.
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR MIN (3libsimple),
+.BR MIN3 (3libsimple),
+.BR MAX3 (3libsimple)
diff --git a/man/MAX3.3libsimple b/man/MAX3.3libsimple
new file mode 100644
index 0000000..103169a
--- /dev/null
+++ b/man/MAX3.3libsimple
@@ -0,0 +1,61 @@
+.TH MAX3 3 2018-11-05 libsimple
+.SH NAME
+MAX3 \- get the greatest of three values
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef MAX3
+# define MAX3(a, b, c) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR MAX3 ()
+macro is a function-like macro that
+returns the greatest of the values
+.IR a ,
+.IR b ,
+and
+.IR c .
+.PP
+The
+.IR a ,
+.IR b ,
+and
+.I c
+expressions must not have side-effects.
+.PP
+If all three of the
+.IR a ,
+.IR b ,
+and
+.I c
+parameters are constants expressions, the
+return value is also a constant expression.
+.SH RETURN VALUE
+The
+.BR MAX3 ()
+macro returns to the greatest of value.
+.SH ERRORS
+The
+.BR libsimple_close ()
+function fail for the reasons specified for the
+.BR close (3)
+function.
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR MIN (3libsimple),
+.BR MAX (3libsimple),
+.BR MIN3 (3libsimple)
diff --git a/man/MIN.3libsimple b/man/MIN.3libsimple
new file mode 100644
index 0000000..d88216e
--- /dev/null
+++ b/man/MIN.3libsimple
@@ -0,0 +1,58 @@
+.TH MIN 3 2018-11-05 libsimple
+.SH NAME
+MIN \- get the lesser of two values
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef MIN
+# define MIN(a, b) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR MIN ()
+macro is a function-like macro that
+returns the lesser of the values
+.I a
+and
+.IR b .
+.PP
+The
+.I a
+and
+.I b
+expressions must not have side-effects.
+.PP
+If both of the
+.I a
+and
+.I b
+parameters are constants expressions, the
+return value is also a constant expression.
+.SH RETURN VALUE
+The
+.BR MIN ()
+macro returns to the lesser value.
+.SH ERRORS
+The
+.BR libsimple_close ()
+function fail for the reasons specified for the
+.BR close (3)
+function.
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR MAX (3libsimple),
+.BR MIN3 (3libsimple),
+.BR MAX3 (3libsimple)
diff --git a/man/MIN3.3libsimple b/man/MIN3.3libsimple
new file mode 100644
index 0000000..c915781
--- /dev/null
+++ b/man/MIN3.3libsimple
@@ -0,0 +1,61 @@
+.TH MIN3 3 2018-11-05 libsimple
+.SH NAME
+MIN3 \- get the smallest of three values
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef MIN3
+# define MIN3(a, b, c) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR MIN3 ()
+macro is a function-like macro that
+returns the smallest of the values
+.IR a ,
+.IR b ,
+and
+.IR c .
+.PP
+The
+.IR a ,
+.IR b ,
+and
+.I c
+expressions must not have side-effects.
+.PP
+If all three of the
+.IR a ,
+.IR b ,
+and
+.I c
+parameters are constants expressions, the
+return value is also a constant expression.
+.SH RETURN VALUE
+The
+.BR MIN3 ()
+macro returns to the smallest of value.
+.SH ERRORS
+The
+.BR libsimple_close ()
+function fail for the reasons specified for the
+.BR close (3)
+function.
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR MIN (3libsimple),
+.BR MAX (3libsimple),
+.BR MAX3 (3libsimple)
diff --git a/man/STRLEN.3libsimple b/man/STRLEN.3libsimple
new file mode 100644
index 0000000..06ccecf
--- /dev/null
+++ b/man/STRLEN.3libsimple
@@ -0,0 +1,41 @@
+.TH STRLEN 3 2018-11-05 libsimple
+.SH NAME
+STRLEN \- get the length of a string literal
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef STRLEN
+# define STRLEN(str) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR STRLEN ()
+macro assumes
+.I str
+is string literal
+.RB ( char
+array type) and expands the value of
+.I strlen(str)
+as a constant expression, that is, without
+calling
+.IR strlen ;
+however it is not suitable for
+.BR #if .
+The type of the expression the macro expands to is
+.BR size_t .
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR ELEMSOF (3libsimple)
diff --git a/man/TYPE_MAX.3libsimple b/man/TYPE_MAX.3libsimple
new file mode 100644
index 0000000..c132ec9
--- /dev/null
+++ b/man/TYPE_MAX.3libsimple
@@ -0,0 +1,77 @@
+.TH TYPE_MAX 3 2018-11-05 libsimple
+.SH NAME
+TYPE_MAX \- get largest value for an integer type
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef TYPE_MAX
+# define TYPE_MAX(type) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR TYPE_MAX ()
+macro assumes
+.I type
+is an integer type and expands to the largest value
+that can be stored in the
+.IR TYPE ,
+as a constant expression; however it is not suitable for
+.BR #if .
+.PP
+The
+.IB <libsimple.h>
+heading contains macro constants, using the
+.BR TYPE_MAX ()
+macro, for the maximum value for multiple integer types:
+.BR BLKCNT64_MAX ,
+.BR BLKCNT_MAX ,
+.BR BLKSIZE_MAX ,
+.BR CC_MAX ,
+.BR CLOCKID_MAX ,
+.BR CLOCK_MAX ,
+.BR DEV_MAX ,
+.BR FSBLKCNT64_MAX ,
+.BR FSBLKCNT_MAX ,
+.BR FSFILCNT64_MAX ,
+.BR FSFILCNT_MAX ,
+.BR GID_MAX ,
+.BR ID_MAX ,
+.BR INO64_MAX ,
+.BR INO_MAX ,
+.BR KEY_MAX ,
+.BR LOFF_MAX ,
+.BR MODE_MAX ,
+.BR NLINK_MAX ,
+.BR OFF64_MAX ,
+.BR OFF_MAX ,
+.BR PID_MAX ,
+.BR QUAD_MAX ,
+.BR REGISTER_MAX ,
+.BR RLIM64_MAX ,
+.BR RLIM_MAX ,
+.BR SOCKLEN_MAX ,
+.BR SPEED_MAX ,
+.BR SUSECONDS_MAX ,
+.BR TCFLAG_MAX ,
+.BR TIME_MAX ,
+.BR UID_MAX ,
+.BR USECONDS_MAX ,
+and
+.BR U_QUAD_MAX .
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR TYPE_MIN (3libsimple)
+.BR INTSTRLEN (3libsimple)
diff --git a/man/TYPE_MIN.3libsimple b/man/TYPE_MIN.3libsimple
new file mode 100644
index 0000000..6720465
--- /dev/null
+++ b/man/TYPE_MIN.3libsimple
@@ -0,0 +1,77 @@
+.TH TYPE_MIN 3 2018-11-05 libsimple
+.SH NAME
+TYPE_MIN \- get smallest value for an integer type
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+#ifndef TYPE_MIN
+# define TYPE_MIN(type) /* implementation omitted */
+#endif
+.fi
+.SH DESCRIPTION
+The
+.BR TYPE_MIN ()
+macro assumes
+.I type
+is an integer type and expands to the smallest value
+that can be stored in the
+.IR TYPE ,
+as a constant expression; however it is not suitable for
+.BR #if .
+.PP
+The
+.IB <libsimple.h>
+heading contains macro constants, using the
+.BR TYPE_MIN ()
+macro, for the minimum value for multiple integer types:
+.BR BLKCNT64_MIN ,
+.BR BLKCNT_MIN ,
+.BR BLKSIZE_MIN ,
+.BR CC_MIN ,
+.BR CLOCKID_MIN ,
+.BR CLOCK_MIN ,
+.BR DEV_MIN ,
+.BR FSBLKCNT64_MIN ,
+.BR FSBLKCNT_MIN ,
+.BR FSFILCNT64_MIN ,
+.BR FSFILCNT_MIN ,
+.BR GID_MIN ,
+.BR ID_MIN ,
+.BR INO64_MIN ,
+.BR INO_MIN ,
+.BR KEY_MIN ,
+.BR LOFF_MIN ,
+.BR MODE_MIN ,
+.BR NLINK_MIN ,
+.BR OFF64_MIN ,
+.BR OFF_MIN ,
+.BR PID_MIN ,
+.BR QUAD_MIN ,
+.BR REGISTER_MIN ,
+.BR RLIM64_MIN ,
+.BR RLIM_MIN ,
+.BR SOCKLEN_MIN ,
+.BR SPEED_MIN ,
+.BR SUSECONDS_MIN ,
+.BR TCFLAG_MIN ,
+.BR TIME_MIN ,
+.BR UID_MIN ,
+.BR USECONDS_MIN ,
+and
+.BR U_QUAD_MIN .
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR TYPE_MAX (3libsimple)
+.BR INTSTRLEN (3libsimple)