]> git.sur5r.net Git - i3/i3lock/blob - i3lock.h
Merge pull request #213 from trickeydan/patch-1
[i3/i3lock] / i3lock.h
1 #ifndef _I3LOCK_H
2 #define _I3LOCK_H
3
4 /* This macro will only print debug output when started with --debug.
5  * This is important because xautolock (for example) closes stdout/stderr by
6  * default, so just printing something to stdout will lead to the data ending
7  * up on the X11 socket (!). */
8 #define DEBUG(fmt, ...)                                   \
9     do {                                                  \
10         if (debug_mode)                                   \
11             printf("[i3lock-debug] " fmt, ##__VA_ARGS__); \
12     } while (0)
13
14 #endif