int fd; /* file descriptor, -1 if not open */
/* and flags bit EFF_RDONLY */
/* User callbacks */
- void (*init)(int, char *); /* called after entry creation, unless null */
- int (*postread)(int, char *); /* called after read, unless null */
- int (*prewrite)(int, char *); /* called before write, unless null */
+ void (*init)(int, void *); /* called after entry creation, unless null */
+ int (*postread)(int, void *); /* called after read, unless null */
+ int (*prewrite)(int, void *); /* called before write, unless null */
};
/*
extern int getele(char *, char *);
/* land.c */
extern s_char *prland(struct lndstr *);
-extern int lnd_postread(int, s_char *);
-extern int lnd_prewrite(int, s_char *);
-extern void lnd_init(int, s_char *);
+extern int lnd_postread(int, void *);
+extern int lnd_prewrite(int, void *);
+extern void lnd_init(int, void *);
/* landgun.c */
extern double seagun(int, int);
extern double landgun(int, int);
extern void init_nreport(void);
extern void nreport(natid, int, natid, int);
/* nuke.c */
-extern int nuk_postread(int, s_char *);
-extern int nuk_prewrite(int, s_char *);
-extern void nuk_init(int, s_char *);
+extern int nuk_postread(int, void *);
+extern int nuk_prewrite(int, void *);
+extern void nuk_init(int, void *);
extern void nuk_add(coord, coord, int, int);
extern void nuk_delete(struct nukstr *, int, int);
/* nxtitem.c */
extern int nxtsct(struct nstr_sect *, struct sctstr *);
/* plane.c */
extern s_char *prplane(struct plnstr *);
-extern int pln_postread(int, s_char *);
-extern int pln_prewrite(int, s_char *);
-extern void pln_init(int, s_char *);
+extern int pln_postread(int, void *);
+extern int pln_prewrite(int, void *);
+extern void pln_init(int, void *);
/* plnsub.c */
extern void count_planes(struct shpstr *);
extern struct sctstr *get_assembly_point(char *, struct sctstr *, char *);
extern void satmap(int, int, int, int, int, int);
extern void sathead(void);
/* sect.c */
-extern int sct_postread(int, s_char *);
-extern int sct_prewrite(int, s_char *);
+extern int sct_postread(int, void *);
+extern int sct_prewrite(int, void *);
extern void item_prewrite(short *);
extern int issector(s_char *);
/* ship.c */
extern s_char *prship(struct shpstr *);
-extern int shp_postread(int, s_char *);
-extern int shp_prewrite(int, s_char *);
-extern void shp_init(int, s_char *);
+extern int shp_postread(int, void *);
+extern int shp_prewrite(int, void *);
+extern void shp_init(int, void *);
/* show.c */
extern void show_bridge(int);
extern void show_tower(int);
ef_extend(int type, int count)
{
struct empfile *ep;
- char *tmpobj;
+ void *tmpobj;
int id, i, how;
if (ef_check(type) < 0)
struct fileinit {
int ef_type;
- void (*init) (int, char *);
- int (*postread) (int, char *);
- int (*prewrite) (int, char *);
+ void (*init) (int, void *);
+ int (*postread) (int, void *);
+ int (*prewrite) (int, void *);
};
static struct fileinit fileinit[] = {
#include "optlist.h"
int
-lnd_postread(int n, s_char *ptr)
+lnd_postread(int n, void *ptr)
{
- struct lndstr *llp = (struct lndstr *)ptr;
+ struct lndstr *llp = ptr;
struct shpstr theship;
struct lndstr theland;
return 1;
}
-/*ARGSUSED*/
int
-lnd_prewrite(int n, s_char *ptr)
+lnd_prewrite(int n, void *ptr)
{
- struct lndstr *llp = (struct lndstr *)ptr;
+ struct lndstr *llp = ptr;
struct lndstr land;
struct lndstr *lp;
struct plnstr *pp;
}
void
-lnd_init(int n, s_char *ptr)
+lnd_init(int n, void *ptr)
{
- struct lndstr *lp = (struct lndstr *)ptr;
+ struct lndstr *lp = ptr;
lp->ef_type = EF_LAND;
lp->lnd_uid = n;
#include "nat.h"
#include "prototypes.h"
-/*ARGSUSED*/
int
-nuk_postread(int n, s_char *ptr)
+nuk_postread(int n, void *ptr)
{
- struct nukstr *np = (struct nukstr *)ptr;
+ struct nukstr *np = ptr;
if (np->nuk_uid != n) {
logerror("nuk_postread: Error - %d != %d, zeroing.\n", np->nuk_uid,
return 1;
}
-/*ARGSUSED*/
int
-nuk_prewrite(int n, s_char *ptr)
+nuk_prewrite(int n, void *ptr)
{
- struct nukstr *np = (struct nukstr *)ptr;
+ struct nukstr *np = ptr;
struct nukstr nuke;
np->ef_type = EF_NUKE;
}
void
-nuk_init(int n, s_char *ptr)
+nuk_init(int n, void *ptr)
{
- struct nukstr *np = (struct nukstr *)ptr;
+ struct nukstr *np = ptr;
np->ef_type = EF_NUKE;
np->nuk_uid = n;
#include "optlist.h"
int
-pln_postread(int n, s_char *ptr)
+pln_postread(int n, void *ptr)
{
- struct plnstr *pp = (struct plnstr *)ptr;
+ struct plnstr *pp = ptr;
struct shpstr theship;
struct lndstr theland;
return 1;
}
-/*ARGSUSED*/
int
-pln_prewrite(int n, s_char *ptr)
+pln_prewrite(int n, void *ptr)
{
- struct plnstr *pp = (struct plnstr *)ptr;
+ struct plnstr *pp = ptr;
struct plnstr plane;
if (pp->pln_effic < PLANE_MINEFF) {
}
void
-pln_init(int n, s_char *ptr)
+pln_init(int n, void *ptr)
{
- struct plnstr *pp = (struct plnstr *)ptr;
+ struct plnstr *pp = ptr;
pp->ef_type = EF_PLANE;
pp->pln_uid = n;
static int checksect(struct sctstr *);
-/*ARGSUSED*/
int
-sct_postread(int id, s_char *ptr)
+sct_postread(int id, void *ptr)
{
- struct sctstr *sp = (struct sctstr *)ptr;
+ struct sctstr *sp = ptr;
checksect(sp);
player->owner = (player->god || sp->sct_own == player->cnum);
return 1;
}
-/*ARGSUSED*/
int
-sct_prewrite(int id, s_char *ptr)
+sct_prewrite(int id, void *ptr)
{
- struct sctstr *sp = (struct sctstr *)ptr;
+ struct sctstr *sp = ptr;
struct sctstr sect;
time(&sp->sct_timestamp);
#include "prototypes.h"
#include "optlist.h"
-/*ARGSUSED*/
int
-shp_postread(int n, s_char *ptr)
+shp_postread(int n, void *ptr)
{
- struct shpstr *sp = (struct shpstr *)ptr;
+ struct shpstr *sp = ptr;
if (sp->shp_uid != n) {
logerror("shp_postread: Error - %d != %d, zeroing.\n", sp->shp_uid,
}
int
-shp_prewrite(int n, s_char *ptr)
+shp_prewrite(int n, void *ptr)
{
- struct shpstr *sp = (struct shpstr *)ptr;
+ struct shpstr *sp = ptr;
struct shpstr ship;
struct lndstr *lp;
struct plnstr *pp;
}
void
-shp_init(int n, s_char *ptr)
+shp_init(int n, void *ptr)
{
- struct shpstr *sp = (struct shpstr *)ptr;
+ struct shpstr *sp = ptr;
sp->ef_type = EF_SHIP;
sp->shp_uid = n;