Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-07-03 18:25:55 -04:00
2 changed files with 43 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 objnam.c $NHDT-Date: 1561081353 2019/06/21 01:42:33 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.244 $ */
/* NetHack 3.6 objnam.c $NHDT-Date: 1562186589 2019/07/03 20:43:09 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.245 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1832,6 +1832,30 @@ struct obj *obj;
return s;
}
#if 0 /* stalled-out work in progress */
/* Doname2() for itemized buying of 'obj' from a shop */
char *
payDoname(obj)
struct obj *obj;
{
static const char and_contents[] = " and its contents";
char *p = doname(obj);
if (Is_container(obj) && !obj->cknown) {
if (obj->unpaid) {
if ((int) strlen(p) + sizeof and_contents - 1 < BUFSZ - PREFIX)
Strcat(p, and_contents);
*p = highc(*p);
} else {
p = strprepend(p, "Contents of ");
}
} else {
*p = highc(*p);
}
return p;
}
#endif /*0*/
/* returns "[your ]xname(obj)" or "Foobar's xname(obj)" or "the xname(obj)" */
char *
yname(obj)