-/* $NetBSD: hack.do.c,v 1.10 2011/07/20 07:04:30 dholland Exp $ */
+/* $NetBSD: hack.do.c,v 1.11 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.do.c,v 1.10 2011/07/20 07:04:30 dholland Exp $");
+__RCSID("$NetBSD: hack.do.c,v 1.11 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
/* Contains code for 'd', 'D' (drop), '>', '<' (up, down) and 't' (throw) */
if (Invisible)
newsym(u.ux, u.uy);
}
- free((char *) obj);
+ free(obj);
return (1);
}
if (obj->owornmask & (W_ARMOR | W_RING)) {
-/* $NetBSD: hack.do_name.c,v 1.11 2009/08/12 07:28:40 dholland Exp $ */
+/* $NetBSD: hack.do_name.c,v 1.12 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.do_name.c,v 1.11 2009/08/12 07:28:40 dholland Exp $");
+__RCSID("$NetBSD: hack.do_name.c,v 1.12 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
#if 0
obfree(obj, otmp2); /* now unnecessary: no pointers on bill */
#endif
- free((char *) obj); /* let us hope nobody else saved a pointer */
+ free(obj); /* let us hope nobody else saved a pointer */
}
int
-/* $NetBSD: hack.end.c,v 1.15 2011/08/06 20:18:26 dholland Exp $ */
+/* $NetBSD: hack.end.c,v 1.16 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.end.c,v 1.15 2011/08/06 20:18:26 dholland Exp $");
+__RCSID("$NetBSD: hack.end.c,v 1.16 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <signal.h>
break;
}
}
- free((char *) t1);
+ free(t1);
}
#ifdef nonsense
totchars[totcharct] = 0;
-/* $NetBSD: hack.engrave.c,v 1.11 2011/08/06 20:18:26 dholland Exp $ */
+/* $NetBSD: hack.engrave.c,v 1.12 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.engrave.c,v 1.11 2011/08/06 20:18:26 dholland Exp $");
+__RCSID("$NetBSD: hack.engrave.c,v 1.12 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
return;
fnd: ;
}
- free((char *) ep);
+ free(ep);
}
-/* $NetBSD: hack.invent.c,v 1.15 2011/05/23 22:53:25 joerg Exp $ */
+/* $NetBSD: hack.invent.c,v 1.16 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.invent.c,v 1.15 2011/05/23 22:53:25 joerg Exp $");
+__RCSID("$NetBSD: hack.invent.c,v 1.16 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <assert.h>
}
gtmp->ngold = gold->ngold;
}
- free((char *) gold);
+ free(gold);
}
void
for (ttmp = ftrap; ttmp->ntrap != trap; ttmp = ttmp->ntrap);
ttmp->ntrap = trap->ntrap;
}
- free((char *) trap);
+ free(trap);
}
struct wseg *m_atseg;
-/* $NetBSD: hack.lev.c,v 1.12 2011/08/06 20:00:33 dholland Exp $ */
+/* $NetBSD: hack.lev.c,v 1.13 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.lev.c,v 1.12 2011/08/06 20:00:33 dholland Exp $");
+__RCSID("$NetBSD: hack.lev.c,v 1.13 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
xl = otmp->onamelth;
bwrite(fd, (char *) &xl, sizeof(int));
bwrite(fd, (char *) otmp, xl + sizeof(struct obj));
- free((char *) otmp);
+ free(otmp);
otmp = otmp2;
}
bwrite(fd, (char *) &minusone, sizeof(int));
bwrite(fd, (char *) mtmp, xl + sizeof(struct monst));
if (mtmp->minvent)
saveobjchn(fd, mtmp->minvent);
- free((char *) mtmp);
+ free(mtmp);
mtmp = mtmp2;
}
bwrite(fd, (char *) &minusone, sizeof(int));
while (gold) {
gold2 = gold->ngold;
bwrite(fd, (char *) gold, sizeof(struct gold));
- free((char *) gold);
+ free(gold);
gold = gold2;
}
bwrite(fd, nul, sizeof(struct gold));
while (trap) {
trap2 = trap->ntrap;
bwrite(fd, (char *) trap, sizeof(struct trap));
- free((char *) trap);
+ free(trap);
trap = trap2;
}
bwrite(fd, nul, sizeof(struct trap));
gold = newgold();
mread(fd, gold, sizeof(struct gold));
}
- free((char *) gold);
+ free(gold);
trap = newtrap();
mread(fd, trap, sizeof(struct trap));
while (trap->tx) {
trap = newtrap();
mread(fd, trap, sizeof(struct trap));
}
- free((char *) trap);
+ free(trap);
fobj = restobjchn(fd);
billobjs = restobjchn(fd);
rest_engravings(fd);
-/* $NetBSD: hack.mon.c,v 1.12 2011/08/06 20:24:35 dholland Exp $ */
+/* $NetBSD: hack.mon.c,v 1.13 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.mon.c,v 1.12 2011/08/06 20:24:35 dholland Exp $");
+__RCSID("$NetBSD: hack.mon.c,v 1.13 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
struct monst *mtmp;
while ((mtmp = fdmon) != NULL) {
fdmon = mtmp->nmon;
- free((char *) mtmp);
+ free(mtmp);
}
}
-/* $NetBSD: hack.pager.c,v 1.17 2011/08/06 20:18:26 dholland Exp $ */
+/* $NetBSD: hack.pager.c,v 1.18 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.pager.c,v 1.17 2011/08/06 20:18:26 dholland Exp $");
+__RCSID("$NetBSD: hack.pager.c,v 1.18 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
/* This file contains the command routine dowhatis() and a pager. */
cleanup:
while ((tl = texthead) != NULL) {
texthead = tl->next_line;
- free((char *) tl);
+ free(tl);
}
}
-/* $NetBSD: hack.read.c,v 1.10 2009/08/12 07:28:41 dholland Exp $ */
+/* $NetBSD: hack.read.c,v 1.11 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.read.c,v 1.10 2009/08/12 07:28:41 dholland Exp $");
+__RCSID("$NetBSD: hack.read.c,v 1.11 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
Punished = 0;
freeobj(uchain);
unpobj(uchain);
- free((char *) uchain);
+ free(uchain);
uball->spe = 0;
uball->owornmask &= ~W_BALL;
uchain = uball = (struct obj *) 0;
-/* $NetBSD: hack.shk.c,v 1.11 2009/08/12 07:28:41 dholland Exp $ */
+/* $NetBSD: hack.shk.c,v 1.12 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.shk.c,v 1.11 2009/08/12 07:28:41 dholland Exp $");
+__RCSID("$NetBSD: hack.shk.c,v 1.12 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
void
obfree(struct obj *obj, struct obj *merge)
{
- free((char *) obj);
+ free(obj);
}
int
inshop(void) {
obj->unpaid = 0;
while ((obj = billobjs) != NULL) {
billobjs = obj->nobj;
- free((char *) obj);
+ free(obj);
}
ESHK(shopkeeper)->billct = 0;
}
*bp = bill[ESHK(shopkeeper)->billct];
}
}
- free((char *) obj);
+ free(obj);
}
static void
else
pline("Error in shopkeeper administration.");
}
- free((char *) obj);
+ free(obj);
}
return (1);
}
-/* $NetBSD: hack.steal.c,v 1.7 2009/08/12 07:28:41 dholland Exp $ */
+/* $NetBSD: hack.steal.c,v 1.8 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.steal.c,v 1.7 2009/08/12 07:28:41 dholland Exp $");
+__RCSID("$NetBSD: hack.steal.c,v 1.8 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
if (Punished && otmp == uball) {
Punished = 0;
freeobj(uchain);
- free((char *) uchain);
+ free(uchain);
uchain = (struct obj *) 0;
uball->spe = 0;
uball = (struct obj *) 0; /* superfluous */
-/* $NetBSD: hack.topl.c,v 1.13 2011/08/06 20:18:26 dholland Exp $ */
+/* $NetBSD: hack.topl.c,v 1.14 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.topl.c,v 1.13 2011/08/06 20:18:26 dholland Exp $");
+__RCSID("$NetBSD: hack.topl.c,v 1.14 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
tl = tl->next_topl;
}
if (tl && tl->next_topl) {
- free((char *) tl->next_topl);
+ free(tl->next_topl);
tl->next_topl = 0;
}
}
-/* $NetBSD: hack.worm.c,v 1.8 2009/08/12 07:28:41 dholland Exp $ */
+/* $NetBSD: hack.worm.c,v 1.9 2011/08/06 20:29:37 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.worm.c,v 1.8 2009/08/12 07:28:41 dholland Exp $");
+__RCSID("$NetBSD: hack.worm.c,v 1.9 2011/08/06 20:29:37 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
{
if (wtmp->wdispl)
newsym(wtmp->wx, wtmp->wy);
- free((char *) wtmp);
+ free(wtmp);
}
#endif /* NOWORM */