forked from gwAdvNet2015/gw-kv-store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.h
28 lines (23 loc) · 855 Bytes
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/************************************************
* GW KV
* https://github.com/gwAdvNet2015/gw-kv-store
*
* Copyright 2015 Phil Lopreiato, Stephen Monaghan,
* Neel Shah, Eric Armbrust
*
* This program is licensed under the MIT license.
*
* common.h - Used to enable verbose print.
*************************************************/
#ifndef __COMMON_H__
#define __COMMON_H__
extern volatile int verbose_print;
#define eprintf(format, ...) do { \
if (verbose_print) \
fprintf(stderr, format, ##__VA_ARGS__); \
} while(0)
#define kvprintf(format, ...) do { \
if (verbose_print) \
printf(format, ##__VA_ARGS__); \
} while(0)
#endif /* __COMMON_H__ */