.TH LIBJ2_MAX_J2I 3 LIBJ2 .SH NAME libj2_max_j2i \- Select maximum of a set of values .SH SYNOPSIS .nf #include void \fBlibj2_max_j2i\fP(struct libj2_j2i *\fIa\fP, ... /*, NULL */) void \fBlibj2_max_j2i_to_j2i\fP(const struct libj2_j2i *\fIa\fP, ... /*, NULL, struct libj2_j2i *\fIr\fP */) const struct libj2_j2i *\fBlibj2_max_j2i_return\fP(const struct libj2_j2i *\fIa\fP, ... /*, NULL */) void \fBlibj2_vmax_j2i\fP(struct libj2_j2i *\fIa\fP, va_list \fIargs\fP) void \fBlibj2_vmax_j2i_to_j2i\fP(const struct libj2_j2i *\fIa\fP, va_list \fIargs\fP) const struct libj2_j2i *\fBlibj2_vmax_j2i_return\fP(const struct libj2_j2i *\fIa\fP, va_list \fIargs\fP) void \fBlibj2_max_j2u\fP(struct libj2_j2u *\fIa\fP, ... /*, NULL */) void \fBlibj2_max_j2u_to_j2u\fP(const struct libj2_j2u *\fIa\fP, ... /*, NULL, struct libj2_j2u *\fIr\fP */) const struct libj2_j2u *\fBlibj2_max_j2u_return\fP(const struct libj2_j2u *\fIa\fP, ... /*, NULL */) void \fBlibj2_vmax_j2u\fP(struct libj2_j2u *\fIa\fP, va_list \fIargs\fP) void \fBlibj2_vmax_j2u_to_j2u\fP(const struct libj2_j2u *\fIa\fP, va_list \fIargs\fP) const struct libj2_j2u *\fBlibj2_vmax_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 maximum 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_max_j2i (), .BR libj2_vmax_j2i (), .BR libj2_max_j2u (), and .BR libj2_vmax_j2u () functions, the maximum value is stored in .IR a . .PP For the .BR libj2_max_j2i_to_j2i (), .BR libj2_vmax_j2i_to_j2i (), .BR libj2_max_j2u_to_j2u (), and .BR libj2_vmax_j2u_to_j2u () functions, the maximum 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_max_j2i_return (), .BR libj2_vmax_j2i_return (), .BR libj2_max_j2u_return (), and .BR libj2_vmax_j2u_return () functions, the argument with the maximum value is returned by the function. In the case that multiple arguments have the same value which is also the maximum value, one of the is returned arbitrarily. It is safe to remove the qualifier .BR const if you know that the argument with the maximum 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_max_j2i_return (), .BR libj2_vmax_j2i_return (), .BR libj2_max_j2u_return (), and .BR libj2_vmax_j2u_return () functions one of the arguments with the highest 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_max_j2u (), .BR libj2_max_j2u_to_j2u (), .BR libj2_max_j2u_return (), .BR libj2_vmax_j2u (), .BR libj2_vmax_j2u_to_j2u (), and .BR libj2_vmax_j2u_return () functions were added in version 1.0 of .BR libj2 . .PP The .BR libj2_max_j2i (), .BR libj2_max_j2i_to_j2i (), .BR libj2_max_j2i_return (), .BR libj2_vmax_j2i (), .BR libj2_vmax_j2i_to_j2i (), and .BR libj2_vmax_j2i_return () functions were added in version 1.1 of .BR libj2 . .SH SEE ALSO .BR libj2 (7), .BR libj2_min_j2i (3), .BR libj2_j2i_max_j2i (3), .BR libj2_j2i_min_j2i (3)