]> mj.ucw.cz Git - osdd.git/blob - util.h
First two examples
[osdd.git] / util.h
1 /*
2  *      On-screen Display Daemon -- Utility Functions
3  *
4  *      (c) 2010 Martin Mares <mj@ucw.cz>
5  */
6
7 #define NONRET __attribute__((noreturn))
8 #define FORMAT_CHECK(func,i,j) __attribute__((format(func,i,j)))
9
10 void NONRET FORMAT_CHECK(printf,1,2) die(char *fmt, ...);
11
12 #ifdef DEBUG
13 #define DBG(f...) printf(f)
14 #else
15 #define DBG(f...) do { } while(0)
16 #endif
17
18 void *xmalloc(int size);