B
bob
Need help with c macro.
Have this call in my c program.
stub.c
SYMBOL(ALPHA) << no, dont want to change this to any other form.
SYMBOL(BETA)
Need a macro to expand each of above to this.
static struct somestruct struct_ALPHA = {"ALPHA"};
static struct somestruct struct_BETA = {"BETA"};
..
..
Cannot go beyond the following.
#define SYMBOL(ARG) \
static struct _CONCAT(struct_,ARG) = {?? what shud be here??};
Any help is appreciable.
Thx Bob.
Have this call in my c program.
stub.c
SYMBOL(ALPHA) << no, dont want to change this to any other form.
SYMBOL(BETA)
Need a macro to expand each of above to this.
static struct somestruct struct_ALPHA = {"ALPHA"};
static struct somestruct struct_BETA = {"BETA"};
..
..
Cannot go beyond the following.
#define SYMBOL(ARG) \
static struct _CONCAT(struct_,ARG) = {?? what shud be here??};
Any help is appreciable.
Thx Bob.