]> git.draconx.ca Git - dxcommon.git/commit
help_print_optstring: Don't depend on snprintf.
authorNick Bowler <nbowler@draconx.ca>
Thu, 16 Nov 2023 01:33:31 +0000 (20:33 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 16 Nov 2023 01:33:31 +0000 (20:33 -0500)
commit476f42d951d7e9f9f30e1a6acb34982466936490
treed49200a624a5b36a6f805daac05f092bca3db657
parent02e6afe4c4956fd667dfefc04e8f129b5b84f709
help_print_optstring: Don't depend on snprintf.

The current code calls snprintf unconditionally, even if NLS is disabled
(although the function is not called, the code is still compiled), so it
won't build in environments which lack this function.

For the NLS-enabled case we can rely on the GNU libintl fallback being
available as required.

Otherwise we can just provide a stub to ensure the dead code compiles,
and for the NLS test programs hack in sprintf as a replacement which
should work just fine.
src/help.c
t/nls/gettext.h