aboutsummaryrefslogtreecommitdiffstats
path: root/libj2_min_j2i.3
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-21 16:48:02 +0100
committerMattias Andrée <m@maandree.se>2026-01-21 16:48:02 +0100
commitd0fa516ae007ac94083ea84595f0abf88ecfc265 (patch)
tree83934663553f66887083f8d8b7ad3ff818e80704 /libj2_min_j2i.3
parentAdd libj2_not_j2u.3 and libj2_j2i_xor_sign.3 (diff)
downloadlibj2-d0fa516ae007ac94083ea84595f0abf88ecfc265.tar.gz
libj2-d0fa516ae007ac94083ea84595f0abf88ecfc265.tar.bz2
libj2-d0fa516ae007ac94083ea84595f0abf88ecfc265.tar.xz
Add some man pages
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libj2_min_j2i.3')
-rw-r--r--libj2_min_j2i.3144
1 files changed, 144 insertions, 0 deletions
diff --git a/libj2_min_j2i.3 b/libj2_min_j2i.3
new file mode 100644
index 0000000..fca9412
--- /dev/null
+++ b/libj2_min_j2i.3
@@ -0,0 +1,144 @@
+.TH LIBJ2_MIN_J2I 3 LIBJ2
+.SH NAME
+libj2_min_j2i \- Select minimum of a set of values
+
+.SH SYNOPSIS
+.nf
+#include <libj2.h>
+
+void \fBlibj2_min_j2i\fP(struct libj2_j2i *\fIa\fP, ... /*, NULL */)
+void \fBlibj2_min_j2i_to_j2i\fP(const struct libj2_j2i *\fIa\fP, ... /*, NULL, struct libj2_j2i *\fIr\fP */)
+const struct libj2_j2i *\fBlibj2_min_j2i_return\fP(const struct libj2_j2i *\fIa\fP, ... /*, NULL */)
+void \fBlibj2_vmin_j2i\fP(struct libj2_j2i *\fIa\fP, va_list \fIargs\fP)
+void \fBlibj2_vmin_j2i_to_j2i\fP(const struct libj2_j2i *\fIa\fP, va_list \fIargs\fP)
+const struct libj2_j2i *\fBlibj2_vmin_j2i_return\fP(const struct libj2_j2i *\fIa\fP, va_list \fIargs\fP)
+void \fBlibj2_min_j2u\fP(struct libj2_j2u *\fIa\fP, ... /*, NULL */)
+void \fBlibj2_min_j2u_to_j2u\fP(const struct libj2_j2u *\fIa\fP, ... /*, NULL, struct libj2_j2u *\fIr\fP */)
+const struct libj2_j2u *\fBlibj2_min_j2u_return\fP(const struct libj2_j2u *\fIa\fP, ... /*, NULL */)
+void \fBlibj2_vmin_j2u\fP(struct libj2_j2u *\fIa\fP, va_list \fIargs\fP)
+void \fBlibj2_vmin_j2u_to_j2u\fP(const struct libj2_j2u *\fIa\fP, va_list \fIargs\fP)
+const struct libj2_j2u *\fBlibj2_vmin_j2u_return\fP(const struct libj2_j2u *\fIa\fP, va_list \fIargs\fP)
+.fi
+.PP
+Link with
+.IR -lj2 .
+
+.SH DESCRIPTION
+The above listed functions
+selects the minimum value of
+.I a
+and all follow arguments up to the first
+(and only)
+.I NULL
+argument (the so called
+.I NULL
+sentinel). For the functions with a
+.B va_list
+parameter, arguments are read from it.
+.PP
+The arguments after
+.I a
+or, for the functions with a
+.B va_list
+parameter, inside
+.I args
+must have the same type as
+.IR a ,
+except it can be
+.B const
+regardless of whether
+.I a
+is
+.BR const .
+.PP
+For the
+.BR libj2_min_j2i (),
+.BR libj2_vmin_j2i (),
+.BR libj2_min_j2u (),
+and
+.BR libj2_vmin_j2u ()
+functions, the minimum value is stored in
+.IR a .
+.PP
+For the
+.BR libj2_min_j2i_to_j2i (),
+.BR libj2_vmin_j2i_to_j2i (),
+.BR libj2_min_j2u_to_j2u (),
+and
+.BR libj2_vmin_j2u_to_j2u ()
+functions, the minimum value is stored in
+and argument, with the same type as
+.IR a ,
+except without the qualifier
+.BR const ,
+provided by the caller immediately after the
+.I NULL
+sentinel.
+.PP
+For the
+.BR libj2_min_j2i_return (),
+.BR libj2_vmin_j2i_return (),
+.BR libj2_min_j2u_return (),
+and
+.BR libj2_vmin_j2u_return ()
+functions, the argument with the minimum
+value is returned by the function. In the
+case that multiple arguments have the same
+value which is also the minimum value, one
+of the is returned arbitrarily. It is safe
+to remove the qualifier
+.BR const
+if you know that the argument with the
+minimum value did not have the qualifier
+.BR const
+const (it is the same pointer).
+.PP
+The arguments, except the sentinel in
+the varidic lists, are assumed to be
+.RI non- NULL .
+.RI ( a
+is assumed to be
+.RI non- NULL .)
+
+.SH RETURN VALUE
+For the
+.BR libj2_min_j2i_return (),
+.BR libj2_vmin_j2i_return (),
+.BR libj2_min_j2u_return (),
+and
+.BR libj2_vmin_j2u_return ()
+functions one of the arguments with the
+lowest value, is returned, for the
+other functions, there is no return value.
+
+.SH ERRORS
+The above listed functions cannot fail.
+
+.SH HISTORY
+The
+.BR libj2_min_j2u (),
+.BR libj2_min_j2u_to_j2u (),
+.BR libj2_min_j2u_return (),
+.BR libj2_vmin_j2u (),
+.BR libj2_vmin_j2u_to_j2u (),
+and
+.BR libj2_vmin_j2u_return ()
+functions were added in version 1.0 of
+.BR libj2 .
+.PP
+The
+.BR libj2_min_j2i (),
+.BR libj2_min_j2i_to_j2i (),
+.BR libj2_min_j2i_return (),
+.BR libj2_vmin_j2i (),
+.BR libj2_vmin_j2i_to_j2i (),
+and
+.BR libj2_vmin_j2i_return ()
+functions were added in version 1.1 of
+.BR libj2 .
+
+.SH SEE ALSO
+.BR libj2 (7),
+.BR libj2_max_j2i (3),
+.BR libj2_j2i_min_j2i (3),
+.BR libj2_j2i_max_j2i (3)