57 |
#define DEBUG_CLIPBOARD(args) |
#define DEBUG_CLIPBOARD(args) |
58 |
#endif |
#endif |
59 |
|
|
60 |
|
#ifdef WITH_DEBUG_CHANNEL |
61 |
|
#define DEBUG_CHANNEL(args) printf args; |
62 |
|
#else |
63 |
|
#define DEBUG_CHANNEL(args) |
64 |
|
#endif |
65 |
|
|
66 |
#define STRNCPY(dst,src,n) { strncpy(dst,src,n-1); dst[n-1] = 0; } |
#define STRNCPY(dst,src,n) { strncpy(dst,src,n-1); dst[n-1] = 0; } |
67 |
|
|
68 |
#ifndef MIN |
#ifndef MIN |
73 |
#define MAX(x,y) (((x) > (y)) ? (x) : (y)) |
#define MAX(x,y) (((x) > (y)) ? (x) : (y)) |
74 |
#endif |
#endif |
75 |
|
|
76 |
|
/* timeval macros */ |
77 |
|
#ifndef timerisset |
78 |
|
#define timerisset(tvp)\ |
79 |
|
((tvp)->tv_sec || (tvp)->tv_usec) |
80 |
|
#endif |
81 |
|
#ifndef timercmp |
82 |
|
#define timercmp(tvp, uvp, cmp)\ |
83 |
|
((tvp)->tv_sec cmp (uvp)->tv_sec ||\ |
84 |
|
(tvp)->tv_sec == (uvp)->tv_sec &&\ |
85 |
|
(tvp)->tv_usec cmp (uvp)->tv_usec) |
86 |
|
#endif |
87 |
|
#ifndef timerclear |
88 |
|
#define timerclear(tvp)\ |
89 |
|
((tvp)->tv_sec = (tvp)->tv_usec = 0) |
90 |
|
#endif |
91 |
|
|
92 |
/* If configure does not define the endianess, try |
/* If configure does not define the endianess, try |
93 |
to find it out */ |
to find it out */ |
94 |
#if !defined(L_ENDIAN) && !defined(B_ENDIAN) |
#if !defined(L_ENDIAN) && !defined(B_ENDIAN) |