2011-02-25 13:31:20 +01:00
|
|
|
#ifndef _DDEKIT_PRINTF_H
|
|
|
|
#define _DDEKIT_PRINTF_H
|
|
|
|
|
|
|
|
#include <ddekit/ddekit.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
/** Print message.
|
|
|
|
* \ingroup DDEKit_util
|
|
|
|
*/
|
2012-03-24 16:16:34 +01:00
|
|
|
int ddekit_print(const char *);
|
2011-02-25 13:31:20 +01:00
|
|
|
|
|
|
|
/** Print message with format.
|
|
|
|
* \ingroup DDEKit_util
|
|
|
|
*/
|
2012-03-24 16:16:34 +01:00
|
|
|
int ddekit_printf(const char *fmt, ...);
|
2011-02-25 13:31:20 +01:00
|
|
|
|
|
|
|
/** Print message with format list.
|
|
|
|
* \ingroup DDEKit_util
|
|
|
|
*/
|
2012-03-24 16:16:34 +01:00
|
|
|
int ddekit_vprintf(const char *fmt, va_list va);
|
2011-02-25 13:31:20 +01:00
|
|
|
|
|
|
|
/** Log function and message.
|
|
|
|
* \ingroup DDEKit_util
|
|
|
|
*/
|
|
|
|
#define ddekit_log(doit, msg...) \
|
|
|
|
do { \
|
|
|
|
if (doit) { \
|
|
|
|
ddekit_printf("%s(): ", __func__); \
|
|
|
|
ddekit_printf(msg); \
|
|
|
|
ddekit_printf("\n"); \
|
|
|
|
} \
|
|
|
|
} while(0);
|
|
|
|
|
|
|
|
#endif
|