From a3eba19470c09f42272dac5ca1a34bd8a5cbe834 Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Tue, 17 Nov 2009 10:26:25 +0100 Subject: The original version of DDEKit. --- libddekit/printf.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 libddekit/printf.c (limited to 'libddekit/printf.c') diff --git a/libddekit/printf.c b/libddekit/printf.c new file mode 100644 index 00000000..fb13a0b4 --- /dev/null +++ b/libddekit/printf.c @@ -0,0 +1,46 @@ +/* + * \brief Logging facility with printf()-like interface + * \author Thomas Friebel + * \date 2006-03-01 + */ + +#include + +#include + +/** + * Log constant string message w/o arguments + * + * \param msg message to be logged + */ +int ddekit_print(const char *msg) +{ + return LOG_printf("%s", msg); +} + +/** + * Log message with print()-like arguments + * + * \param fmt format string followed by optional arguments + */ +int ddekit_printf(const char *fmt, ...) +{ + int res; + va_list va; + + va_start(va, fmt); + res = ddekit_vprintf(fmt, va); + va_end(va); + + return res; +} + +/* Log message with vprintf()-like arguments + * + * \param fmt format string + * \param va variable argument list + */ +int ddekit_vprintf(const char *fmt, va_list va) +{ + return LOG_vprintf(fmt, va); +} -- cgit v1.2.3