summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-09-04 00:24:12 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-09-04 00:24:12 -0700
commitc81d4c183a13638d7f9a48cd5d6c7dc554ae0174 (patch)
tree0979785711643a1e6a58282e13f9ecee54fb3510
parent6b8032a320a75053c6607fcd37d2d67ffe61fd77 (diff)
downloadgnulib-c81d4c183a13638d7f9a48cd5d6c7dc554ae0174.tar.gz
intprops: fix minor doc glitches
* doc/intprops.texi (Integer Properties): Fix doc glitches.
-rw-r--r--ChangeLog5
-rw-r--r--doc/intprops.texi17
2 files changed, 13 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index e762c210d7..f9e3986028 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ intprops: fix minor doc glitches
+ * doc/intprops.texi (Integer Properties): Fix doc glitches.
+
2021-09-04 Simon Josefsson <simon@josefsson.org>
doc: Add suggestions on FDL texinfo usage.
diff --git a/doc/intprops.texi b/doc/intprops.texi
index 6166ee8c3a..d71c388173 100644
--- a/doc/intprops.texi
+++ b/doc/intprops.texi
@@ -81,12 +81,12 @@ Example usage:
@example
#include <intprops.h>
-#include <time.h>
+#include <sys/types.h>
enum
@{
- time_t_is_signed_integer =
- TYPE_IS_INTEGER (time_t) && TYPE_SIGNED (time_t)
+ clock_t_is_integer = TYPE_IS_INTEGER (clock_t),
+ uid_t_is_signed = TYPE_SIGNED (uid_t)
@};
int
@@ -135,17 +135,16 @@ leading @code{-} character. This is one less than
@code{TYPE_MINIMUM (@var{t})} and @code{TYPE_MAXIMUM (@var{t})} are
integer constant expressions equal to the minimum and maximum
values of the integer type @var{t}. These expressions are of the type
-@var{t} (or more precisely, the type @var{t} after integer
-promotions).
+@var{t}.
Example usage:
@example
-#include <stdint.h>
+#include <stdbool.h>
#include <sys/types.h>
#include <intprops.h>
-int
-in_off_t_range (intmax_t a)
+bool
+in_off_t_range (long long int a)
@{
return TYPE_MINIMUM (off_t) <= a && a <= TYPE_MAXIMUM (off_t);
@}
@@ -195,7 +194,7 @@ void
print_product (long int a, long int b)
@{
long int r;
- if (INT_MULTIPLY_OK (a, b, r))
+ if (INT_MULTIPLY_OK (a, b, &r))
printf ("result is %ld\n", r);
else
printf ("overflow\n");