Home GnuPG
Diffusion GPGME e11e7fc55866

gpgme-tool: Use membuf functions to build up strings.
e11e7fc55866Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpgme-tool: Use membuf functions to build up strings.

* src/gpgme-tool.c (clear_membuf, init_membuf, put_membuf)
(put_membuf_str, get_membuf, peek_membuf): Add membuf functions.
Take from GnuPG master's common/membuf.[ch] and patch for our use.
(result_xml_escape): Rewrite using new functions.

First counting, then allocating, and finally copying data is prone to
errors. We better use the membuf functions which make it much easier.

Details

Provenance
wernerAuthored on Oct 11 2012, 5:02 PM
Parents
rMaa30b47aa010: gpgme-tool: Change license from LPGLv2+ to GPLv3+
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rMe11e7fc55866: gpgme-tool: Use membuf functions to build up strings. (authored by Werner Koch <wk@gnupg.org>).Oct 11 2012, 5:02 PM