summaryrefslogtreecommitdiffstats
path: root/man3/MAX.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/MAX.3')
-rw-r--r--man3/MAX.312
1 files changed, 6 insertions, 6 deletions
diff --git a/man3/MAX.3 b/man3/MAX.3
index 2fa4216fc..fddf22083 100644
--- a/man3/MAX.3
+++ b/man3/MAX.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH MAX 3 2022-10-30 "Linux man-pages 6.03"
+.TH MAX 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
MAX, MIN \- maximum or minimum of two values
.SH LIBRARY
@@ -27,7 +27,7 @@ possibly converted to a different type (see BUGS).
These macros may raise the "invalid" floating-point exception
when any of the arguments is NaN.
.SH STANDARDS
-These nonstandard macros are present in glibc and the BSDs.
+GNU, BSD.
.SH NOTES
If either of the arguments is of a floating-point type,
you might prefer to use
@@ -50,22 +50,22 @@ To avoid this, ensure that both arguments have the same type.
#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
-
+\&
int
main(int argc, char *argv[])
{
int a, b, x;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <num> <num>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
a = atoi(argv[1]);
b = atoi(argv[2]);
x = MAX(a, b);
printf("MAX(%d, %d) is %d\en", a, b, x);
-
+\&
exit(EXIT_SUCCESS);
}
.EE