Remove workarounds for ancient compilers
This commit is contained in:
11
src/detect.c
11
src/detect.c
@@ -1704,16 +1704,7 @@ int
|
||||
dosearch0(aflag)
|
||||
register int aflag; /* intrinsic autosearch vs explicit searching */
|
||||
{
|
||||
#ifdef GCC_BUG
|
||||
/* Some old versions of gcc seriously muck up nested loops. If you get
|
||||
* strange crashes while searching in a version compiled with gcc, try
|
||||
* putting #define GCC_BUG in *conf.h (or adding -DGCC_BUG to CFLAGS in
|
||||
* the makefile).
|
||||
*/
|
||||
volatile xchar x, y;
|
||||
#else
|
||||
register xchar x, y;
|
||||
#endif
|
||||
xchar x, y;
|
||||
register struct trap *trap;
|
||||
register struct monst *mtmp;
|
||||
|
||||
|
||||
@@ -1330,16 +1330,7 @@ int mmflags;
|
||||
if (uwep && uwep->oartifact == ART_EXCALIBUR)
|
||||
mtmp->mpeaceful = mtmp->mtame = FALSE;
|
||||
}
|
||||
#ifndef DCC30_BUG
|
||||
if (mndx == PM_LONG_WORM && (mtmp->wormno = get_wormno()) != 0)
|
||||
#else
|
||||
/* DICE 3.0 doesn't like assigning and comparing mtmp->wormno in the
|
||||
same expression. */
|
||||
if (mndx == PM_LONG_WORM
|
||||
&& (mtmp->wormno = get_wormno(), mtmp->wormno != 0))
|
||||
#endif
|
||||
{
|
||||
/* we can now create worms with tails - 11/91 */
|
||||
if (mndx == PM_LONG_WORM && (mtmp->wormno = get_wormno()) != 0) {
|
||||
initworm(mtmp, rn2(5));
|
||||
if (count_wsegs(mtmp))
|
||||
place_worm_tail_randomly(mtmp, x, y);
|
||||
|
||||
@@ -598,13 +598,6 @@ clear_level_structures()
|
||||
lev = &levl[x][0];
|
||||
for (y = 0; y < ROWNO; y++) {
|
||||
*lev++ = zerorm;
|
||||
/*
|
||||
* These used to be '#if MICROPORT_BUG',
|
||||
* with use of memset(0) for '#if !MICROPORT_BUG' below,
|
||||
* but memset is not appropriate for initializing pointers,
|
||||
* so do these g.level.objects[][] and level.monsters[][]
|
||||
* initializations unconditionally.
|
||||
*/
|
||||
g.level.objects[x][y] = (struct obj *) 0;
|
||||
g.level.monsters[x][y] = (struct monst *) 0;
|
||||
}
|
||||
|
||||
14
src/mon.c
14
src/mon.c
@@ -3,11 +3,6 @@
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/* If you're using precompiled headers, you don't want this either */
|
||||
#ifdef MICROPORT_BUG
|
||||
#define MKROOM_H
|
||||
#endif
|
||||
|
||||
#include "hack.h"
|
||||
#include "mfndpos.h"
|
||||
#include <ctype.h>
|
||||
@@ -3895,16 +3890,7 @@ boolean msg; /* "The oldmon turns into a newmon!" */
|
||||
unstuck(mtmp);
|
||||
}
|
||||
|
||||
#ifndef DCC30_BUG
|
||||
if (mdat == &mons[PM_LONG_WORM] && (mtmp->wormno = get_wormno()) != 0) {
|
||||
#else
|
||||
/* DICE 3.0 doesn't like assigning and comparing mtmp->wormno in the
|
||||
* same expression.
|
||||
*/
|
||||
if (mdat == &mons[PM_LONG_WORM]
|
||||
&& (mtmp->wormno = get_wormno(), mtmp->wormno != 0)) {
|
||||
#endif
|
||||
/* we can now create worms with tails - 11/91 */
|
||||
initworm(mtmp, rn2(5));
|
||||
place_worm_tail_randomly(mtmp, mtmp->mx, mtmp->my);
|
||||
}
|
||||
|
||||
@@ -1147,16 +1147,8 @@ register struct trobj *trop;
|
||||
if (obj->oclass == SPBOOK_CLASS && obj->otyp != SPE_BLANK_PAPER)
|
||||
initialspell(obj);
|
||||
|
||||
#if !defined(PYRAMID_BUG) && !defined(MAC)
|
||||
if (--trop->trquan)
|
||||
continue; /* make a similar object */
|
||||
#else
|
||||
if (trop->trquan) { /* check if zero first */
|
||||
--trop->trquan;
|
||||
if (trop->trquan)
|
||||
continue; /* make a similar object */
|
||||
}
|
||||
#endif
|
||||
trop++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,9 +305,6 @@ xchar *rx, *ry;
|
||||
void
|
||||
invault()
|
||||
{
|
||||
#ifdef BSD_43_BUG
|
||||
int dummy; /* hack to avoid schain botch */
|
||||
#endif
|
||||
struct monst *guard;
|
||||
boolean gsensed;
|
||||
int trycount, vaultroom = (int) vault_occupied(u.urooms);
|
||||
|
||||
Reference in New Issue
Block a user