E NEARDATA int bases[MAXOCLASSES];
E NEARDATA int multi;
+#if 0
E NEARDATA int warnlevel;
+#endif
E NEARDATA int nroom;
E NEARDATA int nsubroom;
E NEARDATA int occtime;
/* ### pcunix.c ### */
#if defined(MICRO)
-E void FDECL(gethdate, (char *));
E void FDECL(regularize, (char *));
#endif /* MICRO */
#if defined(PC_LOCKING)
/* ### unixunix.c ### */
#ifdef UNIX
-E void FDECL(gethdate, (const char *));
E void NDECL(getlock);
E void FDECL(regularize, (char *));
# ifdef SHELL
/* ### unixres.c ### */
#ifdef UNIX
+# ifdef GNOME_GRAPHICS
E int FDECL(hide_privileges, (BOOLEAN_P));
+# endif
#endif /* UNIX */
/* ### vault.c ### */
case WAX:
color = "waxy";
goto see_streaks; /* okay even if not touchstone */
+ /*NOTREACHED*/
break;
case CLOTH:
pline_The("stone looks a little more polished now.");
case WOOD:
color = "wooden";
goto see_streaks; /* okay even if not touchstone */
+ /*NOTREACHED*/
break;
}
return;
NEARDATA int bases[MAXOCLASSES] = DUMMY;
NEARDATA int multi = 0;
+#if 0
NEARDATA int warnlevel = 0; /* used by movemon and dochugw */
+#endif
NEARDATA int nroom = 0;
NEARDATA int nsubroom = 0;
NEARDATA int occtime = 0;
char buf[BUFSZ];
/* doname can call s_suffix, reusing its buffer */
- strcpy(buf, s_suffix(mon_nam(u.ustuck)));
+ Strcpy(buf, s_suffix(mon_nam(u.ustuck)));
You("drop %s into %s %s.", doname(obj), buf,
mbodypart(u.ustuck, STOMACH));
}
char *et;
unsigned maxelen = BUFSZ - sizeof("You feel the words: \"\". ");
if (strlen(ep->engr_txt) > maxelen) {
- strncpy(buf, ep->engr_txt, maxelen);
+ (void) strncpy(buf, ep->engr_txt, maxelen);
buf[maxelen] = '\0';
et = buf;
} else
uwep && is_pick(uwep)) {
/* MRKR: Automatic digging when wielding the appropriate tool */
if (!test_only)
- use_pick_axe2(uwep);
+ (void) use_pick_axe2(uwep);
return FALSE;
} else {
if ( !test_only ) {
xchar travelstepy[2][COLNO*ROWNO];
int n=1;
int set=0;
- int d=1;
+ int dia=1;
- memset(travel,0,sizeof(travel));
+ (void) memset(travel,0,sizeof(travel));
travelstepx[0][0] = u.tx;
travelstepy[0][0] = u.ty;
if ( !travel[nx][ny] ) {
travelstepx[1-set][nn]=nx;
travelstepy[1-set][nn]=ny;
- travel[nx][ny]=d;
+ travel[nx][ny]=dia;
nn++;
}
}
}
n = nn;
set = 1-set;
- d++;
+ dia++;
}
/* give up */
destroy_item(SCROLL_CLASS, AD_FIRE);
destroy_item(POTION_CLASS, AD_FIRE);
destroy_item(SPBOOK_CLASS, AD_FIRE);
- burn_floor_paper(u.ux, u.uy, TRUE, FALSE);
+ (void) burn_floor_paper(u.ux, u.uy, TRUE, FALSE);
break;
case CLC_LIGHTNING:
{
pline("%s burns slightly.", Monnam(mtmp));
}
if (mtmp->mhp > 0) {
- fire_damage(mtmp->minvent, FALSE, FALSE, mtmp->mx, mtmp->my);
+ (void) fire_damage(mtmp->minvent, FALSE, FALSE,
+ mtmp->mx, mtmp->my);
rloc(mtmp);
return 0;
}
/* TRUE if corpse might be dropped, magr may die if mon was swallowed */
boolean
-corpse_chance(mon, magr, swallowed)
+corpse_chance(mon, magr, was_swallowed)
struct monst *mon;
struct monst *magr; /* killer, if swallowed */
-boolean swallowed; /* digestion */
+boolean was_swallowed; /* digestion */
{
struct permonst *mdat = mon->data;
int i, tmp;
if (mdat == &mons[PM_VLAD_THE_IMPALER] || mdat->mlet == S_LICH) {
- if (cansee(mon->mx, mon->my) && !swallowed)
+ if (cansee(mon->mx, mon->my) && !was_swallowed)
pline("%s body crumbles into dust.", s_suffix(Monnam(mon)));
return FALSE;
}
tmp = d((int)mdat->mlevel+1, (int)mdat->mattk[i].damd);
else tmp = 0;
if (Half_physical_damage) tmp = (tmp+1) / 2;
- if (swallowed && magr) {
+ if (was_swallowed && magr) {
if (magr == &youmonst) {
There("is an explosion in your %s!",
body_part(STOMACH));
retval = TRUE;
} else if (!strcmp("disclose", optname)) {
int pick_cnt, pick_idx, opt_idx;
- winid tmpwin;
menu_item *disclosure_category_pick = (menu_item *)0;
/*
* The order of disclose_names[]
menu_item *pick_list;
int mflags, res;
long count;
- boolean all_blessed, all_cursed, all_uncursed, all_buc_unknown;
- all_blessed = all_cursed = all_uncursed = all_buc_unknown = FALSE;
if (retry) {
all_categories = (retry == -2);
} else if (flags.menu_style == MENU_FULL) {
dmg = 0;
}
if((int) u.ulevel > rn2(20))
- destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
+ (void) destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
if((int) u.ulevel > rn2(20))
- destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
+ (void) destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
if((int) u.ulevel > rn2(25))
- destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
+ (void) destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
if (dmg && !DEADMONSTER(mtmp)) mtmp->mhp -= dmg;
if (mtmp->mhp <= 0) killed(mtmp);
}
u.uconduct.literate++;
if(flags.verbose)
pline("It reads:");
- strcpy(buf, shirt_msgs[scroll->o_id % SIZE(shirt_msgs)]);
+ Strcpy(buf, shirt_msgs[scroll->o_id % SIZE(shirt_msgs)]);
erosion = greatest_erosion(scroll);
if (erosion)
wipeout_text(buf,
/* this should only drag the chain (and never give a near-
capacity message) since we already checked ball distance */
- drag_ball(u.ux, u.uy, &bc_control, &ballx, &bally, &chainx, &chainy, &cause_delay);
+ (void) drag_ball(u.ux, u.uy, &bc_control, &ballx, &bally,
+ &chainx, &chainy, &cause_delay);
move_bc(0, bc_control, ballx, bally, chainx, chainy);
} else
placebc();
switch (obj->otyp) {
case ICE_BOX:
continue; /* Immune */
+ /*NOTREACHED*/
break;
case CHEST:
chance = 40;
u.ux = 0; /* prevent flush_screen() */
/* chdir shouldn't be called before this point to keep the
- * code parallel to other ports which call gethdate just
- * before here.
+ * code parallel to other ports.
*/
#ifdef CHDIR
chdirx(hackdir,1);
static int NDECL(eraseoldlocks);
#endif
-void
-gethdate(name)
-char *name;
-{
-# ifdef WANT_GETHDATE
-#if 0
-/* old version - for people short of space */
-
-register char *np;
- if(stat(name, &hbuf))
- error("Cannot get status of %s.",
- (np = rindex(name, '/')) ? np+1 : name);
-#endif
-/* version using PATH from: seismo!gregc@ucsf-cgl.ARPA (Greg Couch) */
-
-/*
- * The problem with #include <sys/param.h> is that this include file
- * does not exist on all systems, and moreover, that it sometimes includes
- * <sys/types.h> again, so that the compiler sees these typedefs twice.
- */
-#define MAXPATHLEN 1024
-
- register char *np, *path;
- char filename[MAXPATHLEN+1], *getenv();
- int pathlen;
-
- if (index(name, '/') != (char *)0 || (path = getenv("PATH")) == (char *)0)
- path = "";
-
- for (;;) {
- if ((np = index(path, ':')) == (char *)0)
- np = path + strlen(path); /* point to end str */
- pathlen = np - path;
- if (pathlen > MAXPATHLEN)
- pathlen = MAXPATHLEN;
- if (pathlen <= 1) { /* %% */
- (void) strncpy(filename, name, MAXPATHLEN);
- } else {
- (void) strncpy(filename, path, pathlen);
- filename[pathlen] = '/';
- (void) strncpy(filename + pathlen + 1, name,
- (MAXPATHLEN - 1) - pathlen);
- }
- filename[MAXPATHLEN] = '\0';
- if (stat(filename, &hbuf) == 0)
- return;
- if (*np == '\0')
- path = "";
- path = np + 1;
- }
- if (strlen(name) > BUFSZ/2)
- name = name + strlen(name) - BUFSZ/2;
- error("Cannot get status of %s.", (np = rindex(name, '/')) ? np+1 : name);
-# endif /* WANT_GETHDATE */
-}
-
#if 0
int
uptodate(fd)
#ifdef GETRES_SUPPORT
-#if defined(LINUX)
+# if defined(LINUX)
static _syscall3(int, getresuid, unsigned short *, ruid, \
unsigned short *, euid, unsigned short *, suid)
return retval;
}
-#elif defined(BSD) || defined(SVR4)
+# else
+# if defined(BSD) || defined(SVR4)
-#ifdef SYS_getresuid
+# ifdef SYS_getresuid
static int
real_getresuid(ruid, euid, suid)
return syscall(SYS_getresuid, ruid, euid, suid);
}
-#else /* SYS_getresuid */
+# else /* SYS_getresuid */
static int
real_getresuid(ruid, euid, suid)
return retval;
}
-#endif /* SYS_getresuid */
+# endif /* SYS_getresuid */
-#ifdef SYS_getresgid
+# ifdef SYS_getresgid
static int
real_getresgid(rgid, egid, sgid)
return syscall(SYS_getresgid, rgid, egid, sgid);
}
-#else /* SYS_getresgid */
+# else /* SYS_getresgid */
static int
real_getresgid(rgid, egid, sgid)
return retval;
}
-#endif /* SYS_getresgid */
-#endif /* LINUX || BSD || SVR4 */
+# endif /* SYS_getresgid */
+# endif /* BSD || SVR4 */
+# endif /* LINUX */
static unsigned int hiding_privileges = 0;
#else /* GETRES_SUPPORT */
+# ifdef GNOME_GRAPHICS
int
hide_privileges(flag)
boolean flag;
{
return 0;
}
+# endif
#endif /* GETRES_SUPPORT */