Here is how macros helps us to reduce code duplication
#define FUNCTION(rw) \
static int fun_##rw##_test() \
{ \
dev_##rw = x \
down_##rw(); \
/* Do something */ \
return 0; \
} \
Sunday, October 4, 2009
Subscribe to:
Posts (Atom)