1 /* asshelp2.c - More helper functions for Assuan
2 * Copyright (C) 2012 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of either
9 * - the GNU Lesser General Public License as published by the Free
10 * Software Foundation; either version 3 of the License, or (at
11 * your option) any later version.
15 * - the GNU General Public License as published by the Free
16 * Software Foundation; either version 2 of the License, or (at
17 * your option) any later version.
19 * or both in parallel, as here.
21 * This file is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see <https://www.gnu.org/licenses/>.
40 /* Helper function to print an assuan status line using a printf
43 vprint_assuan_status (assuan_context_t ctx,
45 const char *format, va_list arg_ptr)
50 rc = gpgrt_vasprintf (&buf, format, arg_ptr);
52 return gpg_err_make (default_errsource, gpg_err_code_from_syserror ());
53 rc = assuan_write_status (ctx, keyword, buf);
59 /* Helper function to print an assuan status line using a printf
62 print_assuan_status (assuan_context_t ctx,
64 const char *format, ...)
69 va_start (arg_ptr, format);
70 err = vprint_assuan_status (ctx, keyword, format, arg_ptr);