diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d8c5ae5ce..707de2ca2 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ $NHDT-Date: 1573178084 2019/11/08 01:54:44 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ $NHDT-Date: 1573290414 2019/11/09 09:06:54 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -218,6 +218,9 @@ when dipping into holy/unholy water while blind (where the glow message is suppressed), clear dipped item's bknown flag unless water potion's bless/curse state is known playing music while hallucinating: message misspelled "butterflies" +putting on gloves while having slippery fingers transfered slipperiness to + those gloves; taking off slippery gloves directly was disallowed but + losing them in other ways transfered slipperiness to bare fingers Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/doc/nethack.6 b/doc/nethack.6 index ea704bb2f..dda4c89f4 100644 --- a/doc/nethack.6 +++ b/doc/nethack.6 @@ -47,6 +47,9 @@ nethack \- Exploring The Mazes of Menace .B \-ibm ] [ +.BR \-\-showpaths +] +[ .BR \-\-version [ :paste ] ] .PP @@ -223,6 +226,10 @@ the list of top scorers, and a subdirectory .I save where games are saved. .PP +.B \-\-showpaths +can be used to cause NetHack to show where it is expecting +to find various configuration files. +.PP .B \-\-version can be used to cause NetHack to show the version information it was compiled with, then exit. That will include the diff --git a/include/decl.h b/include/decl.h index f5b2aa5b6..540d20f1b 100644 --- a/include/decl.h +++ b/include/decl.h @@ -461,7 +461,7 @@ struct breadcrumbs { E const char *ARGV0; #endif -enum earlyarg {ARG_DEBUG, ARG_VERSION +enum earlyarg {ARG_DEBUG, ARG_VERSION, ARG_SHOWPATHS #ifdef WIN32 ,ARG_WINDOWS #endif diff --git a/include/extern.h b/include/extern.h index dfde30e53..1d764ca95 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1571436000 2019/10/18 22:00:00 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.730 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1573290414 2019/11/09 09:06:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.736 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -847,6 +847,7 @@ E int FDECL(nhclose, (int)); #ifdef DEBUG E boolean FDECL(debugcore, (const char *, BOOLEAN_P)); #endif +E void NDECL(reveal_paths); E boolean FDECL(read_tribute, (const char *, const char *, int, char *, int, unsigned)); E boolean FDECL(Death_quote, (char *, int)); @@ -1749,6 +1750,7 @@ E int FDECL(rnd_class, (int, int)); E const char *FDECL(suit_simple_name, (struct obj *)); E const char *FDECL(cloak_simple_name, (struct obj *)); E const char *FDECL(helm_simple_name, (struct obj *)); +E const char *FDECL(gloves_simple_name, (struct obj *)); E const char *FDECL(mimic_obj_name, (struct monst *)); E char *FDECL(safe_qbuf, (char *, const char *, const char *, struct obj *, char *(*)(OBJ_P), char *(*)(OBJ_P), const char *)); @@ -1966,6 +1968,7 @@ E void FDECL(make_blinded, (long, BOOLEAN_P)); E void NDECL(toggle_blindness); E boolean FDECL(make_hallucinated, (long, BOOLEAN_P, long)); E void FDECL(make_deaf, (long, BOOLEAN_P)); +E void FDECL(make_glib, (int)); E void NDECL(self_invis_message); E int NDECL(dodrink); E int FDECL(dopotion, (struct obj *)); diff --git a/src/allmain.c b/src/allmain.c index 9a8d31276..0c50a07df 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -772,6 +772,7 @@ const char *msg; static const struct early_opt earlyopts[] = { {ARG_DEBUG, "debug", 5, TRUE}, {ARG_VERSION, "version", 4, TRUE}, + {ARG_SHOWPATHS, "showpaths", 9, FALSE}, #ifdef WIN32 {ARG_WINDOWS, "windows", 4, TRUE}, #endif @@ -850,6 +851,9 @@ enum earlyarg e_arg; early_version_info(insert_into_pastebuf); return 2; } + case ARG_SHOWPATHS: { + return 2; + } #ifdef WIN32 case ARG_WINDOWS: { if (extended_opt) { diff --git a/src/apply.c b/src/apply.c index 02b0565ad..c4fa0aec1 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1571531886 2019/10/20 00:38:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.279 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1573290415 2019/11/09 09:06:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.282 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -99,8 +99,8 @@ struct obj *obj; switch (rn2(3)) { case 2: - old = Glib; - incr_itimeout(&Glib, rn1(10, 3)); + old = (Glib & TIMEOUT); + make_glib((int) old + rn1(10, 3)); /* + 3..12 */ Your("%s %s!", makeplural(body_part(HAND)), (old ? "are filthier than ever" : "get slimy")); if (is_wet_towel(obj)) @@ -139,8 +139,9 @@ struct obj *obj; } if (Glib) { - Glib = 0; - You("wipe off your %s.", makeplural(body_part(HAND))); + make_glib(0); + You("wipe off your %s.", + !uarmg ? makeplural(body_part(HAND)) : gloves_simple_name(uarmg)); if (is_wet_towel(obj)) dry_a_towel(obj, -1, drying_feedback); return 1; @@ -2282,6 +2283,9 @@ struct obj *obj; } if (obj->spe > 0) { + const char *fingers_or_gloves; + int oldglib; + if ((obj->cursed || Fumbling) && !rn2(2)) { consume_obj_charge(obj, TRUE); @@ -2297,17 +2301,20 @@ struct obj *obj; return; consume_obj_charge(obj, TRUE); + fingers_or_gloves = !uarmg ? makeplural(body_part(FINGER)) + : gloves_simple_name(uarmg); + oldglib = (int) (Glib & TIMEOUT); if (otmp != &cg.zeroobj) { You("cover %s with a thick layer of grease.", yname(otmp)); otmp->greased = 1; if (obj->cursed && !nohands(g.youmonst.data)) { - incr_itimeout(&Glib, rnd(15)); + make_glib(oldglib + rn1(6, 10)); /* + 10..15 */ pline("Some of the grease gets all over your %s.", - makeplural(body_part(HAND))); + fingers_or_gloves); } } else { - incr_itimeout(&Glib, rnd(15)); - You("coat your %s with grease.", makeplural(body_part(FINGER))); + make_glib(oldglib + rn1(11, 5)); /* + 5..15 */ + You("coat your %s with grease.", fingers_or_gloves); } } else { if (obj->known) diff --git a/src/cmd.c b/src/cmd.c index 96e4e0c01..ca931aceb 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1572141702 2019/10/27 02:01:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.347 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1573290415 2019/11/09 09:06:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.348 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1477,15 +1477,21 @@ wiz_intrinsic(VOID_ARGS) = &mons[g.context.warntype.speciesidx]; } goto def_feedback; + case GLIB: + /* slippery fingers applies to gloves if worn at the time + so persistent inventory might need updating */ + make_glib((int) newtimeout); + goto def_feedback; case LEVITATION: case FLYING: float_vs_flight(); /*FALLTHRU*/ default: - def_feedback: + def_feedback: pline("Timeout for %s %s %d.", propertynames[i].prop_name, oldtimeout ? "increased by" : "set to", amt); - incr_itimeout(&u.uprops[p].intrinsic, amt); + if (p != GLIB) + incr_itimeout(&u.uprops[p].intrinsic, amt); break; } g.context.botl = 1; /* probably not necessary... */ @@ -2467,7 +2473,11 @@ int final; } } if (Glib) { - Sprintf(buf, "slippery %s", makeplural(body_part(FINGER))); + Sprintf(buf, "slippery %s", + !uarmg ? makeplural(body_part(FINGER)) + : gloves_simple_name(uarmg)); + if (wizard) + Sprintf(eos(buf), " (%ld)", (Glib & TIMEOUT)); you_have(buf, ""); } if (Fumbling) { @@ -5044,7 +5054,7 @@ const char *s; char dirsym; int is_mov; -retry: + retry: if (g.in_doagain || *readchar_queue) dirsym = readchar(); else diff --git a/src/do_wear.c b/src/do_wear.c index 4a3c5fade..6f88b99b0 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1570566377 2019/10/08 20:26:17 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.111 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1573290416 2019/11/09 09:06:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.112 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -558,6 +558,14 @@ Gloves_off(VOID_ARGS) g.context.takeoff.cancelled_don = FALSE; (void) encumber_msg(); /* immediate feedback for GoP */ + /* usually can't remove gloves when they're slippery but it can + be done by having them fall off (polymorph), stolen, or + destroyed (scroll, overenchantment, monster spell); if that + happens, 'cure' slippery fingers so that it doesn't transfer + from gloves to bare hands */ + if (Glib) + make_glib(0); /* for update_inventory() */ + /* prevent wielding cockatrice when not wearing gloves */ if (uwep && uwep->otyp == CORPSE) wielding_corpse(uwep, on_purpose); @@ -1582,7 +1590,7 @@ struct obj *otmp; else if (is_shield(otmp)) (void) Shield_off(); else - setworn((struct obj *) 0, otmp->owornmask & W_ARMOR); + (void) Armor_off(); off_msg(otmp); } g.context.takeoff.mask = g.context.takeoff.what = 0L; @@ -1732,6 +1740,13 @@ boolean noisy; You("cannot wear gloves over your %s.", is_sword(uwep) ? c_sword : c_weapon); err++; + } else if (Glib) { + /* prevent slippery bare fingers from transferring to + gloved fingers */ + if (noisy) + Your("%s are too slippery to pull on %s.", + makeplural(body_part(FINGER)), gloves_simple_name(otmp)); + err++; } else *mask = W_ARMG; } else if (is_shirt(otmp)) { @@ -1856,10 +1871,16 @@ struct obj *obj; } } while (!mask); } + if (uarmg && Glib) { + Your( + "%s are too slippery to remove, so you cannot put on the ring.", + gloves_simple_name(uarmg)); + return 1; /* always uses move */ + } if (uarmg && uarmg->cursed) { res = !uarmg->bknown; set_bknown(uarmg, 1); - You("cannot remove your gloves to put on the ring."); + You("cannot remove your %s to put on the ring.", c_gloves); return res; /* uses move iff we learned gloves are cursed */ } if (uwep) { @@ -2260,8 +2281,9 @@ register struct obj *otmp; set_bknown(uwep, 1); return 0; } else if (Glib) { - You_cant("take off the slippery %s with your slippery %s.", - c_gloves, makeplural(body_part(FINGER))); + pline("%s %s are too slippery to take off.", + uarmg->unpaid ? "The" : "Your", /* simplified Shk_Your() */ + gloves_simple_name(uarmg)); return 0; } } diff --git a/src/eat.c b/src/eat.c index 23ee9f721..abad8bf9c 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 eat.c $NHDT-Date: 1561233801 2019/06/22 20:03:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.203 $ */ +/* NetHack 3.6 eat.c $NHDT-Date: 1573290417 2019/11/09 09:06:57 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.204 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1372,9 +1372,11 @@ const char *mesg; if (tintxts[r].greasy) { /* Assume !Glib, because you can't open tins when Glib. */ - incr_itimeout(&Glib, rnd(15)); + make_glib(rn1(11, 5)); /* 5..15 */ pline("Eating %s food made your %s very slippery.", - tintxts[r].txt, makeplural(body_part(FINGER))); + tintxts[r].txt, + !uarmg ? makeplural(body_part(FINGER)) + : gloves_simple_name(uarmg)); } } else { /* spinach... */ diff --git a/src/files.c b/src/files.c index 0efb2e7ee..be8b2ad1c 100644 --- a/src/files.c +++ b/src/files.c @@ -3428,7 +3428,13 @@ fopen_sym_file() { FILE *fp; - fp = fopen_datafile(SYMBOLS, "r", HACKPREFIX); + fp = fopen_datafile(SYMBOLS, "r", +#ifdef WIN32 + SYSCONFPREFIX +#else + HACKPREFIX +#endif + ); return fp; } @@ -4227,6 +4233,98 @@ boolean wildcards; #endif /*DEBUG*/ +void +reveal_paths(VOID_ARGS) +{ + int i; +#define PATHBUFSZ 1024 + char buf[PATHBUFSZ]; +#ifdef UNIX + char *envp, *slash, nhpath[PATHBUFSZ]; +#endif + + /* write out path details */ +#ifdef PREFIXES_IN_USE + raw_print("Variable playground locations:"); + for (i = 0; i < PREFIX_COUNT; i++) + raw_printf(" [%-10s]=\"%s\"", fqn_prefix_names[i], + g.fqn_prefix[i] + ? g.fqn_prefix[i] + : "not set"); +#endif + /* sysconf file */ +#ifdef PREFIXES_IN_USE + Sprintf(buf, " (in %s)", + fqn_prefix_names[SYSCONFPREFIX]); +#else + buf[0] = '\0'; +#endif + raw_printf("Your system configuration file%s:", buf); + set_configfile_name(fqname(SYSCF_FILE, SYSCONFPREFIX, 0)); + raw_printf(" \"%s\"", configfile); +#ifdef UNIX + Strcpy(nhpath, configfile); + slash = rindex(nhpath, '/'); + if (slash) + *slash = '\0'; +#endif + + /* symbols file */ +#ifdef PREFIXES_IN_USE + Sprintf(buf, " (in %s)", +#ifdef WIN32 + fqn_prefix_names[SYSCONFPREFIX]); +#else + fqn_prefix_names[HACKPREFIX]); +#endif /* WIN32 */ +#else /* PREFIXES_IN_USE */ + buf[0] = '\0'; +#endif + + raw_printf("Your system symbols file%s:", buf); +#ifdef UNIX + Sprintf(buf, "%s/%s", nhpath, SYMBOLS); +#else +#ifdef PREFIXES_IN_USE + Sprintf(buf, "%s", + fqname(SYMBOLS, +#ifdef WIN32 + SYSCONFPREFIX, 2)); +#else + HACKPREFIX, 2)); +#endif +#endif /* PREFIXES_IN_USE */ +#endif /* UNIX */ + raw_printf(" \"%s\"", buf); + + /* configuration file */ +#ifdef PREFIXES_IN_USE + Sprintf(buf, " (in %s)", + fqn_prefix_names[CONFIGPREFIX]); +#else /* PREFIXES_IN_USE */ + buf[0] = '\0'; +#endif + raw_printf("Your personal configuration file%s:", buf); +#ifdef UNIX + envp = nh_getenv("HOME"); + if (!envp) + Strcpy(nhpath, ".nethackrc"); + else + Sprintf(nhpath, "%s/%s", envp, default_configfile); +#endif + raw_printf(" \"%s\"", +#ifdef UNIX + nhpath); +#else +#ifdef PREFIXES_IN_USE + fqname(default_configfile, CONFIGPREFIX, 3)); +#else + default_configfile); +#endif /* PREFIXES_IN_USE */ +#endif /* UNIX */ + raw_print(""); +} + /* ---------- BEGIN TRIBUTE ----------- */ /* 3.6 tribute code diff --git a/src/objnam.c b/src/objnam.c index 1809de346..079de1bbf 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1571436005 2019/10/18 22:00:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.247 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1573290418 2019/11/09 09:06:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.248 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1053,7 +1053,7 @@ unsigned doname_flags; Strcat(bp, " (being worn)"); break; case ARMOR_CLASS: - if (obj->owornmask & W_ARMOR) + if (obj->owornmask & W_ARMOR) { Strcat(bp, (obj == uskin) ? " (embedded in your skin)" /* in case of perm_invent update while Wear/Takeoff is in progress; check doffing() before donning() @@ -1061,6 +1061,13 @@ unsigned doname_flags; : doffing(obj) ? " (being doffed)" : donning(obj) ? " (being donned)" : " (being worn)"); + /* slippery fingers is an intrinsic condition of the hero + rather than extrinsic condition of objects, but gloves + are described as slippery when hero has slippery fingers */ + if (obj == uarmg && Glib) /* just appended "(something)", + * change to "(something; slippery)" */ + Strcpy(rindex(bp, ')'), "; slippery)"); + } /*FALLTHRU*/ case WEAPON_CLASS: if (ispoisoned) @@ -4160,6 +4167,26 @@ struct obj *helmet; return (helmet && !is_metallic(helmet)) ? "hat" : "helm"; } +/* gloves vs gauntlets; depends upon discovery state */ +const char * +gloves_simple_name(gloves) +struct obj *gloves; +{ + static const char gauntlets[] = "gauntlets"; + + if (gloves && gloves->dknown) { + int otyp = gloves->otyp; + struct objclass *ocl = &objects[otyp]; + const char *actualn = OBJ_NAME(*ocl), + *descrpn = OBJ_DESCR(*ocl); + + if (strstri(objects[otyp].oc_name_known ? actualn : descrpn, + gauntlets)) + return gauntlets; + } + return "gloves"; +} + const char * mimic_obj_name(mtmp) struct monst *mtmp; diff --git a/src/polyself.c b/src/polyself.c index 9b8869892..6c0f5c732 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 polyself.c $NHDT-Date: 1570230710 2019/10/04 23:11:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.134 $ */ +/* NetHack 3.6 polyself.c $NHDT-Date: 1573290419 2019/11/09 09:06:59 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.135 $ */ /* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -709,7 +709,7 @@ int mntmp; } check_strangling(FALSE); /* maybe stop strangling */ if (nohands(g.youmonst.data)) - Glib = 0; + make_glib(0); /* mlvl = adj_lev(&mons[mntmp]); @@ -985,6 +985,7 @@ break_armor() You("drop your gloves%s!", uwep ? " and weapon" : ""); drop_weapon(0); (void) Gloves_off(); + /* Glib manipulation (ends immediately) handled by Gloves_off */ dropp(otmp); } if ((otmp = uarms) != 0) { diff --git a/src/potion.c b/src/potion.c index 9d5be2ccf..f4f795464 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 potion.c $NHDT-Date: 1572887644 2019/11/04 17:14:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.164 $ */ +/* NetHack 3.6 potion.c $NHDT-Date: 1573290421 2019/11/09 09:07:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -437,6 +437,17 @@ boolean talk; } } +/* set or clear "slippery fingers" */ +void +make_glib(xtime) +int xtime; +{ + set_itimeout(&Glib, xtime); + /* may change "(being worn)" to "(being worn; slippery)" or vice versa */ + if (uarmg) + update_inventory(); +} + void self_invis_message() { @@ -2124,8 +2135,9 @@ dodip() fire_damage(obj, TRUE, u.ux, u.uy); } else if (potion->cursed) { pline_The("potion spills and covers your %s with oil.", - makeplural(body_part(FINGER))); - incr_itimeout(&Glib, d(2, 10)); + !uarmg ? makeplural(body_part(FINGER)) + : gloves_simple_name(uarmg)); + make_glib((int) (Glib & TIMEOUT) + d(2, 10)); } else if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) { /* the following cases apply only to weapons */ goto more_dips; diff --git a/src/timeout.c b/src/timeout.c index d34955c5b..fb9863a9e 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 timeout.c $NHDT-Date: 1565574996 2019/08/12 01:56:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.92 $ */ +/* NetHack 3.6 timeout.c $NHDT-Date: 1573290422 2019/11/09 09:07:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.93 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -727,6 +727,9 @@ nh_timeout() case DETECT_MONSTERS: see_monsters(); break; + case GLIB: + make_glib(0); /* might update persistent inventory */ + break; } } diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index fd15756e1..5e970f117 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -114,11 +114,15 @@ char *argv[]; if (argcheck(argc, argv, ARG_VERSION) == 2) exit(EXIT_SUCCESS); + if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { + initoptions(); + reveal_paths(); + exit(EXIT_SUCCESS); + } if (argcheck(argc, argv, ARG_DEBUG) == 1) { argc--; argv++; } - if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') { /* avoid matching "-dec" for DECgraphics; since the man page * says -d directory, hope nobody's using -desomething_else diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index 530ac0c5e..8f9c76474 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -579,6 +579,11 @@ char *argv[]; if (argcheck(argc, argv, ARG_VERSION) == 2) nethack_exit(EXIT_SUCCESS); + if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) { + initoptions(); + reveal_paths(); + nethack_exit(EXIT_SUCCESS); + } if (argcheck(argc, argv, ARG_DEBUG) == 1) { argc--; argv++;