| 1 | /* |
| 2 | Authors: |
| 3 | Pavel Březina <[email protected]> |
| 4 | |
| 5 | Copyright (C) 2017 Red Hat |
| 6 | |
| 7 | This program is free software; you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation; either version 3 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
| 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #include "config.h"cxx . . $ `<file>/config.h`/ |
| 22 | |
| 23 | #include <stdarg.h> |
| 24 | #include <stdio.h> |
| 25 | |
| 26 | char * |
| 27 | vaformatcxx . . $ vaformat(db813db1ba4aba5a).(const char *fmt, va_listcxx . . $ va_list# in_va) |
| 28 | { |
| 29 | char *str = NULLcxx . . $ `<external>/16391990256953433862/stddef.h:419:9`!; |
| 30 | va_listcxx . . $ va_list# va; |
| 31 | int ret; |
| 32 | |
| 33 | va_copycxx . . $ `<external>/8293021631987149590/stdarg.h:57:9`!(va, in_va); |
| 34 | ret = vasprintfcxx . . $ vasprintf(592150f15fbaad71).(&str, fmt, va); |
| 35 | va_endcxx . . $ `<external>/8293021631987149590/stdarg.h:53:9`!(va); |
| 36 | |
| 37 | if (ret == -1) { |
| 38 | return NULLcxx . . $ `<external>/16391990256953433862/stddef.h:419:9`!; |
| 39 | } |
| 40 | |
| 41 | return str; |
| 42 | } |
| 43 | |
| 44 | char * |
| 45 | formatcxx . . $ format(a849077ff1b8d812).(const char *fmt, ...) |
| 46 | { |
| 47 | char *str; |
| 48 | va_listcxx . . $ va_list# va; |
| 49 | |
| 50 | va_startcxx . . $ `<external>/8293021631987149590/stdarg.h:51:9`!(va, fmt); |
| 51 | str = vaformatcxx . . $ vaformat(db813db1ba4aba5a).(fmt, va); |
| 52 | va_endcxx . . $ `<external>/8293021631987149590/stdarg.h:53:9`!(va); |
| 53 | |
| 54 | return str; |
| 55 | } |