diff options
author | Tobias Brunner <tobias@strongswan.org> | 2009-03-12 18:07:32 +0000 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2009-03-12 18:07:32 +0000 |
commit | d25ce3701e066121d2026b0dfd72a794f3bbee29 (patch) | |
tree | aa4833262e49963746a430d2a07381986395aae4 /src/libstrongswan/utils.h | |
parent | 9086102dfd4a9fe654af922d00bc5e5238547f21 (diff) | |
download | strongswan-d25ce3701e066121d2026b0dfd72a794f3bbee29.tar.bz2 strongswan-d25ce3701e066121d2026b0dfd72a794f3bbee29.tar.xz |
printf hooks refactored to increase portability (i.e. support for platforms without glibc-compatible customizable printf - the Vstr string library is currently required on such platforms).
Diffstat (limited to 'src/libstrongswan/utils.h')
-rw-r--r-- | src/libstrongswan/utils.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/libstrongswan/utils.h b/src/libstrongswan/utils.h index c794b0797..947a488fe 100644 --- a/src/libstrongswan/utils.h +++ b/src/libstrongswan/utils.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Tobias Brunner + * Copyright (C) 2008-2009 Tobias Brunner * Copyright (C) 2008 Martin Willi * Hochschule fuer Technik Rapperswil * @@ -285,31 +285,30 @@ bool ref_put(refcount_t *ref); #endif /* HAVE_GCC_ATOMIC_OPERATIONS */ /** - * Get printf hooks for time. + * printf hook for time_t. * * Arguments are: - * time_t* time - * Arguments using #-specificer * time_t* time, bool utc */ -printf_hook_functions_t time_get_printf_hooks(); +int time_printf_hook(char *dst, size_t len, printf_hook_spec_t *spec, + const void *const *args); /** - * Get printf hooks for time deltas. + * printf hook for time_t deltas. * * Arguments are: - * time_t* delta - * Arguments using #-specificer * time_t* begin, time_t* end */ -printf_hook_functions_t time_delta_get_printf_hooks(); +int time_delta_printf_hook(char *dst, size_t len, printf_hook_spec_t *spec, + const void *const *args); /** - * Get printf hooks for time deltas. + * printf hook for memory areas. * * Arguments are: * u_char *ptr, int len */ -printf_hook_functions_t mem_get_printf_hooks(); +int mem_printf_hook(char *dst, size_t len, printf_hook_spec_t *spec, + const void *const *args); #endif /* UTILS_H_ @}*/ |