[Reproducible-commits] [dpkg] 10/30: libdpkg: Add new fmt and vfmt varbuf methods
Mattia Rizzolo
mattia at debian.org
Mon May 9 09:02:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit 836dc7412c1d5d5fa3825fc5d2761ca1388d38c3
Author: Guillem Jover <guillem at debian.org>
Date: Fri May 6 01:16:32 2016 +0200
libdpkg: Add new fmt and vfmt varbuf methods
---
lib/dpkg/varbuf.h | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/lib/dpkg/varbuf.h b/lib/dpkg/varbuf.h
index a6991f8..9b9a30f 100644
--- a/lib/dpkg/varbuf.h
+++ b/lib/dpkg/varbuf.h
@@ -62,6 +62,8 @@ struct varbuf {
void init(size_t _size = 0);
void reset();
void destroy();
+ int fmt(const char *_fmt, ...) DPKG_ATTR_PRINTF(2);
+ int vfmt(const char *_fmt, va_list va) DPKG_ATTR_VPRINTF(2);
void operator()(int c);
void operator()(const char *s);
const char *string();
@@ -131,6 +133,25 @@ varbuf::destroy()
varbuf_destroy(this);
}
+inline int
+varbuf::fmt(const char *_fmt, ...)
+{
+ va_list args;
+ int rc;
+
+ va_start(args, _fmt);
+ rc = varbuf_vprintf(this, _fmt, args);
+ va_end(args);
+
+ return rc;
+}
+
+inline int
+varbuf::vfmt(const char *_fmt, va_list va)
+{
+ return varbuf_vprintf(this, _fmt, va);
+}
+
inline void
varbuf::operator()(int c)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list