Automatically generate table of function pointers in C.
- by jeremytrimble
I'm looking for a way to automatically (as part of the compilation/build process) generate a "table" of function pointers in C.
Specifically, I want to generate an array of structures something like:
typedef struct {
void (*p_func)(void);
char * funcName;
} funcRecord;
/* Automatically generate the lines below: */
extern void func1(void);…