]> git.draconx.ca Git - dxcommon.git/commit
help_print_optstring: Better output on some old systems.
authorNick Bowler <nbowler@draconx.ca>
Wed, 6 Dec 2023 01:10:08 +0000 (20:10 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 6 Dec 2023 01:17:54 +0000 (20:17 -0500)
commit2849f722ef8dd9bf9dcdfb0aa11e08a050cf302e
tree7cced5069f4241caedb1bc53802a6e102157c23a
parentcc589a8b1539e9515985081d9498dda2b6b6caf7
help_print_optstring: Better output on some old systems.

Some very old printf implementations return 0 on success instead of the
number of bytes written.  We should never see a return of 0 normally,
so we can improve the output to be less of a garbled mess by printing a
newline if that happens (same as the error case).  This is a simple
tweak that should have virtually no impact on modern systems.

The tests are adapted to verify the new behaviour, although we'll mark
the result as "skipped" (assuming it is correct) instead of "passed"
since it's only sortof working.
Makefile.am
src/help.c
t/.gitignore
t/printfchk.c [new file with mode: 0644]
tests/functions.at