consistent cast syntax

This commit is contained in:
nhmall
2023-11-13 19:28:19 -05:00
parent b4bb3b92a2
commit a7242760f7
12 changed files with 17 additions and 17 deletions

View File

@@ -3124,7 +3124,7 @@ use_whip(struct obj *obj)
hitvalu = 8 + otmp->spe;
hitu = thitu(hitvalu, dmgval(otmp, &gy.youmonst),
&otmp, (char *)0);
&otmp, (char *) 0);
if (hitu) {
pline_The("%s hits you as you try to snatch it!",
the(onambuf));

View File

@@ -137,7 +137,7 @@ artiname(int artinum)
into an artifact of matching type, or returned as-is if that's not
possible.
For the 2nd case, caller should use ``obj = mk_artifact(obj, A_NONE);''
for the 1st, ``obj = mk_artifact((struct obj *)0, some_alignment);''.
for the 1st, ``obj = mk_artifact((struct obj *) 0, some_alignment);''.
*/
struct obj *
mk_artifact(

View File

@@ -3765,7 +3765,7 @@ status_hilite_menu_add(int origfld)
if (initblstats[fld].anytype != ANY_STR) {
boolean ltok = (fld != BL_TIME), gtok = TRUE;
lt_gt_eq = status_hilite_menu_choose_updownboth(fld, (char *)0,
lt_gt_eq = status_hilite_menu_choose_updownboth(fld, (char *) 0,
ltok, gtok);
if (lt_gt_eq == NO_LTEQGT)
goto choose_behavior;

View File

@@ -2129,7 +2129,7 @@ escape_tomb(void)
surface(u.ux, u.uy));
good = (tunnels(gy.youmonst.data) && !needspick(gy.youmonst.data))
? dighole(TRUE, FALSE, (coord *)0) : TRUE;
? dighole(TRUE, FALSE, (coord *) 0) : TRUE;
if (good)
unearth_you();
}

View File

@@ -1522,7 +1522,7 @@ cancel_doff(struct obj *obj, long slotmask)
{
/* Called by setworn() for old item in specified slot or by setnotworn()
* for specified item. We don't want to call cancel_don() if we got
* here via <X>_off() -> setworn((struct obj *)0) -> cancel_doff()
* here via <X>_off() -> setworn((struct obj *) 0) -> cancel_doff()
* because that would stop the 'A' command from continuing with next
* selected item. So do_takeoff() sets a flag in takeoff.mask for us.
* [For taking off an individual item with 'T'/'R'/'w-', it doesn't

View File

@@ -2667,7 +2667,7 @@ query_annotation(d_level *lev)
int
donamelevel(void)
{
query_annotation((d_level *)0);
query_annotation((d_level *) 0);
return ECMD_OK;
}
@@ -2760,7 +2760,7 @@ find_mapseen_by_str(const char *s)
void
rm_mapseen(int ledger_num)
{
mapseen *mptr, *mprev = (mapseen *)0;
mapseen *mptr, *mprev = (mapseen *) 0;
struct cemetery *bp, *bpnext;
for (mptr = gm.mapseenchn; mptr; mprev = mptr, mptr = mptr->next)
@@ -3393,7 +3393,7 @@ show_overview(
/* if game is over or we're not in the endgame yet, show the dungeon */
if (why != 0 || !In_endgame(&u.uz))
traverse_mapseenchn(0, win, why, reason, &lastdun);
end_menu(win, (char *)0);
end_menu(win, (char *) 0);
n = select_menu(win, (why != -1) ? PICK_NONE : PICK_ONE, &selected);
if (n > 0) {
int ledger;

View File

@@ -504,9 +504,9 @@ zero_nhfile(NHFILE *nhfp)
nhfp->fieldlevel = FALSE;
nhfp->addinfo = FALSE;
nhfp->bendian = IS_BIGENDIAN();
nhfp->fpdef = (FILE *)0;
nhfp->fplog = (FILE *)0;
nhfp->fpdebug = (FILE *)0;
nhfp->fpdef = (FILE *) 0;
nhfp->fplog = (FILE *) 0;
nhfp->fpdebug = (FILE *) 0;
nhfp->count = 0;
nhfp->eof = FALSE;
nhfp->fnidx = 0;
@@ -1202,7 +1202,7 @@ restore_saved_game(void)
if ((nhfp = open_savefile()) != 0) {
if (validate(nhfp, fq_save, FALSE) != 0) {
close_nhfile(nhfp);
nhfp = (NHFILE *)0;
nhfp = (NHFILE *) 0;
(void) delete_savefile();
}
}

View File

@@ -1809,7 +1809,7 @@ domove_fight_ironbars(coordxy x, coordxy y)
if (obj->quan > 1L)
obj = splitobj(obj, 1L);
else
setuwep((struct obj *)0);
setuwep((struct obj *) 0);
freeinv(obj);
breakflags |= BRK_KNOWN2BREAK;
} else {

View File

@@ -859,7 +859,7 @@ spitmm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
gm.mtarget = mtarg;
m_throw(mtmp, mtmp->mx, mtmp->my, sgn(gt.tbx), sgn(gt.tby),
distmin(mtmp->mx,mtmp->my,tx,ty), otmp);
gm.mtarget = (struct monst *)0;
gm.mtarget = (struct monst *) 0;
nomul(0);
/* If this is a pet, it'll get hungry. Minions and

View File

@@ -1473,7 +1473,7 @@ do_screen_description(
didlook:
if (looked) {
struct permonst *pm = (struct permonst *)0;
struct permonst *pm = (struct permonst *) 0;
if (found > 1 || need_to_look) {
char monbuf[BUFSZ];

View File

@@ -341,7 +341,7 @@ map_cleanup(void)
/* in case any boulders are on liquid, delete them */
while ((otmp = sobj_at(BOULDER, x, y)) != 0) {
obj_extract_self(otmp);
obfree(otmp, (struct obj *)0);
obfree(otmp, (struct obj *) 0);
}
/* traps on liquid? */

View File

@@ -107,7 +107,7 @@ sysopt_release(void)
sysopt.debugfiles = (char *) 0;
#ifdef DUMPLOG
if (sysopt.dumplogfile)
free((genericptr_t)sysopt.dumplogfile), sysopt.dumplogfile=(char *)0;
free((genericptr_t) sysopt.dumplogfile), sysopt.dumplogfile=(char *) 0;
#endif
if (sysopt.genericusers)
free((genericptr_t) sysopt.genericusers),