I've vastly simplified the struct definitions to minimise the size of the code, but the meaning is the same. The query is with the definition of SCIP_Reader.
Once the macro define has been applied, the line in SCIP_Reader becomes :
Although I understand the first half, I don't understand what the second half (the scip and reader declarations) means in this particular case, and when I try to compile, I get the error:
SCIP_RETCODE (*readerfree) (SCIP* scip, SCIP_READER* reader);
The error makes sense, I guess, as as far as I know, you can only declare one variable per line, not three.
test.c:18: error: expected declaration specifiers or ‘...’ before ‘SCIP_READER’
I am not trying to get the code to work, as that misses the point. I merely want to understand the above particular line.
#define SCIP_DECL_READERFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_READER* reader)
SCIP_OKAY = 1,
SCIP_ERROR = 0
typedef enum SCIP_Retcode SCIP_RETCODE;
typedef struct Scip SCIP;
// After applying the macro at line #1, the above line becomes
//SCIP_RETCODE (*readerfree) (SCIP* scip, SCIP_READER* reader);
typedef struct SCIP_Reader SCIP_READER;