summaryrefslogtreecommitdiff
path: root/lib/offtostr.c
Commit message (Collapse)AuthorAgeFilesLines
* inttostr: simplify by removing unnecessary redundancyPaul Eggert2010-10-241-1/+0
| | | | | | | | | | | * lib/anytostr.c: Don't include verify.h. (anytostr): Don't verify that TYPE_SIGNED (inttype) equals inttype_is_signed. Instead, disable the bogus GCC warnings, so that there's no need for inttype_is_signed and for calling TYPE_SIGNED. * lib/imaxtostr.c (inttype_is_signed): Remove; no longer needed. * lib/inttostr.c, lib/offtostr.c, lib/uinttostr.c, lib/umaxtostr.c: Likewise. * modules/inttostr (Depends-on): Remove 'verify'.
* inttostr: revert most-recent changePaul Eggert2010-10-221-0/+1
|
* inttostr: simplify by removing unnecessary redundancyPaul Eggert2010-10-221-1/+0
| | | | | | | | | | | | | * lib/anytostr.c: Don't include verify.h. (anytostr): Don't verify that TYPE_SIGNED (inttype) equals inttype_is_signed. Instead, use TYPE_SIGNED (inttype) directly. This removes the need for inttype_is_signed, which was put in to suppress some GCC warnings about conversions. This rewrite should also suppress those warnings. * lib/imaxtostr.c (inttype_is_signed): Remove; no longer needed. * lib/inttostr.c, lib/offtostr.c, lib/uinttostr.c, lib/umaxtostr.c: Likewise. * modules/inttostr (Depends-on): Remove 'verify'.
* inttostr: add a new function, inttostr, and testsJim Meyering2010-06-101-2/+2
| | | | | | | | | | | | | | | | | The namesake function was not available. The existence of the template file, inttostr.c makes its addition nontrivial. * lib/anytostr.c: Rename from inttostr.c. (anytostr): Rename from inttostr. * lib/inttostr.c: New file. * modules/inttostr (Files): Add anytostr.c. (Makefile.am): Set lib_SOURCES instead of ... * m4/inttostr.m4: Remove uses of AC_LIBOBJ. * lib/imaxtostr.c: Update use. s/inttostr/anytostr/ * lib/offtostr.c: Likewise. * lib/uinttostr.c: Likewise. * lib/umaxtostr.c: Likewise. * modules/inttostr-tests: New file. * tests/test-inttostr.c: New file. Test these functions.
* inttostr: aesthetics and improved (compile-time) safetyJim Meyering2009-10-311-0/+1
| | | | | | | | | | | | | Define inttype_is_signed rather than inttype_is_unsigned, since the sole use is via "#if inttype_is_signed". * lib/imaxtostr.c (inttype_is_signed): Define this, rather than inttype_is_unsigned. * lib/offtostr.c (inttype_is_signed): Likewise. * lib/uinttostr.c (inttype_is_signed): Likewise. * lib/umaxtostr.c (inttype_is_signed): Likewise. * lib/inttostr.c (inttostr): Use verify to cross-check the inttype_is_signed value and the signedness of the actual type. * modules/inttostr (Depends-on): Add verify.
* New module inttostr.Paul Eggert2004-03-311-0/+3