From d0fa516ae007ac94083ea84595f0abf88ecfc265 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 21 Jan 2026 16:48:02 +0100 Subject: Add some man pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libj2_min_j2i.3 | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 libj2_min_j2i.3 (limited to 'libj2_min_j2i.3') 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 + +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) -- cgit v1.2.3-70-g09d2