change it from int * to void *. Callers changed not to cast to int *.
extern void plane_sona(struct emp_qelem *, int, int, struct shiplist **);
extern s_char *prsub(struct shpstr *);
extern int check_trade(void);
-extern int ontradingblock(int, int *);
-extern void trdswitchown(int, int *, int);
+extern int ontradingblock(int, void *);
+extern void trdswitchown(int, void *, int);
/* Commands */
int acce(void);
int add(void);
return RET_FAIL;
}
if (opt_MARKET) {
- if (ontradingblock(EF_PLANE, (int *)&pl)) {
+ if (ontradingblock(EF_PLANE, &pl)) {
pr("You cannot arm/disarm an item on the trading block!\n");
return RET_FAIL;
}
continue;
}
if (opt_MARKET) {
- if (ontradingblock(EF_PLANE, (int *)&plane)) {
+ if (ontradingblock(EF_PLANE, &plane)) {
pr("plane #%d inelligible - it's for sale.\n",
plane.pln_uid);
continue;
continue;
}
if (opt_MARKET) {
- if (ontradingblock(EF_SHIP, (int *)&ship)) {
+ if (ontradingblock(EF_SHIP, &ship)) {
pr("You cannot load/unload an item on the trading block!\n");
continue;
}
if (sect.sct_own != player->cnum && land.lnd_own != player->cnum)
continue;
if (opt_MARKET) {
- if (ontradingblock(EF_LAND, (int *)&land)) {
+ if (ontradingblock(EF_LAND, &land)) {
pr("You cannot load/unload an item on the trading block!\n");
continue;
}
continue;
if (opt_MARKET) {
- if (ontradingblock(type, (int *)&item.ship)) {
+ if (ontradingblock(type, &item.ship)) {
pr("You cannot scrap an item on the trading block!\n");
continue;
}
if (!player->owner)
continue;
if (opt_MARKET) {
- if (ontradingblock(type, (int *)&item.ship)) {
+ if (ontradingblock(type, &item.ship)) {
pr("You cannot scuttle an item on the trading block!\n");
continue;
}
}
int
-ontradingblock(int type, int *ptr)
- /* Generic pointer */
+ontradingblock(int type, void *ptr)
{
struct trdstr trade;
union trdgenstr tg;
}
void
-trdswitchown(int type, int *ptr, int newown)
- /* Generic pointer */
+trdswitchown(int type, void *ptr, int newown)
{
struct trdstr trade;
union trdgenstr tg;
}
if (opt_MARKET) {
if (isdef && player->owner &&
- ontradingblock(EF_SHIP, (int *)&ship)) {
+ ontradingblock(EF_SHIP, &ship)) {
pr("%s is on the trading block.\n", prcom(0, com));
return att_combat_init(com, EF_BAD);
}
}
if (opt_MARKET) {
- if (ontradingblock(EF_LAND, (int *)&land)) {
+ if (ontradingblock(EF_LAND, &land)) {
pr("%s is on the trading block, and cannot %s\n",
prland(&land), att_mode[combat_mode]);
continue;
if (!player->owner)
continue;
if (opt_MARKET) {
- if (ontradingblock(EF_LAND, (int *)&land)) {
+ if (ontradingblock(EF_LAND, &land)) {
pr("unit #%d inelligible - it's for sale.\n",
land.lnd_uid);
continue;
}
if (opt_MARKET) {
- if (ontradingblock(EF_PLANE, (int *)pp)) {
+ if (ontradingblock(EF_PLANE, pp)) {
emp_remque(qp);
free(qp);
continue;
if (plane.pln_mobil <= 0)
continue;
if (opt_MARKET) {
- if (ontradingblock(EF_PLANE, (int *)&plane)) {
+ if (ontradingblock(EF_PLANE, &plane)) {
pr("plane #%d inelligible - it's for sale.\n",
plane.pln_uid);
continue;
continue;
*/
if (opt_MARKET) {
- if (ontradingblock(EF_SHIP, (int *)&ship)) {
+ if (ontradingblock(EF_SHIP, &ship)) {
pr("ship #%d inelligible - it's for sale.\n",
ship.shp_uid);
continue;
cname(newown), xyas(pp->pln_x, pp->pln_y, pp->pln_own));
}
if (opt_MARKET)
- trdswitchown(EF_PLANE, (int *)pp, newown);
+ trdswitchown(EF_PLANE, pp, newown);
if (pp->pln_mobil > 0)
pp->pln_mobil = 0;
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
struct lndstr llp;
if (opt_MARKET)
- trdswitchown(EF_SHIP, (int *)sp, newown);
+ trdswitchown(EF_SHIP, sp, newown);
makelost(EF_SHIP, sp->shp_own, sp->shp_uid, sp->shp_x, sp->shp_y);
sp->shp_own = newown;
makenotlost(EF_SHIP, sp->shp_own, sp->shp_uid, sp->shp_x, sp->shp_y);
/* Keep track of when this was taken over */
time(&pp->pln_access);
if (opt_MARKET)
- trdswitchown(EF_PLANE, (int *)pp, newown);
+ trdswitchown(EF_PLANE, pp, newown);
pp->pln_mission = 0;
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
pp->pln_own = newown;
/* Keep track of when this was taken over */
time(&landp->lnd_access);
if (opt_MARKET)
- trdswitchown(EF_LAND, (int *)landp, newown);
+ trdswitchown(EF_LAND, landp, newown);
landp->lnd_mission = 0;
makelost(EF_LAND, landp->lnd_own, landp->lnd_uid, landp->lnd_x,
landp->lnd_y);
/* Keep track of when this was taken over */
time(&pp->pln_access);
if (opt_MARKET)
- trdswitchown(EF_PLANE, (int *)pp, newown);
+ trdswitchown(EF_PLANE, pp, newown);
pp->pln_mission = 0;
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
pp->pln_own = newown;