Fix some Doxygen issues
[strongswan.git] / src / libstrongswan / utils / printf_hook / printf_hook_vstr.h
1 /*
2 * Copyright (C) 2009 Tobias Brunner
3 * Copyright (C) 2006-2008 Martin Willi
4 * Hochschule fuer Technik Rapperswil
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 /**
18 * @defgroup printf_hook_vstr printf_hook_vstr
19 * @{ @ingroup printf_hook
20 */
21
22 #ifndef PRINTF_HOOK_VSTR_H_
23 #define PRINTF_HOOK_VSTR_H_
24
25 #include <stdarg.h>
26 #include <stdio.h>
27
28 int vstr_wrapper_printf(const char *format, ...);
29 int vstr_wrapper_fprintf(FILE *stream, const char *format, ...);
30 int vstr_wrapper_sprintf(char *str, const char *format, ...);
31 int vstr_wrapper_snprintf(char *str, size_t size, const char *format, ...);
32 int vstr_wrapper_asprintf(char **str, const char *format, ...);
33
34 int vstr_wrapper_vprintf(const char *format, va_list ap);
35 int vstr_wrapper_vfprintf(FILE *stream, const char *format, va_list ap);
36 int vstr_wrapper_vsprintf(char *str, const char *format, va_list ap);
37 int vstr_wrapper_vsnprintf(char *str, size_t size, const char *format, va_list ap);
38 int vstr_wrapper_vasprintf(char **str, const char *format, va_list ap);
39
40 #ifdef printf
41 #undef printf
42 #endif
43 #ifdef fprintf
44 #undef fprintf
45 #endif
46 #ifdef sprintf
47 #undef sprintf
48 #endif
49 #ifdef snprintf
50 #undef snprintf
51 #endif
52 #ifdef asprintf
53 #undef asprintf
54 #endif
55 #ifdef vprintf
56 #undef vprintf
57 #endif
58 #ifdef vfprintf
59 #undef vfprintf
60 #endif
61 #ifdef vsprintf
62 #undef vsprintf
63 #endif
64 #ifdef vsnprintf
65 #undef vsnprintf
66 #endif
67 #ifdef vasprintf
68 #undef vasprintf
69 #endif
70
71 #define printf vstr_wrapper_printf
72 #define fprintf vstr_wrapper_fprintf
73 #define sprintf vstr_wrapper_sprintf
74 #define snprintf vstr_wrapper_snprintf
75 #define asprintf vstr_wrapper_asprintf
76
77 #define vprintf vstr_wrapper_vprintf
78 #define vfprintf vstr_wrapper_vfprintf
79 #define vsprintf vstr_wrapper_vsprintf
80 #define vsnprintf vstr_wrapper_vsnprintf
81 #define vasprintf vstr_wrapper_vasprintf
82
83 #endif /** PRINTF_HOOK_VSTR_H_ @}*/