Home GnuPG
Diffusion GnuPG 8d837279bce7

common: Improve helpfile.c to provide a generic template API.

Description

common: Improve helpfile.c to provide a generic template API.

* common/util.h (GET_TEMPLATE_CURRENT_LOCALE): New.
(GET_TEMPLATE_SUBST_ENVVARS): New.
(GET_TEMPLATE_CRLF): New.
* common/helpfile.c (findkey_fname): Add arg flags and terminate line
with CRLF if requested.
(findkey_locale): Replace arg only_current_locale by flags and add arg
domain.
(gnupg_get_help_string): Factor all code out to ...
(gnupg_get_template): new.  Add arg domain.  Handle SUBST flags.  Do
not trim tralins spaces with the CRLF flag.
* common/t-helpfile.c (main): Require domain name and add two options.

Details

Provenance
wernerAuthored on Wed, May 28, 3:19 PM
Parents
rGef5fa47ee80d: gpgtar: Fix regression exhibited by make check
Branches
Unknown
Tags
Unknown