lib/intprops.h


Log

Author Commit Date CI Message
Jim Meyering add25498 2005-09-27T08:40:36 (signed_type_or_expr__): Define. (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound for unsigned types.
Paul Eggert 267a39ba 2005-05-14T06:03:57 *** empty log message ***
Paul Eggert d3aea660 2005-03-26T17:53:44 one's complement -> ones' complement (as per Knuth)
Paul Eggert d6913e92 2005-03-26T17:47:53 (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): "value of type" -> "type or expression" in comment.
Jim Meyering 8baf2fec 2005-03-26T11:10:52 Comment nits. Add the apostrophe in `(one|two)'s complement'. Correct typos: s/or/of/.
Paul Eggert b6097b0f 2005-03-09T23:22:50 Add TYPE_ONES_COMPLEMENT and TYPE_SIGNED_MAGNITUDE, and use less-tricky TYPE_MINIMUM and TYPE_MAXIMUM.
Paul Eggert eef56b54 2005-03-09T19:11:23 Factor int-properties macros into a single file, except for glibc-related files. * lib/intprops.h: New file. * lib/getloadavg.c: Include it instead of limits.h. (INT_STRLEN_BOUND): Remove. * lib/human.c: Include intprops.h. (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself. * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than 302/1000. * lib/inttostr.h: Include intprops.h instead of limits.h. (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove. * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros, for consistency with intprops.h. (time_t_is_integer, twos_complement_arithmetic): Use them. * lib/sig2str.h: Include <signal.h>, intprops.h. (INT_STRLEN_BOUND): Remove. * lib/strftime.c (TYPE_SIGNED): Remove. (INT_STRLEN_BOUND): Switch to same implementation as intprops.h. * lib/strtol.c: Adjust comments to match intprops.h. * lib/userspec.c: Include intprops.h. (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove. * lib/utimecmp.c, lib/xnanosleep.c, lib/xstrtol.c: Likewise. * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT instead of rolling our own expressions. * lib/xstrtol.c: Include xstrtol.h first, to test interface. * modules/getloadavg (Files): Add lib/intprops.h. * modules/human (Files): Likewise. * modules/inttostr (Files): Likewise. * modules/sig2str (Files): Likewise. * modules/userspec (Files): Likewise. * modules/utimecmp (Files): Likewise. * modules/xnanosleep (Files): Likewise. * modules/xstrtol (Files): Likewise.