1 /* Test of obstack_zprintf() and obstack_vzprintf() functions.
2 Copyright (C) 2008-2024 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
22 #include "signature.h"
23 SIGNATURE_CHECK (obstack_zprintf
, ptrdiff_t,
24 (struct obstack
*, char const *, ...));
25 SIGNATURE_CHECK (obstack_vzprintf
, ptrdiff_t,
26 (struct obstack
*, char const *, va_list));
37 #define RETTYPE ptrdiff_t
38 #include "test-obstack-printf.h"
41 my_obstack_zprintf (struct obstack
*obs
, const char *format
, ...)
46 va_start (args
, format
);
47 ret
= obstack_vzprintf (obs
, format
, args
);
53 main (int argc
, char *argv
[])
55 test_function (my_obstack_zprintf
);
56 test_function (obstack_zprintf
);
57 return test_exit_status
;