R
ranjeet.gupta
Dear All
As I was going through the code, I find the below piece of code,
#define FILEMAPPING \
char *data; \
int size; \
char *position; \
int (*open)(struct FileMapping *self, const char *filename ); \
int (*close) (struct FileMapping *self ); \
int (*destroy) (struct FileMapping *self ); \
int (*isYourFile)(struct FileMapping *self, const char *filename, u32
*outSameFile );
typedef struct FileMapping
{
FILEMAPPING
} FileMapping, *FileMapping;
Over above they have declared the Macro Named FILEMAPPING but I am not
able to understand what does it really mean ?, they have declared the
macro which is going to be replaced in the structure FileMapping, But
why they want to go in the above format. ?
its is just same as some what below code..
#define LINKLIST int data; struct node *link;
strcut node {
LINKLIST;
};
Thanks in Advance
Ranjeet
As I was going through the code, I find the below piece of code,
#define FILEMAPPING \
char *data; \
int size; \
char *position; \
int (*open)(struct FileMapping *self, const char *filename ); \
int (*close) (struct FileMapping *self ); \
int (*destroy) (struct FileMapping *self ); \
int (*isYourFile)(struct FileMapping *self, const char *filename, u32
*outSameFile );
typedef struct FileMapping
{
FILEMAPPING
} FileMapping, *FileMapping;
Over above they have declared the Macro Named FILEMAPPING but I am not
able to understand what does it really mean ?, they have declared the
macro which is going to be replaced in the structure FileMapping, But
why they want to go in the above format. ?
its is just same as some what below code..
#define LINKLIST int data; struct node *link;
strcut node {
LINKLIST;
};
Thanks in Advance
Ranjeet