/* Initializers for members flags... */
/* Unmapped cache */
#define UNMAPPED_CACHE(type, flags) \
- sizeof(type), (flags), NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL
+ sizeof(type), (flags), NULL, 0, 0, 0, 0, -1, NULL, NULL
/*
* Mapped cache, array with known size.
* Members cids, fids are not set.
*/
#define ARRAY_CACHE(array, flags) \
sizeof(*(array)), (flags), (char *)(array), \
- SZ((array)), 0, 0, 0, -1, NULL, NULL, NULL
+ SZ((array)), 0, 0, 0, -1, NULL, NULL
/*
* Mapped cache, array with unknown size.
* Members csize, cids, fids are not set.
*/
#define PTR_CACHE(ptr, flags) \
sizeof(*(ptr)), (flags), (char *)(ptr), \
- 0, 0, 0, 0, -1, NULL, NULL, NULL
+ 0, 0, 0, 0, -1, NULL, NULL
/*
* Array-backed table.
* The array's last element is the sentinel.
*/
#define ARRAY_TABLE(array, flags) \
sizeof(*(array)), (flags), (char *)(array), \
- SZ((array)), 0, SZ((array)) - 1, SZ((array)) - 1, -1, NULL, NULL, NULL
+ SZ((array)), 0, SZ((array)) - 1, SZ((array)) - 1, -1, NULL, NULL
/* Common configuration table flags */
#define EFF_CFG (EFF_PRIVATE | EFF_MEM | EFF_STATIC)
{EF_LOAN, "loan", "loan", loan_ca,
UNMAPPED_CACHE(struct lonstr, EFF_TYPED)},
{EF_MAP, "map", "map", NULL,
- 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL},
+ 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL},
{EF_BMAP, "bmap", "bmap", NULL,
- 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL},
+ 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL},
{EF_COMM, "commodity", "commodity", commodity_ca,
UNMAPPED_CACHE(struct comstr, EFF_TYPED | EFF_OWNER)},
{EF_LOST, "lost", "lostitems", lost_ca,
UNMAPPED_CACHE(struct natstr, EFF_TYPED | EFF_OWNER)},
/* Sentinel */
- {EF_BAD, NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL, NULL},
+ {EF_BAD, NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, -1, NULL, NULL},
};
static void
struct fileinit {
int ef_type;
- void (*init) (int, void *);
int (*postread) (int, void *);
int (*prewrite) (int, void *);
};
static struct fileinit fileinit[] = {
- {EF_SECTOR, NULL, sct_postread, sct_prewrite},
- {EF_SHIP, NULL, shp_postread, shp_prewrite},
- {EF_PLANE, NULL, pln_postread, pln_prewrite},
- {EF_LAND, NULL, lnd_postread, lnd_prewrite},
- {EF_NUKE, NULL, nuk_postread, nuk_prewrite}
+ {EF_SECTOR, sct_postread, sct_prewrite},
+ {EF_SHIP, shp_postread, shp_prewrite},
+ {EF_PLANE, pln_postread, pln_prewrite},
+ {EF_LAND, lnd_postread, lnd_prewrite},
+ {EF_NUKE, nuk_postread, nuk_prewrite}
};
static void ef_open_srv(void);
unsigned i;
for (i = 0; i < sizeof(fileinit) / sizeof(fileinit[0]); i++) {
- empfile[fileinit[i].ef_type].init = fileinit[i].init;
empfile[fileinit[i].ef_type].postread = fileinit[i].postread;
empfile[fileinit[i].ef_type].prewrite = fileinit[i].prewrite;
}