From 0bf3231f298095ce3380e49e48bd48e8bd17e5e3 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 11 Jun 2015 18:47:57 -0700 Subject: [PATCH] role selection: priest/priestess' prompt Change "Shall I pick your priest/priestess' race, gender, ..." prompt to "... priest/priestess's ...". Unfortunately that makes it long enough to push the cursor onto the next line for basic 80 column display. If caveman/cavewoman's wasn't already longer I think I would have left the clumsier phrasing/spelling. --- src/role.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/role.c b/src/role.c index d593faabc..f78e70cb1 100644 --- a/src/role.c +++ b/src/role.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 role.c $NHDT-Date: 1433207910 2015/06/02 01:18:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.31 $ */ +/* NetHack 3.6 role.c $NHDT-Date: 1434073671 2015/06/12 01:47:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.32 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1634,7 +1634,7 @@ int buflen, rolenum, racenum, gendnum, alignnum; { const char *defprompt = "Shall I pick a character for you? [ynaq] "; int num_post_attribs = 0; - char tmpbuf[BUFSZ]; + char tmpbuf[BUFSZ], *p; if (buflen < QBUFSZ) return (char *) defprompt; @@ -1650,6 +1650,12 @@ int buflen, rolenum, racenum, gendnum, alignnum; (void) root_plselection_prompt(eos(tmpbuf), buflen - strlen(tmpbuf), rolenum, racenum, gendnum, alignnum); Sprintf(buf, "%s", s_suffix(tmpbuf)); + /* don't bother splitting caveman/cavewoman or priest/priestess + in order to apply possessive suffix to both halves, but do + change "priest/priestess'" to "priest/priestess's" */ + if ((p = strstri(buf, "priest/priestess'")) != 0 + && p[sizeof "priest/priestess'" - sizeof ""] == '\0') + strkitten(buf, 's'); /* buf should now be: * -- 2.40.0