]> git.sesse.net Git - plocate/blob - dprintf.h
Release plocate 1.1.22.
[plocate] / dprintf.h
1 #ifndef _DPRINTF_H
2 #define _DPRINTF_H 1
3
4 #include <stdio.h>
5
6 extern bool use_debug;
7
8 // Debug printf.
9 #define dprintf(...) \
10         do { \
11                 if (use_debug) { \
12                         fprintf(stderr, __VA_ARGS__); \
13                 } \
14         } while (false)
15
16 #endif  // !defined(_DPRINTF_H)