Macro definitions don't allow whitespace before (argument list). Now I know

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1512 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 16 years ago
parent c488ad4dc2
commit 2f94119d73

@ -55,9 +55,9 @@
#define BITS_ABS(a) (((((a) + MAX_BITS_ABS_VAL) / MAX_BITS_ABS_VAL) * 2 - 1) * (a))
#define BITS_MIN(a,b) (((a) + (b) - BITS_ABS((a) - (b))) / 2)
#define URJ_BIT (b) (1 << (b))
#define URJ_BITS (b1,b2) (((2 << BITS_ABS((b1) - (b2))) - 1) << BITS_MIN(b1,b2))
#define URJ_BITS_VAL (b1,b2,v) (((v) << BITS_MIN(b1,b2)) & URJ_BITS (b1,b2))
#define URJ_BITS_GET (b1,b2,v) (((v) & URJ_BITS (b1,b2)) >> BITS_MIN(b1,b2))
#define URJ_BIT(b) (1 << (b))
#define URJ_BITS(b1,b2) (((2 << BITS_ABS((b1) - (b2))) - 1) << BITS_MIN(b1,b2))
#define URJ_BITS_VAL(b1,b2,v) (((v) << BITS_MIN(b1,b2)) & URJ_BITS (b1,b2))
#define URJ_BITS_GET(b1,b2,v) (((v) & URJ_BITS (b1,b2)) >> BITS_MIN(b1,b2))
#endif /* COMMON_H */

Loading…
Cancel
Save