From: PatR Date: Mon, 13 Jul 2015 02:35:06 +0000 (-0700) Subject: formatting fixup (1 of 2) X-Git-Tag: NetHack-3.6.0_RC01~223 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b2ee0fbab6689b4e54820c22100dc02b8d26676;p=nethack formatting fixup (1 of 2) Replace instances of strings split across lines which rely on C89/C90 implicit concatenation of string literals to splice them together with single strings that are outdented relative to the code that uses them. It's uglier but it won't break compile for pre-ANSI compilers. This covers many files in src/ that only have one or two such split strings. There are several more files which have three or more. Those will eventually be '(2 of 2)'. Noticed along the way: the fake mail message/subject Report bugs to devteam@nethack.org. wasn't using its format string of "Report bugs to %s.", so would have just shown our email address. Doesn't anybody enable fake mail anymore? I modified that format to enclose the address within angle brackets and made a similar change for the 'contact' choice of the '?' command. --- diff --git a/src/apply.c b/src/apply.c index 45bd65b3e..03a7d1e60 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1432512764 2015/05/25 00:12:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.199 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1436753497 2015/07/13 02:11:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.200 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3463,8 +3463,8 @@ doapply() if (flags.verbose) pline("In order to eat, use the 'e' command."); if (obj != uwep) - pline("Opening the tin will be much easier if you wield the tin " - "opener."); + pline( + "Opening the tin will be much easier if you wield the tin opener."); goto xit; case FIGURINE: diff --git a/src/cmd.c b/src/cmd.c index 6d0f84dff..7e69ee7c5 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1434507810 2015/06/17 02:23:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.196 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1436753509 2015/07/13 02:11:49 $ $NHDT-Branch: master $:$NHDT-Revision: 1.197 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -391,8 +391,8 @@ extcmd_via_menu() /* here after # - now show pick-list of possible commands */ } if (++i > MAX_EXT_CMD) { #if defined(BETA) - impossible("Exceeded %d extended commands in doextcmd() " - "menu; 'extmenu' disabled.", + impossible( + "Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.", MAX_EXT_CMD); #endif /* BETA */ iflags.extmenu = 0; @@ -539,8 +539,8 @@ enter_explore_mode(VOID_ARGS) } #endif #endif - pline("Beware! From explore mode there will be no return to normal " - "game."); + pline( + "Beware! From explore mode there will be no return to normal game."); if (paranoid_query(ParanoidQuit, "Do you want to enter explore mode?")) { clear_nhwindow(WIN_MESSAGE); diff --git a/src/detect.c b/src/detect.c index c149cac69..b1d730cab 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 detect.c $NHDT-Date: 1432512764 2015/05/25 00:12:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.58 $ */ +/* NetHack 3.6 detect.c $NHDT-Date: 1436753510 2015/07/13 02:11:50 $ $NHDT-Branch: master $:$NHDT-Revision: 1.60 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -212,8 +212,8 @@ register struct obj *sobj; if (youmonst.data == &mons[PM_GOLD_GOLEM]) { Sprintf(buf, "You feel like a million %s!", currency(2L)); } else if (hidden_gold() || money_cnt(invent)) - Strcpy(buf, "You feel worried about your future financial " - "situation."); + Strcpy(buf, + "You feel worried about your future financial situation."); else Strcpy(buf, "You feel materially poor."); strange_feeling(sobj, buf); diff --git a/src/dungeon.c b/src/dungeon.c index 4f6e12731..abfa7bd0b 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 dungeon.c $NHDT-Date: 1436065584 2015/07/05 03:06:24 $ $NHDT-Branch: master $:$NHDT-Revision: 1.60 $ */ +/* NetHack 3.6 dungeon.c $NHDT-Date: 1436753511 2015/07/13 02:11:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.61 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -116,11 +116,12 @@ dumpit() br->type == BR_STAIR ? "stair" : br->type == BR_NO_END1 - ? "no end1" - : br->type == BR_NO_END2 - ? "no end2" - : br->type == BR_PORTAL ? "portal" - : "unknown", + ? "no end1" + : br->type == BR_NO_END2 + ? "no end2" + : br->type == BR_PORTAL + ? "portal" + : "unknown", br->end1.dnum, br->end1.dlevel, br->end2.dnum, br->end2.dlevel, br->end1_up ? "end1 up" : "end1 down"); } @@ -243,8 +244,8 @@ dlb *stream; int cnt; if ((cnt = dlb_fread(ptr, size, nitems, stream)) != nitems) { - panic("Premature EOF on dungeon description file!\r\nExpected %d " - "bytes - got %d.", + panic( + "Premature EOF on dungeon description file!\r\nExpected %d bytes - got %d.", (size * nitems), (size * cnt)); terminate(EXIT_FAILURE); } diff --git a/src/engrave.c b/src/engrave.c index 9164e3772..6b843545d 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 engrave.c $NHDT-Date: 1432512768 2015/05/25 00:12:48 $ $NHDT-Branch: master $:$NHDT-Revision: 1.56 $ */ +/* NetHack 3.6 engrave.c $NHDT-Date: 1436753512 2015/07/13 02:11:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.57 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -169,9 +169,10 @@ int x, y; boolean up, check_pit; { You("can't reach the %s.", - up ? ceiling(x, y) : (check_pit && can_reach_floor(FALSE)) - ? "bottom of the pit" - : surface(x, y)); + up ? ceiling(x, y) + : (check_pit && can_reach_floor(FALSE)) + ? "bottom of the pit" + : surface(x, y)); } const char * @@ -753,11 +754,11 @@ doengrave() IS_GRAVE(levl[u.ux][u.uy].typ) ? "Chips fly out from the headstone." : is_ice(u.ux, u.uy) - ? "Ice chips fly up from the ice surface!" - : (level.locations[u.ux][u.uy].typ - == DRAWBRIDGE_DOWN) - ? "Splinters fly up from the bridge." - : "Gravel flies up from the floor."); + ? "Ice chips fly up from the ice surface!" + : (level.locations[u.ux][u.uy].typ + == DRAWBRIDGE_DOWN) + ? "Splinters fly up from the bridge." + : "Gravel flies up from the floor."); else Strcpy(post_engr_text, "You hear drilling!"); break; @@ -905,8 +906,8 @@ doengrave() pline("%s %sturns to dust.", The(xname(otmp)), Blind ? "" : "glows violently, then "); if (!IS_GRAVE(levl[u.ux][u.uy].typ)) - You("are not going to get anywhere trying to write in the %s " - "with your dust.", + You( + "are not going to get anywhere trying to write in the %s with your dust.", is_ice(u.ux, u.uy) ? "frost" : "dust"); useup(otmp); otmp = 0; /* wand is now gone */ @@ -947,11 +948,11 @@ doengrave() || (oep->engr_type == MARK)) { if (!Blind) { You("wipe out the message that was %s here.", - ((oep->engr_type == DUST) - ? "written in the dust" - : ((oep->engr_type == ENGR_BLOOD) - ? "scrawled in blood" - : "written"))); + (oep->engr_type == DUST) + ? "written in the dust" + : (oep->engr_type == ENGR_BLOOD) + ? "scrawled in blood" + : "written"); del_engr(oep); oep = (struct engr *) 0; } else @@ -1102,10 +1103,9 @@ doengrave() case BURN: multi = -(len / 10); if (multi) - nomovemsg = - is_ice(u.ux, u.uy) - ? "You finish melting your message into the ice." - : "You finish burning your message into the floor."; + nomovemsg = is_ice(u.ux, u.uy) + ? "You finish melting your message into the ice." + : "You finish burning your message into the floor."; break; case MARK: multi = -(len / 10); diff --git a/src/fountain.c b/src/fountain.c index 4e25ca7c6..d7c4788ea 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 fountain.c $NHDT-Date: 1432512767 2015/05/25 00:12:47 $ $NHDT-Branch: master $:$NHDT-Revision: 1.53 $ */ +/* NetHack 3.6 fountain.c $NHDT-Date: 1436753513 2015/07/13 02:11:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.54 $ */ /* Copyright Scott R. Turner, srt@ucla, 10/27/86 */ /* NetHack may be freely redistributed. See license for details. */ @@ -372,8 +372,8 @@ register struct obj *obj; && !exist_artifact(LONG_SWORD, artiname(ART_EXCALIBUR))) { if (u.ualign.type != A_LAWFUL) { /* Ha! Trying to cheat her. */ - pline("A freezing mist rises from the water and envelopes the " - "sword."); + pline( + "A freezing mist rises from the water and envelopes the sword."); pline_The("fountain disappears!"); curse(obj); if (obj->spe > -6 && !rn2(3)) @@ -383,8 +383,8 @@ register struct obj *obj; } else { /* The lady of the lake acts! - Eric Backus */ /* Be *REAL* nice */ - pline("From the murky depths, a hand reaches up to bless the " - "sword."); + pline( + "From the murky depths, a hand reaches up to bless the sword."); pline("As the hand retreats, the fountain disappears!"); obj = oname(obj, artiname(ART_EXCALIBUR)); discover_artifact(ART_EXCALIBUR); diff --git a/src/hack.c b/src/hack.c index 601f56499..7c865562c 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 hack.c $NHDT-Date: 1432512764 2015/05/25 00:12:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.150 $ */ +/* NetHack 3.6 hack.c $NHDT-Date: 1436753514 2015/07/13 02:11:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.151 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -329,8 +329,8 @@ moverock() && (!u.dx || !u.dy || (IS_ROCK(levl[u.ux][sy].typ) && IS_ROCK(levl[sx][u.uy].typ)))) || verysmall(youmonst.data))) { - pline("However, you can squeeze yourself into a small " - "opening."); + pline( + "However, you can squeeze yourself into a small opening."); sokoban_guilt(); break; } else @@ -360,9 +360,11 @@ xchar x, y; if (!boulder && IS_ROCK(lev->typ) && !may_dig(x, y)) { You("hurt your teeth on the %s.", - lev->typ == IRONBARS + (lev->typ == IRONBARS) ? "bars" - : (IS_TREE(lev->typ) ? "tree" : "hard stone")); + : IS_TREE(lev->typ) + ? "tree" + : "hard stone"); nomul(0); return 1; } else if (context.digging.pos.x != x || context.digging.pos.y != y @@ -380,24 +382,30 @@ xchar x, y; (boulder || IS_TREE(lev->typ) || lev->typ == IRONBARS) ? "on a" : "a hole in the", - boulder ? "boulder" : IS_TREE(lev->typ) - ? "tree" - : IS_ROCK(lev->typ) - ? "rock" - : lev->typ == IRONBARS ? "bar" - : "door"); + boulder + ? "boulder" + : IS_TREE(lev->typ) + ? "tree" + : IS_ROCK(lev->typ) + ? "rock" + : lev->typ == IRONBARS + ? "bar" + : "door"); watch_dig((struct monst *) 0, x, y, FALSE); return 1; } else if ((context.digging.effort += (30 + u.udaminc)) <= 100) { if (flags.verbose) You("%s chewing on the %s.", context.digging.chew ? "continue" : "begin", - boulder ? "boulder" - : IS_TREE(lev->typ) - ? "tree" - : IS_ROCK(lev->typ) - ? "rock" - : lev->typ == IRONBARS ? "bars" : "door"); + boulder + ? "boulder" + : IS_TREE(lev->typ) + ? "tree" + : IS_ROCK(lev->typ) + ? "rock" + : (lev->typ == IRONBARS) + ? "bars" + : "door"); context.digging.chew = TRUE; watch_dig((struct monst *) 0, x, y, FALSE); return 1; @@ -720,8 +728,8 @@ int mode; } else { if (mode == DO_MOVE) { if (amorphous(youmonst.data)) - You("try to ooze under the door, but can't squeeze " - "your possessions through."); + You( + "try to ooze under the door, but can't squeeze your possessions through."); if (flags.autoopen && !context.run && !Confusion && !Stunned && !Fumbling) { context.door_opened = context.move = @@ -1469,8 +1477,8 @@ domove() (levl[x][y].typ == STONE) ? "solid rock" : glyph_is_cmap(glyph) - ? the(defsyms[glyph_to_cmap(glyph)].explanation) - : (const char *) "an unknown obstacle"); + ? the(defsyms[glyph_to_cmap(glyph)].explanation) + : (const char *) "an unknown obstacle"); /* note: 'solid' is misleadingly named and catches pools of water and lava as well as rock and walls */ else diff --git a/src/invent.c b/src/invent.c index 7b6cbf0ce..52b0b96a1 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1434421348 2015/06/16 02:22:28 $ $NHDT-Branch: master $:$NHDT-Revision: 1.167 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1436753515 2015/07/13 02:11:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.168 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1244,8 +1244,8 @@ register const char *let, *word; */ if (allowcnt == 2 && cnt <= 0) { if (cnt < 0 || !prezero) - pline_The("LRS would be very interested to know you have " - "that much."); + pline_The( + "LRS would be very interested to know you have that much."); return (struct obj *) 0; } } @@ -2535,8 +2535,8 @@ dotypeinv() which = "known to be cursed"; break; case 'X': - You("have no objects whose blessed/uncursed/cursed status is " - "unknown."); + You( + "have no objects whose blessed/uncursed/cursed status is unknown."); break; /* better phrasing is desirable */ default: which = "such"; @@ -2733,17 +2733,24 @@ boolean picked_some; There("is %s object here.", picked_some ? "another" : "an"); else There("are %s%s objects here.", - (obj_cnt < 5) ? "a few" : (obj_cnt < 10) ? "several" - : "many", + (obj_cnt < 5) + ? "a few" + : (obj_cnt < 10) + ? "several" + : "many", picked_some ? " more" : ""); for (; otmp; otmp = otmp->nexthere) if (otmp->otyp == CORPSE && will_feel_cockatrice(otmp, FALSE)) { pline("%s %s%s.", - (obj_cnt > 1) ? "Including" - : (otmp->quan > 1L) ? "They're" : "It's", + (obj_cnt > 1) + ? "Including" + : (otmp->quan > 1L) + ? "They're" + : "It's", corpse_xname(otmp, (const char *) 0, CXN_ARTICLE), - poly_when_stoned(youmonst.data) ? "" - : ", unfortunately"); + poly_when_stoned(youmonst.data) + ? "" + : ", unfortunately"); feel_cockatrice(otmp, FALSE); break; } diff --git a/src/lock.c b/src/lock.c index 00d8644cf..ea6b94e22 100644 --- a/src/lock.c +++ b/src/lock.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 lock.c $NHDT-Date: 1432512773 2015/05/25 00:12:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.60 $ */ +/* NetHack 3.6 lock.c $NHDT-Date: 1436753515 2015/07/13 02:11:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.61 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -916,8 +916,8 @@ int x, y; msg = "The broken door reassembles and locks!"; break; case D_NODOOR: - msg = "A cloud of dust springs up and assembles itself into a " - "door!"; + msg = + "A cloud of dust springs up and assembles itself into a door!"; break; default: res = FALSE; diff --git a/src/mail.c b/src/mail.c index 0b7686519..f4c8bd8c6 100644 --- a/src/mail.c +++ b/src/mail.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mail.c $NHDT-Date: 1432512763 2015/05/25 00:12:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.19 $ */ +/* NetHack 3.6 mail.c $NHDT-Date: 1436754892 2015/07/13 02:34:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.20 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -440,18 +440,18 @@ struct obj *otmp; "This mail complies with the Yendorian Anti-Spam Act (YASA)", "Please find enclosed a small token to represent your Owlbear", "**FR33 P0T10N 0F FULL H34L1NG**", - "Please return to sender (Asmodeus)", "Buy a potion of gain level " - "for only $19.99! Guaranteed " - "to be blessed!", + "Please return to sender (Asmodeus)", + "Buy a potion of gain level for only $19.99! Guaranteed to be blessed!", "Invitation: Visit the NetHack web site at http://www.nethack.org!" }; /* XXX replace with more general substitution code and add local * contact message. Also use DEVTEAM_URL */ if (junk[0] == NULL) { -#define BUGS_FORMAT "Report bugs to %s." +#define BUGS_FORMAT "Report bugs to <%s>." + /* +2 from '%s' suffices as substitute for usual +1 for terminator */ junk[0] = (char *) alloc(strlen(BUGS_FORMAT) + strlen(DEVTEAM_EMAIL)); - sprintf(junk[0], DEVTEAM_EMAIL); + Sprintf(junk[0], BUGS_FORMAT, DEVTEAM_EMAIL); #undef BUGS_FORMAT } if (Blind) { diff --git a/src/mcastu.c b/src/mcastu.c index 9e0f0dc69..94a4d97e3 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mcastu.c $NHDT-Date: 1432512772 2015/05/25 00:12:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.43 $ */ +/* NetHack 3.6 mcastu.c $NHDT-Date: 1436753517 2015/07/13 02:11:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -212,8 +212,8 @@ boolean foundyou; if (!is_undirected_spell(mattk->adtyp, spellnum) || spell_would_be_useless(mtmp, mattk->adtyp, spellnum)) { if (foundyou) - impossible("spellcasting monster found you and " - "doesn't know it?"); + impossible( + "spellcasting monster found you and doesn't know it?"); return 0; } break; @@ -275,8 +275,8 @@ boolean foundyou; if (!foundyou) { dmg = 0; if (mattk->adtyp != AD_SPEL && mattk->adtyp != AD_CLRC) { - impossible("%s casting non-hand-to-hand version of hand-to-hand " - "spell %d?", + impossible( + "%s casting non-hand-to-hand version of hand-to-hand spell %d?", Monnam(mtmp), mattk->adtyp); return (0); } diff --git a/src/mkobj.c b/src/mkobj.c index 16c839ffc..5f859e528 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mkobj.c $NHDT-Date: 1433500549 2015/06/05 10:35:49 $ $NHDT-Branch: master $:$NHDT-Revision: 1.102 $ */ +/* NetHack 3.6 mkobj.c $NHDT-Date: 1436753518 2015/07/13 02:11:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.103 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1625,8 +1625,8 @@ struct obj *otmp; /* Adjust the age; must be same as obj_timer_checks() for off ice*/ age = monstermoves - otmp->age; retval += age * (ROT_ICE_ADJUSTMENT - 1) / ROT_ICE_ADJUSTMENT; - debugpline3("The %s age has ice modifications: otmp->age = %ld, " - "returning %ld.", + debugpline3( + "The %s age has ice modifications: otmp->age = %ld, returning %ld.", s_suffix(doname(otmp)), otmp->age, retval); debugpline1("Effective age of corpse: %ld.", monstermoves - retval); } diff --git a/src/mthrowu.c b/src/mthrowu.c index 32f92db56..bf01f0358 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mthrowu.c $NHDT-Date: 1432512770 2015/05/25 00:12:50 $ $NHDT-Branch: master $:$NHDT-Revision: 1.55 $ */ +/* NetHack 3.6 mthrowu.c $NHDT-Date: 1436753519 2015/07/13 02:11:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.56 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -352,8 +352,8 @@ struct obj *obj; /* missile (or stack providing it) */ makeknown(singleobj->otyp); dropy(singleobj); } else { - You("accept %s gift in the spirit in which it was " - "intended.", + You( + "accept %s gift in the spirit in which it was intended.", s_suffix(mon_nam(mon))); (void) hold_another_object( singleobj, "You catch, but drop, %s.", diff --git a/src/muse.c b/src/muse.c index 86fd2c17d..35b9971d0 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 muse.c $NHDT-Date: 1432512771 2015/05/25 00:12:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.63 $ */ +/* NetHack 3.6 muse.c $NHDT-Date: 1436753520 2015/07/13 02:12:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.64 $ */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -838,8 +838,8 @@ struct monst *mtmp; if (Inhell && mon_has_amulet(mtmp) && !rn2(4) && (dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz) - 3)) { if (vismon) - pline("As %s climbs the stairs, a mysterious force " - "momentarily surrounds %s...", + pline( + "As %s climbs the stairs, a mysterious force momentarily surrounds %s...", mon_nam(mtmp), mhim(mtmp)); /* simpler than for the player; this will usually be the Wizard and he'll immediately go right to the diff --git a/src/pager.c b/src/pager.c index a32ae3ef7..fa0ac11bc 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 pager.c $NHDT-Date: 1436234837 2015/07/07 02:07:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.78 $ */ +/* NetHack 3.6 pager.c $NHDT-Date: 1436754893 2015/07/13 02:34:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.79 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1184,6 +1184,7 @@ docontact() { winid cwin = create_nhwindow(NHW_TEXT); char buf[BUFSZ]; + if (sysopt.support) { /*XXX overflow possibilities*/ Sprintf(buf, "To contact local support, %s", sysopt.support); @@ -1198,12 +1199,12 @@ docontact() } putstr(cwin, 0, "To contact the NetHack development team directly,"); /*XXX overflow possibilities*/ - Sprintf(buf, "see the Contact form on our website or email %s", + Sprintf(buf, "see the 'Contact' form on our website or email <%s>.", DEVTEAM_EMAIL); putstr(cwin, 0, buf); putstr(cwin, 0, ""); putstr(cwin, 0, "For more information on NetHack, or to report a bug,"); - Sprintf(buf, "visit our website %s", DEVTEAM_URL); + Sprintf(buf, "visit our website \"%s\".", DEVTEAM_URL); putstr(cwin, 0, buf); display_nhwindow(cwin, FALSE); destroy_nhwindow(cwin); diff --git a/src/rip.c b/src/rip.c index 420d83757..80791cb84 100644 --- a/src/rip.c +++ b/src/rip.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 rip.c $NHDT-Date: 1432512770 2015/05/25 00:12:50 $ $NHDT-Branch: master $:$NHDT-Revision: 1.17 $ */ +/* NetHack 3.6 rip.c $NHDT-Date: 1436753522 2015/07/13 02:12:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -55,8 +55,7 @@ static const char *rip_txt[] = { " | | | Ascended |", " | 1001 | | |", " * | * * * | * * | * * * | *", - " _____)/\\|\\__//(\\/(/\\)/\\//\\/|_)________)/|\\\\_/_/(\\/(/\\)/\\/\\/" - "|_)____", + " _____)/\\|\\__//(\\/(/\\)/\\//\\/|_)________)/|\\\\_/_/(\\/(/\\)/\\/\\/|_)____", 0 }; #define STONE_LINE_CENT 19 /* char[] element of center of stone face */ diff --git a/src/sit.c b/src/sit.c index c42b88e77..13d063888 100644 --- a/src/sit.c +++ b/src/sit.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sit.c $NHDT-Date: 1432512762 2015/05/25 00:12:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.49 $ */ +/* NetHack 3.6 sit.c $NHDT-Date: 1436753523 2015/07/13 02:12:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.50 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -195,8 +195,9 @@ dosit() } else makewish(); break; - case 7: { - register int cnt = rnd(10); + case 7: + { + int cnt = rnd(10); /* Magical voice not affected by deafness */ pline("A voice echoes:"); @@ -205,7 +206,7 @@ dosit() while (cnt--) (void) makemon(courtmon(), u.ux, u.uy, NO_MM_FLAGS); break; - } + } case 8: /* Magical voice not affected by deafness */ pline("A voice echoes:"); @@ -216,8 +217,8 @@ dosit() case 9: /* Magical voice not affected by deafness */ pline("A voice echoes:"); - verbalize("A curse upon thee for sitting upon this most holy " - "throne!"); + verbalize( + "A curse upon thee for sitting upon this most holy throne!"); if (Luck > 0) { make_blinded(Blinded + rn1(100, 250), TRUE); } else @@ -281,9 +282,10 @@ dosit() struct obj *uegg; if (!flags.female) { - pline(Hallucination ? "You may think you are a platypus but a " - "male still can't lay eggs!" - : "Males can't lay eggs!"); + pline("%s can't lay eggs!", + Hallucination + ? "You may think you are a platypus, but a male still" + : "Males"); return 0; } else if (u.uhunger < (int) objects[EGG].oc_nutrition) { You("don't have enough energy to lay an egg."); diff --git a/src/sounds.c b/src/sounds.c index 0de6dae56..e05fd2e04 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sounds.c $NHDT-Date: 1434750452 2015/06/19 21:47:32 $ $NHDT-Branch: master $:$NHDT-Revision: 1.68 $ */ +/* NetHack 3.6 sounds.c $NHDT-Date: 1436753524 2015/07/13 02:12:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.69 $ */ /* Copyright (c) 1989 Janet Walz, Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -567,13 +567,13 @@ register struct monst *mtmp; isnight ? "!" : ". Why do we not rest?"); verbl_msg = verbuf; } else { - Sprintf( - verbuf, "%s%s", nightchild ? "Child of the night, " : "", - midnight() - ? "I can stand this craving no longer!" - : isnight ? "I beg you, help me satisfy this growing " - "craving!" - : "I find myself growing a little weary."); + Sprintf(verbuf, "%s%s", + nightchild ? "Child of the night, " : "", + midnight() + ? "I can stand this craving no longer!" + : isnight + ? "I beg you, help me satisfy this growing craving!" + : "I find myself growing a little weary."); verbl_msg = verbuf; } } else if (mtmp->mpeaceful) { @@ -810,8 +810,8 @@ register struct monst *mtmp; : "asks you about the One Ring."; break; case PM_ARCHEOLOGIST: - pline_msg = "describes a recent article in \"Spelunker " - "Today\" magazine."; + pline_msg = + "describes a recent article in \"Spelunker Today\" magazine."; break; case PM_TOURIST: verbl_msg = "Aloha."; diff --git a/src/topten.c b/src/topten.c index b4ab1abd8..0b4c23cbe 100644 --- a/src/topten.c +++ b/src/topten.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 topten.c $NHDT-Date: 1432512771 2015/05/25 00:12:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.35 $ */ +/* NetHack 3.6 topten.c $NHDT-Date: 1436753525 2015/07/13 02:12:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -542,8 +542,8 @@ time_t when; { char pbuf[BUFSZ]; topten_print(""); - Sprintf(pbuf, "Since you were in %s mode, the score list " - "will not be checked.", + Sprintf(pbuf, + "Since you were in %s mode, the score list will not be checked.", wizard ? "wizard" : "discover"); topten_print(pbuf); } diff --git a/src/trap.c b/src/trap.c index dbb06fb6a..d02ec1537 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 trap.c $NHDT-Date: 1432512773 2015/05/25 00:12:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.233 $ */ +/* NetHack 3.6 trap.c $NHDT-Date: 1436753526 2015/07/13 02:12:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.237 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2356,8 +2356,8 @@ register struct monst *mtmp; if (in_sight) { seetrap(trap); if (tt == TRAPDOOR) - pline("A trap door opens, but %s doesn't fall " - "through.", + pline( + "A trap door opens, but %s doesn't fall through.", mon_nam(mtmp)); else /* (tt == HOLE) */ pline("%s doesn't fall through the hole.", diff --git a/src/weapon.c b/src/weapon.c index 7545c0170..fc677a74e 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 weapon.c $NHDT-Date: 1432512762 2015/05/25 00:12:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.50 $ */ +/* NetHack 3.6 weapon.c $NHDT-Date: 1436753527 2015/07/13 02:12:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.51 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -976,8 +976,8 @@ enhance_weapon_skill() MENU_UNSELECTED); } if (maxxed_cnt > 0) { - Sprintf(buf, "(Skill%s flagged by \"#\" cannot be enhanced " - "any further.)", + Sprintf(buf, + "(Skill%s flagged by \"#\" cannot be enhanced any further.)", plur(maxxed_cnt)); add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); diff --git a/src/wield.c b/src/wield.c index f8e2a419b..42b88c329 100644 --- a/src/wield.c +++ b/src/wield.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 wield.c $NHDT-Date: 1432512768 2015/05/25 00:12:48 $ $NHDT-Branch: master $:$NHDT-Revision: 1.42 $ */ +/* NetHack 3.6 wield.c $NHDT-Date: 1436753528 2015/07/13 02:12:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.43 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -429,8 +429,8 @@ const char *verb; /* "rub",&c */ hand = makeplural(hand); if (strstri(what, "pair of ") != 0) more_than_1 = FALSE; - pline("Since your weapon is welded to your %s, you cannot %s %s " - "%s.", + pline( + "Since your weapon is welded to your %s, you cannot %s %s %s.", hand, verb, more_than_1 ? "those" : "that", xname(obj)); } else { You_cant("do that."); diff --git a/src/wizard.c b/src/wizard.c index d0a6c371c..f1d6a5e01 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 wizard.c $NHDT-Date: 1433457074 2015/06/04 22:31:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.38 $ */ +/* NetHack 3.6 wizard.c $NHDT-Date: 1436753529 2015/07/13 02:12:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -77,8 +77,8 @@ amulet() if (mtmp->iswiz && mtmp->msleeping && !rn2(40)) { mtmp->msleeping = 0; if (distu(mtmp->mx, mtmp->my) > 2) - You("get the creepy feeling that somebody noticed your " - "taking the Amulet."); + You( + "get the creepy feeling that somebody noticed your taking the Amulet."); return; } } diff --git a/src/write.c b/src/write.c index 4f609f77c..b4891e9e8 100644 --- a/src/write.c +++ b/src/write.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 write.c $NHDT-Date: 1432512764 2015/05/25 00:12:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */ +/* NetHack 3.6 write.c $NHDT-Date: 1436753530 2015/07/13 02:12:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.14 $ */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" @@ -292,8 +292,8 @@ found: You("%s to write that.", by_descr ? "fail" : "don't know how"); /* scrolls disappear, spellbooks don't */ if (paper->oclass == SPBOOK_CLASS) { - You("write in your best handwriting: \"My Diary\", but it " - "quickly fades."); + You( + "write in your best handwriting: \"My Diary\", but it quickly fades."); update_inventory(); /* pen charges */ } else { if (by_descr) {