diff --git a/include/decl.h b/include/decl.h index 5e211f053..7fcde0c6c 100644 --- a/include/decl.h +++ b/include/decl.h @@ -192,8 +192,6 @@ E NEARDATA char dogname[]; E NEARDATA char catname[]; E NEARDATA char horsename[]; E char preferred_pet; -E int petname_used; - E const char *occtxt; /* defined when occupation != NULL */ E const char *nomovemsg; E char lock[]; @@ -442,7 +440,6 @@ struct early_opt { /* encumbrance */ E int oldcap; - #undef E #endif /* DECL_H */ diff --git a/src/decl.c b/src/decl.c index 10f67f7de..c3397a048 100644 --- a/src/decl.c +++ b/src/decl.c @@ -207,7 +207,6 @@ NEARDATA char dogname[PL_PSIZ] = DUMMY; NEARDATA char catname[PL_PSIZ] = DUMMY; NEARDATA char horsename[PL_PSIZ] = DUMMY; char preferred_pet; /* '\0', 'c', 'd', 'n' (none) */ -int petname_used = 0; /* monsters that went down/up together with @ */ NEARDATA struct monst *mydogs = (struct monst *) 0; /* monsters that are moving to another dungeon level */ @@ -573,8 +572,7 @@ decl_early_init() ZEROARRAYN(dogname, PL_PSIZ); ZEROARRAYN(catname, PL_PSIZ); ZEROARRAYN(horsename, PL_PSIZ); - ZERO(preferred_pet); - ZERO(petname_used); + preferred_pet = 0; ZEROPTR(mydogs); ZEROPTR(migrating_mons); diff --git a/src/dog.c b/src/dog.c index 7c1b62e8b..0d967195e 100644 --- a/src/dog.c +++ b/src/dog.c @@ -160,6 +160,7 @@ makedog() register struct obj *otmp; const char *petname; int pettype; + static int petname_used = 0; if (preferred_pet == 'n') return ((struct monst *) 0);