root / lab4 / .minix-src / include / ddekit / printf.h @ 14
History | View | Annotate | Download (760 Bytes)
1 |
#ifndef _DDEKIT_PRINTF_H
|
---|---|
2 |
#define _DDEKIT_PRINTF_H
|
3 |
|
4 |
#include <ddekit/ddekit.h> |
5 |
#include <stdarg.h> |
6 |
|
7 |
/** Print message.
|
8 |
* \ingroup DDEKit_util
|
9 |
*/
|
10 |
int ddekit_print(const char *); |
11 |
|
12 |
/** Print message with format.
|
13 |
* \ingroup DDEKit_util
|
14 |
*/
|
15 |
int ddekit_printf(const char *fmt, ...); |
16 |
|
17 |
/** Print message with format list.
|
18 |
* \ingroup DDEKit_util
|
19 |
*/
|
20 |
int ddekit_vprintf(const char *fmt, va_list va); |
21 |
|
22 |
/** Log function and message.
|
23 |
* \ingroup DDEKit_util
|
24 |
*/
|
25 |
#define ddekit_log(doit, msg...) \
|
26 |
do { \
|
27 |
if (doit) { \
|
28 |
ddekit_printf("%s(): ", __func__); \
|
29 |
ddekit_printf(msg); \ |
30 |
ddekit_printf("\n"); \
|
31 |
} \ |
32 |
} while(0); |
33 |
|
34 |
#endif
|