Merge branch 'NetHack-3.7-Jan2020' into NetHack-3.7
This commit is contained in:
2
README
2
README
@@ -12,7 +12,7 @@ of fixes as they are committed.
|
||||
|
||||
In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as
|
||||
released code, and if stability is paramount, then the most recent
|
||||
NetHack 3.6.4 release is safest for you.
|
||||
NetHack 3.6.5 release is safest for you.
|
||||
|
||||
We're making the .0 work-in-progress available so that you can observe, test
|
||||
out, and contribute to its development. Constructive suggestions, GitHub pull
|
||||
|
||||
@@ -226,6 +226,9 @@ fixes to NetHack 3.6.2.
|
||||
NetHack 3.6.4 was released on December 18, 2019 containing a security
|
||||
fix and a few bug fixes.
|
||||
|
||||
NetHack 3.6.5 was released on January 27, 2020 containing some security fixes
|
||||
and a small number of bug fixes.
|
||||
|
||||
The official NetHack web site is maintained by Ken Lorber at
|
||||
http://www.nethack.org/.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
.ds vr "NetHack 3.7
|
||||
.ds f0 "\*(vr
|
||||
.ds f1
|
||||
.ds f2 "January 7, 2020
|
||||
.ds f2 "January 27, 2020
|
||||
.
|
||||
.\" A note on some special characters:
|
||||
.\" \(lq = left double quote
|
||||
@@ -5242,6 +5242,9 @@ fixes to NetHack 3.6.2.
|
||||
NetHack 3.6.4 was released on December 18, 2019 containing a security fix
|
||||
and a few bug fixes.
|
||||
.pg
|
||||
NetHack 3.6.5 was released on January 27, 2020 containing some security fixes
|
||||
and a small number of bug fixes.
|
||||
.pg
|
||||
The official NetHack web site is maintained by \fBKen Lorber\fP
|
||||
at
|
||||
.UR https://www.nethack.org/ .
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
%.au
|
||||
\author{Original version - Eric S. Raymond\\
|
||||
(Edited and expanded for 3.6 by Mike Stephenson and others)}
|
||||
\date{January 7, 2020}
|
||||
\date{January 27, 2020}
|
||||
|
||||
\maketitle
|
||||
|
||||
@@ -5854,6 +5854,11 @@ fixes to NetHack 3.6.2.
|
||||
NetHack 3.6.4 was released on December 18, 2019 containing a security fix and
|
||||
a few bug fixes.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
NetHack 3.6.5 was released on January 27, 2020 containing some security fixes
|
||||
and a small number of bug fixes.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
\nd The official {\it NetHack\/} web site is maintained by {\it Ken Lorber} at
|
||||
|
||||
2920
doc/Guidebook.txt
2920
doc/Guidebook.txt
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.12 $ $NHDT-Date: 1576638499 2019/12/18 03:08:19 $
|
||||
$NHDT-Branch: Nethack-3.6 $:$NHDT-Revision: 1.14 $ $NHDT-Date: 1576976556 2019/12/22 01:02:36 $
|
||||
|
||||
fixes36.4 contains a terse summary of changes made to 3.6.3 in order to
|
||||
produce 3.6.4.
|
||||
produce 3.6.4 as well as any post-release fixes in binaries.
|
||||
|
||||
|
||||
General Fixes and Modified Features
|
||||
@@ -35,4 +35,3 @@ General New Features
|
||||
--------------------
|
||||
none
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1576705788 2019/12/18 21:49:48 $
|
||||
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.3 $ $NHDT-Date: 1578996303 2020/01/14 10:05:03 $
|
||||
|
||||
fixes36.5 contains a terse summary of changes made to 3.6.4 in order to
|
||||
produce 3.6.5 as well as any post-release fixes in binaries.
|
||||
|
||||
This fixes36.5 file is here to capture information about updates in the 3.6.x
|
||||
lineage following the release of 3.6.4 in December 2019. Please note, however,
|
||||
that another 3.6.x release is not anticipated, and most developer
|
||||
focus will shift to the next major release.
|
||||
|
||||
General Fixes and Modified Features
|
||||
-----------------------------------
|
||||
fix accessing mons[-1] when trying to gate in a non-valid demon
|
||||
fix accessing mons[-1] when monster figures out if a tin cures stoning
|
||||
have string_for_opt() return empty_optstr on failure
|
||||
ensure existing callers of string_for_opt() check return value before using it
|
||||
fix potential buffer overflow in add_menu_coloring()
|
||||
fix potential buffer overflow in sym_val()
|
||||
fix potential buffer overflow in pline(), raw_printf(), and config_error_add()
|
||||
via bad config file values or command line arguments
|
||||
fix potential buffer overflow in choose_windows()
|
||||
use vsnprintf instead of vsprintf in pline.c where possible
|
||||
|
||||
|
||||
Fixes to Post-3.6.4 Problems that Were Exposed Via git Repository
|
||||
@@ -15,16 +24,10 @@ Fixes to Post-3.6.4 Problems that Were Exposed Via git Repository
|
||||
|
||||
Platform- and/or Interface-Specific Fixes or Features
|
||||
-----------------------------------------------------
|
||||
|
||||
Windows OPTIONS=map_mode:fit_to_screen could cause a game start failure
|
||||
Windows users with C-locale unmappable names could get game start failure
|
||||
|
||||
General New Features
|
||||
--------------------
|
||||
|
||||
|
||||
NetHack Community Patches (or Variation) Included
|
||||
-------------------------------------------------
|
||||
|
||||
|
||||
Code Cleanup and Reorganization
|
||||
-------------------------------
|
||||
none
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ fix internal self-recover to work with recent fields added to checkpoint file
|
||||
improvements to pronoun usage when hallucinating
|
||||
function calls made from mapglyph based on dungeon level are now called once
|
||||
per level
|
||||
fix accessing mons[-1] when trying to gate in a non-valid demon
|
||||
fast hero could have random clairvoyance happen more than once on same turn
|
||||
using 'Q' on wielded weapon would offer to split stack; make using 'w' on a
|
||||
quivered stack behave similarly
|
||||
@@ -23,7 +22,6 @@ change crysknife from mineral to bone and worm tooth from unspecified to bone
|
||||
worn meat ring shouldn't cause increased hunger; neither should fake Amulet
|
||||
worn +0 ring of protection should cause increased hunger if it is the only
|
||||
source of extrinsic Protection
|
||||
fix accessing mons[-1] when monster figures out if a tin cures stoning
|
||||
monster wielding Stormbringer or healer's Staff against another monster would
|
||||
heal the hero instead of the wielding monster when draining life
|
||||
change twoweapon feedback from "not a weapon" to "not a suitable weapon"
|
||||
|
||||
@@ -30,13 +30,17 @@ SHORT COMMANDS
|
||||
through the same logic as that used by the --grep command; see
|
||||
the MDGREP FUNCTIONS section below for details.
|
||||
|
||||
-m Generate date.h and options file. It will read dat/gitinfo.txt,
|
||||
-c Generate date.h and options file. It will read dat/gitinfo.txt,
|
||||
only if it is present, to obtain githash= and gitbranch=
|
||||
info and include related preprocessor #defines in date.h file.
|
||||
only if it is present, to obtain githash= and gitbranch=
|
||||
info and include related preprocessor #defines in date.h file.
|
||||
|
||||
-p Generate pm.h
|
||||
|
||||
-q Generate the rumors file.
|
||||
-r Generate the rumors file.
|
||||
|
||||
-s Generate the bogusmon , engrave and epitaphfiles.
|
||||
|
||||
-s Generate the bogusmon , engrave and epitaphfiles.
|
||||
|
||||
@@ -144,4 +148,5 @@ COPYRIGHT
|
||||
|
||||
|
||||
|
||||
|
||||
NETHACK 1 Jan 2020 MAKEDEFS(6)
|
||||
|
||||
@@ -44,6 +44,22 @@
|
||||
/****************************************************************************/
|
||||
/* Version 3.6.x */
|
||||
|
||||
/* Patch 5, January 27, 2020
|
||||
*
|
||||
* fix accessing mons[-1] when trying to gate in a non-valid demon
|
||||
* fix accessing mons[-1] when monster figures out if a tin cures stoning
|
||||
* have string_for_opt() return empty_optstr on failure
|
||||
* ensure existing callers of string_for_opt() check return value before using it
|
||||
* fix potential buffer overflow in add_menu_coloring()0
|
||||
* fix potential buffer overflow in sym_val()
|
||||
* fix potential buffer overflow in pline(), raw_printf(), and config_error_add()
|
||||
* fix potential buffer overflow in choose_windows()
|
||||
* use vsnprintf instead of vsprintf in pline.c where possible
|
||||
* Windows: incldues a fix from a 3.6.4 post-release update where
|
||||
* OPTIONS=map_mode:fit_to_screen could cause a game start failure
|
||||
* Windows: users with C-locale unmappable names could get game start failure
|
||||
*/
|
||||
|
||||
/* Patch 4, December 18, 2019
|
||||
*
|
||||
* fix potential buffer overflow when parsing run-time configuration file
|
||||
|
||||
@@ -168,6 +168,11 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then
|
||||
|
||||
#define FCMASK 0660 /* file creation mask */
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
#define NO_VSNPRINTF /* Avoid vsnprintf, use less-safe vsprintf instead. */
|
||||
|
||||
/*
|
||||
* The remainder of the file should not need to be changed.
|
||||
*/
|
||||
|
||||
2
src/.gitignore
vendored
2
src/.gitignore
vendored
@@ -11,5 +11,5 @@ tiles.bmp
|
||||
graphicschk
|
||||
nhdat
|
||||
o
|
||||
nhdat370
|
||||
nhdat*
|
||||
|
||||
|
||||
@@ -610,7 +610,11 @@ VA_DECL(const char *, str)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
|
||||
#if !defined(NO_VSNPRINTF)
|
||||
(void) vsnprintf(buf, sizeof buf, str, VA_ARGS);
|
||||
#else
|
||||
Vsprintf(buf, str, VA_ARGS);
|
||||
#endif
|
||||
raw_print(buf);
|
||||
paniclog("panic", buf);
|
||||
}
|
||||
|
||||
232
src/options.c
232
src/options.c
@@ -42,6 +42,8 @@ enum window_option_types {
|
||||
|
||||
#define PILE_LIMIT_DFLT 5
|
||||
|
||||
static char empty_optstr[] = { '\0' };
|
||||
|
||||
/*
|
||||
* NOTE: If you add (or delete) an option, please update the short
|
||||
* options help (option_help()), the long options help (dat/opthelp),
|
||||
@@ -927,8 +929,8 @@ int maxlen;
|
||||
*/
|
||||
static void
|
||||
escapes(cp, tp)
|
||||
const char *cp;
|
||||
char *tp;
|
||||
const char *cp; /* might be 'tp', updating in place */
|
||||
char *tp; /* result is never longer than 'cp' */
|
||||
{
|
||||
static NEARDATA const char oct[] = "01234567", dec[] = "0123456789",
|
||||
hex[] = "00112233445566778899aAbBcCdDeEfF";
|
||||
@@ -1044,7 +1046,7 @@ boolean val_optional;
|
||||
if (!colon || !*++colon) {
|
||||
if (!val_optional)
|
||||
config_error_add("Missing parameter for '%s'", opts);
|
||||
return (char *) 0;
|
||||
return empty_optstr;
|
||||
}
|
||||
return colon;
|
||||
}
|
||||
@@ -1057,7 +1059,7 @@ boolean val_optional;
|
||||
{
|
||||
if (!g.opt_initial) {
|
||||
rejectoption(optname);
|
||||
return (char *) 0;
|
||||
return empty_optstr;
|
||||
}
|
||||
return string_for_opt(opts, val_optional);
|
||||
}
|
||||
@@ -1136,7 +1138,7 @@ const char *optype;
|
||||
uchar translate[WARNCOUNT];
|
||||
int length, i;
|
||||
|
||||
if (!(opts = string_for_env_opt(optype, opts, FALSE)))
|
||||
if ((opts = string_for_env_opt(optype, opts, FALSE)) == empty_optstr)
|
||||
return FALSE;
|
||||
escapes(opts, opts);
|
||||
|
||||
@@ -1806,15 +1808,16 @@ int c, a;
|
||||
/* parse '"regex_string"=color&attr' and add it to menucoloring */
|
||||
boolean
|
||||
add_menu_coloring(tmpstr)
|
||||
char *tmpstr;
|
||||
char *tmpstr; /* never Null but could be empty */
|
||||
{
|
||||
int c = NO_COLOR, a = ATR_NONE;
|
||||
char *tmps, *cs, *amp;
|
||||
char str[BUFSZ];
|
||||
|
||||
Sprintf(str, "%s", tmpstr);
|
||||
(void) strncpy(str, tmpstr, sizeof str - 1);
|
||||
str[sizeof str - 1] = '\0';
|
||||
|
||||
if (!tmpstr || (cs = index(str, '=')) == 0) {
|
||||
if ((cs = index(str, '=')) == 0) {
|
||||
config_error_add("Malformed MENUCOLOR");
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1928,7 +1931,8 @@ char **opp;
|
||||
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
boolean val_negated = FALSE;
|
||||
|
||||
while ((*op == '!') || !strncmpi(op, "no", 2)) {
|
||||
@@ -2125,7 +2129,8 @@ boolean tinitial, tfrom_file;
|
||||
if (match_optname(opts, fullname, 3, TRUE)) {
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if ((op = string_for_env_opt(fullname, opts, negated)) != 0) {
|
||||
if ((op = string_for_env_opt(fullname, opts, negated))
|
||||
!= empty_optstr) {
|
||||
if (negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
return FALSE;
|
||||
@@ -2167,7 +2172,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
nmcpy(g.catname, op, PL_PSIZ);
|
||||
} else
|
||||
return FALSE;
|
||||
@@ -2182,7 +2188,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
nmcpy(g.dogname, op, PL_PSIZ);
|
||||
} else
|
||||
return FALSE;
|
||||
@@ -2197,7 +2204,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
nmcpy(g.horsename, op, PL_PSIZ);
|
||||
} else
|
||||
return FALSE;
|
||||
@@ -2212,7 +2220,7 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, (compat || !g.opt_initial));
|
||||
if (!op) {
|
||||
if (op == empty_optstr) {
|
||||
if (compat || negated || g.opt_initial) {
|
||||
/* for backwards compatibility, "mouse_support" without a
|
||||
value is a synonym for mouse_support:1 */
|
||||
@@ -2241,7 +2249,7 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, (compat || !g.opt_initial));
|
||||
if (!op) {
|
||||
if (op == empty_optstr) {
|
||||
if (compat || negated || g.opt_initial) {
|
||||
/* for backwards compatibility, "number_pad" without a
|
||||
value is a synonym for number_pad:1 */
|
||||
@@ -2284,7 +2292,7 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
g.symset[ROGUESET].name = dupstr(op);
|
||||
if (!read_sym_file(ROGUESET)) {
|
||||
clear_symsetentry(ROGUESET, TRUE);
|
||||
@@ -2309,7 +2317,7 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
g.symset[PRIMARY].name = dupstr(op);
|
||||
if (!read_sym_file(PRIMARY)) {
|
||||
clear_symsetentry(PRIMARY, TRUE);
|
||||
@@ -2332,7 +2340,7 @@ boolean tinitial, tfrom_file;
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (negated) {
|
||||
flags.runmode = RUN_TPORT;
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
if (!strncmpi(op, "teleport", strlen(op)))
|
||||
flags.runmode = RUN_TPORT;
|
||||
else if (!strncmpi(op, "run", strlen(op)))
|
||||
@@ -2356,7 +2364,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
if (!add_menu_coloring(op))
|
||||
return FALSE;
|
||||
} else
|
||||
@@ -2387,7 +2396,8 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_env_opt(fullname, opts, negated);
|
||||
if ((negated && !op) || (!negated && op)) {
|
||||
if ((negated && op == empty_optstr)
|
||||
|| (!negated && op != empty_optstr)) {
|
||||
iflags.msg_history = negated ? 0 : atoi(op);
|
||||
} else if (negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
@@ -2405,7 +2415,7 @@ boolean tinitial, tfrom_file;
|
||||
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (!(op = string_for_opt(opts, TRUE))) {
|
||||
if ((op = string_for_opt(opts, TRUE)) == empty_optstr) {
|
||||
tmp = negated ? 's' : 'f';
|
||||
} else {
|
||||
if (negated) {
|
||||
@@ -2474,7 +2484,7 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (opttype > 0 && !negated
|
||||
&& (op = string_for_opt(opts, FALSE)) != 0) {
|
||||
&& (op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
switch (opttype) {
|
||||
case MAP_OPTION:
|
||||
iflags.wc_fontsiz_map = atoi(op);
|
||||
@@ -2498,7 +2508,8 @@ boolean tinitial, tfrom_file;
|
||||
config_error_add("Unknown %s parameter '%s'", fullname, opts);
|
||||
return FALSE;
|
||||
}
|
||||
if (opttype > 0 && (op = string_for_opt(opts, FALSE)) != 0) {
|
||||
if (opttype > 0
|
||||
&& (op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
wc_set_font_name(opttype, op);
|
||||
#ifdef MAC
|
||||
set_font_name(opttype, op);
|
||||
@@ -2543,12 +2554,12 @@ boolean tinitial, tfrom_file;
|
||||
}
|
||||
#ifdef WIN32
|
||||
op = string_for_opt(opts, TRUE);
|
||||
if (!alternative_palette(op)) {
|
||||
if (op == empty_optstr || !alternative_palette(op)) {
|
||||
config_error_add("Error in palette parameter '%s'", op);
|
||||
return FALSE;
|
||||
}
|
||||
#else
|
||||
if ((op = string_for_opt(opts, FALSE)) != (char *) 0) {
|
||||
if ((op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
char *pt = op;
|
||||
int cnt, tmp, reverse;
|
||||
long rgb;
|
||||
@@ -2598,22 +2609,21 @@ boolean tinitial, tfrom_file;
|
||||
|
||||
if (match_optname(opts, "fruit", 2, TRUE)) {
|
||||
struct fruit *forig = 0;
|
||||
char empty_str = '\0';
|
||||
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated || !g.opt_initial);
|
||||
if (negated) {
|
||||
if (op) {
|
||||
if (op != empty_optstr) {
|
||||
bad_negation("fruit", TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
op = &empty_str;
|
||||
op = empty_optstr;
|
||||
goto goodfruit;
|
||||
}
|
||||
if (!op)
|
||||
if (op == empty_optstr)
|
||||
return FALSE;
|
||||
/* stripped leading and trailing spaces, condensed internal ones in 3.6.2 */
|
||||
/* strip leading/trailing spaces, condense internal ones (3.6.2) */
|
||||
mungspaces(op);
|
||||
if (!g.opt_initial) {
|
||||
struct fruit *f;
|
||||
@@ -2662,7 +2672,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
iflags.getpos_coords = GPCOORDS_NONE;
|
||||
return retval;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
static char gpcoords[] = { GPCOORDS_NONE, GPCOORDS_COMPASS,
|
||||
GPCOORDS_COMFULL, GPCOORDS_MAP,
|
||||
GPCOORDS_SCREEN, '\0' };
|
||||
@@ -2686,7 +2697,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
iflags.getloc_filter = GFILTER_NONE;
|
||||
return retval;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
char c = lowc(*op);
|
||||
|
||||
switch (c) {
|
||||
@@ -2732,9 +2744,10 @@ boolean tinitial, tfrom_file;
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
/* if (!(opts = string_for_env_opt(fullname, opts, FALSE)))
|
||||
/* if ((opts = string_for_env_opt(fullname, opts, FALSE))
|
||||
== empty_optstr)
|
||||
*/
|
||||
if (!(opts = string_for_opt(opts, FALSE)))
|
||||
if ((opts = string_for_opt(opts, FALSE)) == empty_optstr)
|
||||
return FALSE;
|
||||
escapes(opts, opts);
|
||||
/* note: dummy monclass #0 has symbol value '\0'; we allow that--
|
||||
@@ -2783,7 +2796,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
nmcpy(g.plname, op, PL_NSIZ);
|
||||
} else
|
||||
return FALSE;
|
||||
@@ -2798,7 +2812,7 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_opt(opts, negated)) != 0) {
|
||||
} else if ((op = string_for_opt(opts, negated)) != empty_optstr) {
|
||||
#if defined(WIN32) && defined(TTY_GRAPHICS)
|
||||
set_altkeyhandler(op);
|
||||
#endif
|
||||
@@ -2812,7 +2826,7 @@ boolean tinitial, tfrom_file;
|
||||
fullname = "align_status";
|
||||
if (match_optname(opts, fullname, sizeof "align_status" - 1, TRUE)) {
|
||||
op = string_for_opt(opts, negated);
|
||||
if (op && !negated) {
|
||||
if ((op != empty_optstr) && !negated) {
|
||||
if (!strncmpi(op, "left", sizeof "left" - 1))
|
||||
iflags.wc_align_status = ALIGN_LEFT;
|
||||
else if (!strncmpi(op, "top", sizeof "top" - 1))
|
||||
@@ -2839,7 +2853,7 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if (op && !negated) {
|
||||
if ((op != empty_optstr) && !negated) {
|
||||
if (!strncmpi(op, "left", sizeof "left" - 1))
|
||||
iflags.wc_align_message = ALIGN_LEFT;
|
||||
else if (!strncmpi(op, "top", sizeof "top" - 1))
|
||||
@@ -2867,7 +2881,7 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if (!(op = string_for_opt(opts, FALSE)))
|
||||
} else if ((op = string_for_opt(opts, FALSE)) == empty_optstr)
|
||||
return FALSE;
|
||||
|
||||
if (!change_inv_order(op))
|
||||
@@ -2886,7 +2900,7 @@ boolean tinitial, tfrom_file;
|
||||
flags.paranoia_bits = 0; /* clear all */
|
||||
if (negated) {
|
||||
flags.paranoia_bits = 0; /* [now redundant...] */
|
||||
} else if ((op = string_for_opt(opts, TRUE)) != 0) {
|
||||
} else if ((op = string_for_opt(opts, TRUE)) != empty_optstr) {
|
||||
char *pp, buf[BUFSZ];
|
||||
|
||||
strncpy(buf, op, sizeof buf - 1);
|
||||
@@ -2952,7 +2966,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
switch (lowc(*op)) {
|
||||
case 'u': /* Unencumbered */
|
||||
flags.pickup_burden = UNENCUMBERED;
|
||||
@@ -2995,7 +3010,7 @@ boolean tinitial, tfrom_file;
|
||||
oc_to_str(flags.pickup_types, tbuf);
|
||||
flags.pickup_types[0] = '\0'; /* all */
|
||||
op = string_for_opt(opts, (compat || !g.opt_initial));
|
||||
if (!op) {
|
||||
if (op == empty_optstr) {
|
||||
if (compat || negated || g.opt_initial) {
|
||||
/* for backwards compatibility, "pickup" without a
|
||||
value is a synonym for autopickup of all types
|
||||
@@ -3067,12 +3082,13 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if ((negated && !op) || (!negated && op))
|
||||
if ((negated && op == empty_optstr)
|
||||
|| (!negated && op != empty_optstr))
|
||||
flags.pile_limit = negated ? 0 : atoi(op);
|
||||
else if (negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
return FALSE;
|
||||
} else /* !op */
|
||||
} else /* op == empty_optstr */
|
||||
flags.pile_limit = PILE_LIMIT_DFLT;
|
||||
/* sanity check */
|
||||
if (flags.pile_limit < 0)
|
||||
@@ -3090,7 +3106,7 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate || negated)
|
||||
return FALSE;
|
||||
op = string_for_opt(opts, FALSE);
|
||||
if (!op)
|
||||
if (op == empty_optstr)
|
||||
return FALSE;
|
||||
if (!strncmpi(op, "normal", 6) || !strcmpi(op, "play")) {
|
||||
wizard = discover = FALSE;
|
||||
@@ -3113,7 +3129,7 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if (op && !negated) {
|
||||
if (op != empty_optstr && !negated) {
|
||||
if (!strncmpi(op, "dialog", sizeof "dialog" - 1)) {
|
||||
iflags.wc_player_selection = VIA_DIALOG;
|
||||
} else if (!strncmpi(op, "prompt", sizeof "prompt" - 1)) {
|
||||
@@ -3160,14 +3176,15 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, TRUE);
|
||||
if (op && negated) {
|
||||
if (op != empty_optstr && negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
/* "disclose" without a value means "all with prompting"
|
||||
and negated means "none without prompting" */
|
||||
if (!op || !strcmpi(op, "all") || !strcmpi(op, "none")) {
|
||||
if (op && !strcmpi(op, "none"))
|
||||
if (op == empty_optstr
|
||||
|| !strcmpi(op, "all") || !strcmpi(op, "none")) {
|
||||
if (op != empty_optstr && !strcmpi(op, "none"))
|
||||
negated = TRUE;
|
||||
for (num = 0; num < NUM_DISCLOSURE_OPTIONS; num++)
|
||||
flags.end_disclose[num] = negated
|
||||
@@ -3232,7 +3249,7 @@ boolean tinitial, tfrom_file;
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
if (!(op = string_for_opt(opts, FALSE)))
|
||||
if ((op = string_for_opt(opts, FALSE)) == empty_optstr)
|
||||
return FALSE;
|
||||
|
||||
while (*op) {
|
||||
@@ -3281,7 +3298,7 @@ boolean tinitial, tfrom_file;
|
||||
fullname = "sortloot";
|
||||
if (match_optname(opts, fullname, 4, TRUE)) {
|
||||
op = string_for_env_opt(fullname, opts, FALSE);
|
||||
if (op) {
|
||||
if (op != empty_optstr) {
|
||||
char c = lowc(*op);
|
||||
|
||||
switch (c) {
|
||||
@@ -3307,7 +3324,7 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if (op)
|
||||
} else if (op != empty_optstr)
|
||||
(void) feature_alert_opts(op, fullname);
|
||||
return retval;
|
||||
}
|
||||
@@ -3322,7 +3339,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if (!(opts = string_for_env_opt(fullname, opts, FALSE))) {
|
||||
} else if ((opts = string_for_env_opt(fullname, opts, FALSE))
|
||||
== empty_optstr) {
|
||||
return FALSE;
|
||||
}
|
||||
if (!assign_videocolors(opts)) {
|
||||
@@ -3339,7 +3357,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if (!(opts = string_for_env_opt(fullname, opts, FALSE))) {
|
||||
} else if ((opts = string_for_env_opt(fullname, opts, FALSE))
|
||||
== empty_optstr) {
|
||||
return FALSE;
|
||||
}
|
||||
if (!assign_videoshades(opts)) {
|
||||
@@ -3383,7 +3402,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if (!(opts = string_for_env_opt(fullname, opts, FALSE))) {
|
||||
} else if ((opts = string_for_env_opt(fullname, opts, FALSE))
|
||||
== empty_optstr) {
|
||||
return FALSE;
|
||||
}
|
||||
if (!assign_video(opts)) {
|
||||
@@ -3393,6 +3413,11 @@ boolean tinitial, tfrom_file;
|
||||
return retval;
|
||||
}
|
||||
#endif /* NO_TERMS */
|
||||
} else if ((opts = string_for_env_opt(fullname, opts, FALSE))
|
||||
== empty_optstr) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif /* MSDOS */
|
||||
|
||||
/* WINCAP
|
||||
@@ -3406,7 +3431,7 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if (op && !negated) {
|
||||
if (op != empty_optstr && !negated) {
|
||||
if (!strcmpi(op, "tiles"))
|
||||
iflags.wc_map_mode = MAP_MODE_TILES;
|
||||
else if (!strncmpi(op, "ascii4x6", sizeof "ascii4x6" - 1))
|
||||
@@ -3454,7 +3479,8 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if ((negated && !op) || (!negated && op)) {
|
||||
if ((negated && op == empty_optstr)
|
||||
|| (!negated && op != empty_optstr)) {
|
||||
iflags.wc_scroll_amount = negated ? 1 : atoi(op);
|
||||
} else if (negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
@@ -3470,7 +3496,8 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if ((negated && !op) || (!negated && op)) {
|
||||
if ((negated && op == empty_optstr)
|
||||
|| (!negated && op != empty_optstr)) {
|
||||
iflags.wc_scroll_margin = negated ? 5 : atoi(op);
|
||||
} else if (negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
@@ -3488,7 +3515,7 @@ boolean tinitial, tfrom_file;
|
||||
#if defined(WIN32)
|
||||
} else {
|
||||
op = string_for_opt(opts, 0);
|
||||
if (!op)
|
||||
if (op == empty_optstr)
|
||||
return FALSE;
|
||||
#ifdef TTY_GRAPHICS
|
||||
map_subkeyvalue(op);
|
||||
@@ -3505,7 +3532,8 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if ((negated && !op) || (!negated && op)) {
|
||||
if ((negated && op == empty_optstr)
|
||||
|| (!negated && op != empty_optstr)) {
|
||||
iflags.wc_tile_width = negated ? 0 : atoi(op);
|
||||
} else if (negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
@@ -3519,7 +3547,7 @@ boolean tinitial, tfrom_file;
|
||||
if (match_optname(opts, fullname, sizeof "tile_file" - 1, TRUE)) {
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
if ((op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
if (iflags.wc_tile_file)
|
||||
free(iflags.wc_tile_file);
|
||||
iflags.wc_tile_file = dupstr(op);
|
||||
@@ -3534,7 +3562,8 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if ((negated && !op) || (!negated && op)) {
|
||||
if ((negated && op == empty_optstr)
|
||||
|| (!negated && op != empty_optstr)) {
|
||||
iflags.wc_tile_height = negated ? 0 : atoi(op);
|
||||
} else if (negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
@@ -3550,7 +3579,8 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, negated);
|
||||
if ((negated && !op) || (!negated && op)) {
|
||||
if ((negated && op == empty_optstr)
|
||||
|| (!negated && op != empty_optstr)) {
|
||||
iflags.wc_vary_msgcount = negated ? 0 : atoi(op);
|
||||
} else if (negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
@@ -3581,7 +3611,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
if (!iflags.windowtype_deferred) {
|
||||
char buf[WINTYPELEN];
|
||||
|
||||
@@ -3601,7 +3632,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE))
|
||||
!= empty_optstr) {
|
||||
char buf[WINTYPELEN];
|
||||
|
||||
nmcpy(buf, op, WINTYPELEN);
|
||||
@@ -3620,7 +3652,7 @@ boolean tinitial, tfrom_file;
|
||||
if (match_optname(opts, fullname, 7, TRUE)) {
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
if ((op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
if (!wc_set_window_colors(op)) {
|
||||
config_error_add("Could not set %s '%s'", fullname, op);
|
||||
return FALSE;
|
||||
@@ -3643,22 +3675,23 @@ boolean tinitial, tfrom_file;
|
||||
|| (fullname = "term_rows", match_optname(opts, fullname, 8, TRUE))) {
|
||||
long ltmp;
|
||||
|
||||
op = string_for_opt(opts, negated);
|
||||
ltmp = atol(op);
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
retval = FALSE;
|
||||
if ((op = string_for_opt(opts, negated)) != empty_optstr) {
|
||||
ltmp = atol(op);
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
retval = FALSE;
|
||||
|
||||
/* this just checks atol() sanity, not logical window size sanity */
|
||||
} else if (ltmp <= 0L || ltmp >= (long) LARGEST_INT) {
|
||||
config_error_add("Invalid %s: %ld", fullname, ltmp);
|
||||
retval = FALSE;
|
||||
/* just checks atol() sanity, not logical window size sanity */
|
||||
} else if (ltmp <= 0L || ltmp >= (long) LARGEST_INT) {
|
||||
config_error_add("Invalid %s: %ld", fullname, ltmp);
|
||||
retval = FALSE;
|
||||
|
||||
} else {
|
||||
if (!strcmp(fullname, "term_rows"))
|
||||
iflags.wc2_term_rows = (int) ltmp;
|
||||
else /* !strcmp(fullname, "term_cols") */
|
||||
iflags.wc2_term_cols = (int) ltmp;
|
||||
} else {
|
||||
if (!strcmp(fullname, "term_rows"))
|
||||
iflags.wc2_term_rows = (int) ltmp;
|
||||
else /* !strcmp(fullname, "term_cols") */
|
||||
iflags.wc2_term_cols = (int) ltmp;
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
@@ -3668,10 +3701,10 @@ boolean tinitial, tfrom_file;
|
||||
fullname = "petattr";
|
||||
if (match_optname(opts, fullname, sizeof "petattr" - 1, TRUE)) {
|
||||
op = string_for_opt(opts, negated);
|
||||
if (op && negated) {
|
||||
if (op != empty_optstr && negated) {
|
||||
bad_negation(fullname, TRUE);
|
||||
retval = FALSE;
|
||||
} else if (op) {
|
||||
} else if (op != empty_optstr) {
|
||||
#ifdef CURSES_GRAPHICS
|
||||
int itmp = curses_read_attrs(op);
|
||||
|
||||
@@ -3702,7 +3735,7 @@ boolean tinitial, tfrom_file;
|
||||
fullname = "windowborders";
|
||||
if (match_optname(opts, fullname, 10, TRUE)) {
|
||||
op = string_for_opt(opts, negated);
|
||||
if (negated && op) {
|
||||
if (negated && op != empty_optstr) {
|
||||
bad_negation(fullname, TRUE);
|
||||
retval = FALSE;
|
||||
} else {
|
||||
@@ -3710,7 +3743,7 @@ boolean tinitial, tfrom_file;
|
||||
|
||||
if (negated)
|
||||
itmp = 0; /* Off */
|
||||
else if (!op)
|
||||
else if (op == empty_optstr)
|
||||
itmp = 1; /* On */
|
||||
else /* Value supplied; expect 0 (off), 1 (on), or 2 (auto) */
|
||||
itmp = atoi(op);
|
||||
@@ -3738,7 +3771,7 @@ boolean tinitial, tfrom_file;
|
||||
bad_negation(fullname, TRUE);
|
||||
itmp = 2;
|
||||
retval = FALSE;
|
||||
} else if (op) {
|
||||
} else if (op != empty_optstr) {
|
||||
itmp = atoi(op);
|
||||
}
|
||||
if (itmp < 2 || itmp > 3) {
|
||||
@@ -3760,7 +3793,7 @@ boolean tinitial, tfrom_file;
|
||||
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
if (!(op = string_for_opt(opts, !val_required))) {
|
||||
if ((op = string_for_opt(opts, !val_required)) == empty_optstr) {
|
||||
if (val_required)
|
||||
return FALSE; /* string_for_opt gave feedback */
|
||||
tmp = negated ? 'n' : 'f';
|
||||
@@ -3801,7 +3834,8 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if (!(opts = string_for_env_opt(fullname, opts, FALSE))) {
|
||||
} else if ((opts = string_for_env_opt(fullname, opts, FALSE))
|
||||
== empty_optstr) {
|
||||
return FALSE;
|
||||
}
|
||||
tmpattr = match_str2attr(opts, TRUE);
|
||||
@@ -3821,7 +3855,7 @@ boolean tinitial, tfrom_file;
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
} else if ((op = string_for_opt(opts, FALSE)) != empty_optstr) {
|
||||
char c, op_buf[BUFSZ];
|
||||
|
||||
escapes(op, op_buf);
|
||||
@@ -3843,10 +3877,10 @@ boolean tinitial, tfrom_file;
|
||||
if (duplicate)
|
||||
complain_about_duplicate(opts, 1);
|
||||
op = string_for_opt(opts, TRUE);
|
||||
if (op && negated) {
|
||||
if (op != empty_optstr && negated) {
|
||||
clear_status_hilites();
|
||||
return retval;
|
||||
} else if (!op) {
|
||||
} else if (op == empty_optstr) {
|
||||
config_error_add("Value is mandatory for hilite_status");
|
||||
return FALSE;
|
||||
}
|
||||
@@ -3867,7 +3901,7 @@ boolean tinitial, tfrom_file;
|
||||
iflags.hilite_delta = 0L;
|
||||
} else {
|
||||
op = string_for_opt(opts, TRUE);
|
||||
iflags.hilite_delta = (!op || !*op) ? 3L : atol(op);
|
||||
iflags.hilite_delta = (op == empty_optstr || !*op) ? 3L : atol(op);
|
||||
if (iflags.hilite_delta < 0L)
|
||||
iflags.hilite_delta = 1L;
|
||||
}
|
||||
@@ -4015,7 +4049,7 @@ boolean tinitial, tfrom_file;
|
||||
}
|
||||
|
||||
op = string_for_opt(opts, TRUE);
|
||||
if (op) {
|
||||
if (op != empty_optstr) {
|
||||
if (negated) {
|
||||
config_error_add(
|
||||
"Negated boolean '%s' should not have a parameter",
|
||||
@@ -6129,9 +6163,9 @@ char *buf;
|
||||
|
||||
int
|
||||
sym_val(strval)
|
||||
const char *strval;
|
||||
const char *strval; /* up to 4*BUFSZ-1 long; only first few chars matter */
|
||||
{
|
||||
char buf[QBUFSZ];
|
||||
char buf[QBUFSZ], tmp[QBUFSZ]; /* to hold trucated copy of 'strval' */
|
||||
|
||||
buf[0] = '\0';
|
||||
if (!strval[0] || !strval[1]) { /* empty, or single character */
|
||||
@@ -6152,8 +6186,9 @@ const char *strval;
|
||||
/* not simple quote or basic backslash;
|
||||
strip closing quote and let escapes() deal with it */
|
||||
} else {
|
||||
char *p, tmp[QBUFSZ];
|
||||
char *p;
|
||||
|
||||
/* +1: skip opening single quote */
|
||||
(void) strncpy(tmp, strval + 1, sizeof tmp - 1);
|
||||
tmp[sizeof tmp - 1] = '\0';
|
||||
if ((p = rindex(tmp, '\'')) != 0) {
|
||||
@@ -6161,8 +6196,11 @@ const char *strval;
|
||||
escapes(tmp, buf);
|
||||
} /* else buf[0] stays '\0' */
|
||||
}
|
||||
} else /* not lone char nor single quote */
|
||||
escapes(strval, buf);
|
||||
} else { /* not lone char nor single quote */
|
||||
(void) strncpy(tmp, strval, sizeof tmp - 1);
|
||||
tmp[sizeof tmp - 1] = '\0';
|
||||
escapes(tmp, buf);
|
||||
}
|
||||
|
||||
return (int) *buf;
|
||||
}
|
||||
|
||||
47
src/pline.c
47
src/pline.c
@@ -6,6 +6,10 @@
|
||||
#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */
|
||||
#include "hack.h"
|
||||
|
||||
#define BIGBUFSZ (5 * BUFSZ) /* big enough to format a 4*BUFSZ string (from
|
||||
* config file parsing) with modest decoration;
|
||||
* result will then be truncated to BUFSZ-1 */
|
||||
|
||||
static void FDECL(putmesg, (const char *));
|
||||
static char *FDECL(You_buf, (int));
|
||||
#if defined(MSGHANDLER) && (defined(POSIX_TYPES) || defined(__GNUC__))
|
||||
@@ -114,9 +118,12 @@ VA_DECL(const char *, line)
|
||||
#endif /* USE_STDARG | USE_VARARG */
|
||||
{ /* start of vpline() or of nested block in USE_OLDARG's pline() */
|
||||
static int in_pline = 0;
|
||||
char pbuf[3 * BUFSZ];
|
||||
char pbuf[BIGBUFSZ]; /* will get chopped down to BUFSZ-1 if longer */
|
||||
int ln;
|
||||
int msgtyp;
|
||||
#if !defined(NO_VSNPRINTF)
|
||||
int vlen = 0;
|
||||
#endif
|
||||
boolean no_repeat;
|
||||
/* Do NOT use VA_START and VA_END in here... see above */
|
||||
|
||||
@@ -130,7 +137,16 @@ VA_DECL(const char *, line)
|
||||
return;
|
||||
|
||||
if (index(line, '%')) {
|
||||
#if !defined(NO_VSNPRINTF)
|
||||
vlen = vsnprintf(pbuf, sizeof pbuf, line, VA_ARGS);
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) && defined(DEBUG)
|
||||
if (vlen >= (int) sizeof pbuf)
|
||||
panic("%s: truncation of buffer at %zu of %d bytes",
|
||||
"pline", sizeof pbuf, vlen);
|
||||
#endif
|
||||
#else
|
||||
Vsprintf(pbuf, line, VA_ARGS);
|
||||
#endif
|
||||
line = pbuf;
|
||||
}
|
||||
if ((ln = (int) strlen(line)) > BUFSZ - 1) {
|
||||
@@ -435,15 +451,18 @@ void raw_printf
|
||||
VA_DECL(const char *, line)
|
||||
#endif
|
||||
{
|
||||
char pbuf[3 * BUFSZ];
|
||||
int ln;
|
||||
char pbuf[BIGBUFSZ]; /* will be chopped down to BUFSZ-1 if longer */
|
||||
/* Do NOT use VA_START and VA_END in here... see above */
|
||||
|
||||
if (index(line, '%')) {
|
||||
#if !defined(NO_VSNPRINTF)
|
||||
(void) vsnprintf(pbuf, sizeof pbuf, line, VA_ARGS);
|
||||
#else
|
||||
Vsprintf(pbuf, line, VA_ARGS);
|
||||
#endif
|
||||
line = pbuf;
|
||||
}
|
||||
if ((ln = (int) strlen(line)) > BUFSZ - 1) {
|
||||
if ((int) strlen(line) > BUFSZ - 1) {
|
||||
if (line != pbuf)
|
||||
line = strncpy(pbuf, line, BUFSZ - 1);
|
||||
/* unlike pline, we don't futz around to keep last few chars */
|
||||
@@ -462,7 +481,7 @@ VA_DECL(const char *, line)
|
||||
void impossible
|
||||
VA_DECL(const char *, s)
|
||||
{
|
||||
char pbuf[2 * BUFSZ];
|
||||
char pbuf[BIGBUFSZ]; /* will be chopped down to BUFSZ-1 if longer */
|
||||
|
||||
VA_START(s);
|
||||
VA_INIT(s, const char *);
|
||||
@@ -470,7 +489,11 @@ VA_DECL(const char *, s)
|
||||
panic("impossible called impossible");
|
||||
|
||||
g.program_state.in_impossible = 1;
|
||||
#if !defined(NO_VSNPRINTF)
|
||||
(void) vsnprintf(pbuf, sizeof pbuf, s, VA_ARGS);
|
||||
#else
|
||||
Vsprintf(pbuf, s, VA_ARGS);
|
||||
#endif
|
||||
pbuf[BUFSZ - 1] = '\0'; /* sanity */
|
||||
paniclog("impossible", pbuf);
|
||||
if (iflags.debug_fuzzer)
|
||||
@@ -567,9 +590,21 @@ config_error_add
|
||||
VA_DECL(const char *, str)
|
||||
#endif /* ?(USE_STDARG || USE_VARARG) */
|
||||
{ /* start of vconf...() or of nested block in USE_OLDARG's conf...() */
|
||||
char buf[2 * BUFSZ];
|
||||
#if !defined(NO_VSNPRINTF)
|
||||
int vlen = 0;
|
||||
#endif
|
||||
char buf[BIGBUFSZ]; /* will be chopped down to BUFSZ-1 if longer */
|
||||
|
||||
#if !defined(NO_VSNPRINTF)
|
||||
vlen = vsnprintf(buf, sizeof buf, str, VA_ARGS);
|
||||
#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) && defined(DEBUG)
|
||||
if (vlen >= (int) sizeof buf)
|
||||
panic("%s: truncation of buffer at %zu of %d bytes",
|
||||
"config_error_add", sizeof buf, vlen);
|
||||
#endif
|
||||
#else
|
||||
Vsprintf(buf, str, VA_ARGS);
|
||||
#endif
|
||||
buf[BUFSZ - 1] = '\0';
|
||||
config_erradd(buf);
|
||||
|
||||
|
||||
@@ -1036,6 +1036,7 @@ int uid;
|
||||
* print selected parts of score list.
|
||||
* argc >= 2, with argv[0] untrustworthy (directory names, et al.),
|
||||
* and argv[1] starting with "-s".
|
||||
* caveat: some shells might allow argv elements to be arbitrarily long.
|
||||
*/
|
||||
void
|
||||
prscore(argc, argv)
|
||||
|
||||
@@ -241,7 +241,8 @@ void
|
||||
choose_windows(s)
|
||||
const char *s;
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
char *tmps = 0;
|
||||
|
||||
for (i = 0; winchoices[i].procs; i++) {
|
||||
if ('+' == winchoices[i].procs->name[0])
|
||||
@@ -267,9 +268,22 @@ const char *s;
|
||||
windowprocs.win_wait_synch = def_wait_synch;
|
||||
|
||||
if (!winchoices[0].procs) {
|
||||
raw_printf("No window types?");
|
||||
raw_printf("No window types supported?");
|
||||
nh_terminate(EXIT_FAILURE);
|
||||
}
|
||||
/* 50: arbitrary, no real window_type names are anywhere near that long;
|
||||
used to prevent potential raw_printf() overflow if user supplies a
|
||||
very long string (on the order of 1200 chars) on the command line
|
||||
(config file options can't get that big; they're truncated at 1023) */
|
||||
#define WINDOW_TYPE_MAXLEN 50
|
||||
if (strlen(s) >= WINDOW_TYPE_MAXLEN) {
|
||||
tmps = (char *) alloc(WINDOW_TYPE_MAXLEN);
|
||||
(void) strncpy(tmps, s, WINDOW_TYPE_MAXLEN - 1);
|
||||
tmps[WINDOW_TYPE_MAXLEN - 1] = '\0';
|
||||
s = tmps;
|
||||
}
|
||||
#undef WINDOW_TYPE_MAXLEN
|
||||
|
||||
if (!winchoices[1].procs) {
|
||||
config_error_add(
|
||||
"Window type %s not recognized. The only choice is: %s",
|
||||
@@ -291,6 +305,8 @@ const char *s;
|
||||
config_error_add("Window type %s not recognized. Choices are: %s",
|
||||
s, buf);
|
||||
}
|
||||
if (tmps)
|
||||
free((genericptr_t) tmps) /*, tmps = 0*/ ;
|
||||
|
||||
if (windowprocs.win_raw_print == def_raw_print
|
||||
|| WINDOWPORT("safe-startup"))
|
||||
@@ -1154,7 +1170,7 @@ boolean fullsubs; /* True -> full substitution for file name, False ->
|
||||
else
|
||||
Strcpy(tmpbuf, "{current date+time}");
|
||||
break;
|
||||
case 'v': /* version, eg. "3.6.4-0" */
|
||||
case 'v': /* version, eg. "3.6.5-0" */
|
||||
Sprintf(tmpbuf, "%s", version_string(verbuf));
|
||||
break;
|
||||
case 'u': /* UID */
|
||||
|
||||
2
sys/amiga/.gitattributes
vendored
2
sys/amiga/.gitattributes
vendored
@@ -1,2 +1,2 @@
|
||||
*.p NHSUBST
|
||||
* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.4)
|
||||
* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.5)
|
||||
|
||||
2
sys/atari/.gitattributes
vendored
2
sys/atari/.gitattributes
vendored
@@ -1 +1 @@
|
||||
* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.4)
|
||||
* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.5)
|
||||
|
||||
2
sys/be/.gitattributes
vendored
2
sys/be/.gitattributes
vendored
@@ -1 +1 @@
|
||||
* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.4)
|
||||
* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.5)
|
||||
|
||||
2
sys/msdos/.gitattributes
vendored
2
sys/msdos/.gitattributes
vendored
@@ -4,6 +4,6 @@ Makefile.* NHSUBST
|
||||
Install.* NHSUBST
|
||||
moveinit.pat NH_header=no
|
||||
vesa.h NH_header=no
|
||||
* NH_filestag=(file%s_for_MSDOS_version_-_tested_for_3.6.4_via_partial_cross-compile_only)
|
||||
* NH_filestag=(file%s_for_MSDOS_version)
|
||||
nhico.uu NH_filestag=(file%s_for_running_MSDOS_binary_under_Windows)
|
||||
nhpif.uu NH_filestag=>nhico.uu
|
||||
|
||||
2
sys/os2/.gitattributes
vendored
2
sys/os2/.gitattributes
vendored
@@ -1,2 +1,2 @@
|
||||
Makefile.* NHSUBST
|
||||
* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.4)
|
||||
* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.5)
|
||||
|
||||
10
sys/share/.gitattributes
vendored
10
sys/share/.gitattributes
vendored
@@ -5,16 +5,16 @@ dgn_comp.h NH_header=no
|
||||
lev_comp.h NH_header=no
|
||||
Makefile.lib NH_header=no
|
||||
|
||||
Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.4)
|
||||
#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.4)
|
||||
Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.5)
|
||||
#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.5)
|
||||
termcap.uu NH_filestag=>Makefile.lib
|
||||
|
||||
pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.4)
|
||||
pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.5)
|
||||
|
||||
pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.4_via_partial_cross-compile_only)
|
||||
pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.5_via_partial_cross-compile_only)
|
||||
pcunix.c NH_filestag=>pcsys.c
|
||||
|
||||
NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.4)
|
||||
NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.5)
|
||||
pctty.c NH_filestag=>NetHack.cnf
|
||||
|
||||
ioctl.c NH_filestag=(file%s_for_UNIX_and_Be_versions)
|
||||
|
||||
@@ -123,8 +123,11 @@ spec_levs:
|
||||
quest_levs:
|
||||
touch quest_levs
|
||||
|
||||
spotless:
|
||||
-rm -f spec_levs quest_levs *.lev $(VARDAT)
|
||||
# gitinfo.txt is optionally made by src/Makefile when creating date.h
|
||||
clean:
|
||||
-rm -f gitinfo.txt
|
||||
|
||||
spotless: clean
|
||||
-rm -f nhdat x11tiles beostiles pet_mark.xbm pilemark.xbm rip.xpm mapbg.xpm
|
||||
-rm -f rip.img GEM_RSC.RSC title.img nh16.img NetHack.ad
|
||||
-rm -f nhsplash.xpm nhtiles.bmp
|
||||
|
||||
@@ -308,6 +308,7 @@ install: rootcheck $(GAME) recover $(VARDAT) spec_levs
|
||||
clean:
|
||||
( cd src ; $(MAKE) clean )
|
||||
( cd util ; $(MAKE) clean )
|
||||
( cd dat ; $(MAKE) clean )
|
||||
( cd doc ; $(MAKE) clean )
|
||||
( cd lib/lua-$(LUA_VERSION)/src && $(MAKE) clean )
|
||||
|
||||
|
||||
@@ -151,6 +151,14 @@
|
||||
54FCE8292223261F00F393C8 /* isaac64.c in Sources */ = {isa = PBXBuildFile; fileRef = 54FCE8282223261F00F393C8 /* isaac64.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
inputFiles = (
|
||||
);
|
||||
inputFiles = (
|
||||
);
|
||||
inputFiles = (
|
||||
);
|
||||
inputFiles = (
|
||||
);
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
316B91CA21A3BD7C00EC3E81 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
@@ -976,7 +984,7 @@
|
||||
3189576921A1FCC100FB2ABE /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1120;
|
||||
LastUpgradeCheck = 1130;
|
||||
ORGANIZATIONNAME = "Bart House";
|
||||
TargetAttributes = {
|
||||
3189577021A1FCC100FB2ABE = {
|
||||
@@ -1837,6 +1845,10 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
31B8A44F21A26A4B0055BD01 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
LastUpgradeVersion = "1130"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
LastUpgradeVersion = "1130"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1120"
|
||||
LastUpgradeVersion = "1130"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -26,8 +26,8 @@ home directory you might perform these steps.
|
||||
|
||||
If you have old record and logfile entries from a previous NetHack version,
|
||||
you might want to save copies before they get overwritten by the new empty
|
||||
files; old saved games and bones files from 3.6.0 through to 3.6.3 should
|
||||
work with 3.6.4 but even older saved games and bones files from 3.4.3 will
|
||||
files; old saved games and bones files from 3.6.0 through to 3.6.4 should
|
||||
work with 3.6.5 but even older saved games and bones files from 3.4.3 will
|
||||
not. If you are installing from the RPM, there is no need to save the old
|
||||
record and logfile; they are automatically preserved.
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ MAXPLAYERS=10
|
||||
# Only available if NetHack was compiled with DUMPLOG
|
||||
# Allows following placeholders:
|
||||
# %% literal '%'
|
||||
# %v version (eg. "3.6.4-0")
|
||||
# %v version (eg. "3.6.5-0")
|
||||
# %u game UID
|
||||
# %t game start time, UNIX timestamp format
|
||||
# %T current time, UNIX timestamp format
|
||||
|
||||
@@ -355,6 +355,7 @@ char *argv[];
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* caveat: argv elements might be arbitrary long */
|
||||
static void
|
||||
process_options(argc, argv)
|
||||
int argc;
|
||||
@@ -383,11 +384,10 @@ char *argv[];
|
||||
load_symset("DECGraphics", PRIMARY);
|
||||
switch_symbols(TRUE);
|
||||
} else {
|
||||
raw_printf("Unknown option: %s", *argv);
|
||||
raw_printf("Unknown option: %.60s", *argv);
|
||||
}
|
||||
break;
|
||||
case 'X':
|
||||
|
||||
discover = TRUE, wizard = FALSE;
|
||||
break;
|
||||
#ifdef NEWS
|
||||
@@ -413,7 +413,7 @@ char *argv[];
|
||||
load_symset("RogueIBM", ROGUESET);
|
||||
switch_symbols(TRUE);
|
||||
} else {
|
||||
raw_printf("Unknown option: %s", *argv);
|
||||
raw_printf("Unknown option: %.60s", *argv);
|
||||
}
|
||||
break;
|
||||
case 'p': /* profession (role) */
|
||||
@@ -451,7 +451,7 @@ char *argv[];
|
||||
flags.initrole = i;
|
||||
break;
|
||||
}
|
||||
/* else raw_printf("Unknown option: %s", *argv); */
|
||||
/* else raw_printf("Unknown option: %.60s", *argv); */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,11 +38,12 @@
|
||||
[.sys .os2] -- OS/2
|
||||
[.sys .share .sounds] -- AIFF format audio files
|
||||
[.sys .unix] -- guess :-)
|
||||
[.sys .unit .hints] -- configuration data for setup.sh
|
||||
[.sys .unix .hints] -- configuration data for setup.sh
|
||||
[.sys .wince] -- Windows CE
|
||||
[.sys .wince .ceinc] -- more WinCE
|
||||
[.sys .wince .ceinc .sys] -- ditto
|
||||
[.sys .winnt] -- Windows NT
|
||||
[.win .curses] - window routines for curses interface
|
||||
[.win .gem] -- window routines for Atari/GEM
|
||||
[.win .gnome] -- window routines for Unix/GNOME
|
||||
[.win .Qt] -- window routines for Qt
|
||||
@@ -150,7 +151,18 @@ Notes:
|
||||
work with 3.7.0. The scoreboard file (RECORD) from 3.6.x or 3.4.x or
|
||||
3.3.x will work.
|
||||
|
||||
2. To specify user-preference options in your environment, define the
|
||||
2. If pline.c fails to compile, edit vmsconf.h and uncomment
|
||||
#define NO_VSNPRINTF
|
||||
to avoid calling a C library routine that wasn't available on older
|
||||
versions of VMS. (Note: in the distributed sources, this has already
|
||||
been uncommented.)
|
||||
|
||||
3. vmsbuild.com includes commands to try to build the 'curses' interface
|
||||
but they won't work. That interface requires 'ncurses' or 'PDcurses',
|
||||
not the older 'curses' (neither the VMS-specific variation nor the
|
||||
BSD-derived one) included with the C run-time library.
|
||||
|
||||
4. To specify user-preference options in your environment, define the
|
||||
logical name NETHACKOPTIONS to have the value of a quoted string
|
||||
containing a comma separated list of option values. The option names
|
||||
are case-insensitive.
|
||||
@@ -183,7 +195,7 @@ Notes:
|
||||
placed in the playground directory by install.com. Also, an example
|
||||
configuration file can be found in [.win.X11]nethack.rc.)
|
||||
|
||||
3. [As mentioned above, the set of Makefiles is out of date so disregard
|
||||
5. [As mentioned above, the set of Makefiles is out of date so disregard
|
||||
this note....]
|
||||
Instead of using vmsbuild.com to compile and link everything, you can
|
||||
use the set of Makefiles found in the vms subdirectory, provided you
|
||||
@@ -224,7 +236,7 @@ Notes:
|
||||
[Note: Makefile.* have been updated occasionally but not exercised
|
||||
for a long time, so might not be in working order.]
|
||||
|
||||
4. termcap is an ASCII data file containing descriptions of terminal
|
||||
6. termcap is an ASCII data file containing descriptions of terminal
|
||||
capabilities and the escape sequences that software must use to take
|
||||
advantage of them. If you do not already have a termcap file in use
|
||||
on your system there is a small one in file [.SYS.SHARE]TERMCAP. It
|
||||
@@ -252,11 +264,11 @@ Notes:
|
||||
termcap file, otherwise a message about "Unknown terminal type" will
|
||||
be printed and NetHack will exit.
|
||||
|
||||
5. Both vmsbuild.com and Makefile.src have provisions to build nethack's
|
||||
7. Both vmsbuild.com and Makefile.src have provisions to build nethack's
|
||||
'curses' interface, but the source code for it won't compile using
|
||||
the implementation of curses which is supplied with VMS.
|
||||
|
||||
6. NetHack contains code which attempts to make it secure in case it's
|
||||
8. NetHack contains code which attempts to make it secure in case it's
|
||||
installed with privileges (to allow the playground to be protected
|
||||
against world write access). This has only undergone limited testing,
|
||||
so install NetHack with privileges at your own risk. If you discover
|
||||
@@ -309,7 +321,7 @@ Notes:
|
||||
built NetHack, you can relink with tracebacks disabled by doing
|
||||
$ @[.SYS.VMS]VMSBUILD "LINK" "" "" "/noTrace/noDebug"
|
||||
|
||||
7. If you can't or won't install nethack.exe with privileges and if you
|
||||
9. If you can't or won't install nethack.exe with privileges and if you
|
||||
don't have access to a privileged account yourself, then if you intend
|
||||
to allow other users to access your copy of NetHack you should probably
|
||||
place an ACL on the playground directory and its save subdirectory.
|
||||
@@ -342,7 +354,7 @@ Notes:
|
||||
you to run recover.exe on behalf of other users, because you won't be
|
||||
able to create files owned by them unless you have elevated privileges.
|
||||
|
||||
8. Many NetHack commands can be aborted by sending it the <escape>
|
||||
10. Many NetHack commands can be aborted by sending it the <escape>
|
||||
character when it wants input. This is displayed as ESC inside the
|
||||
game. Digital VK201 keyboards (used by VT2xx and VT3xx and older
|
||||
VAXstations) and VK401 keyboards (used by VT4xx, newer VAXstations,
|
||||
@@ -382,7 +394,7 @@ Notes:
|
||||
be sure to remember to eventually reattach to the NetHack subprocess;
|
||||
otherwise the game in progress won't get saved when you logout.
|
||||
|
||||
9. NetHack optionally maintains a logfile which receives one line appended
|
||||
11. NetHack optionally maintains a logfile which receives one line appended
|
||||
to it whenever a game ends. This can be disabled entirely by adding
|
||||
an "#undef LOGFILE" directive to vmsconf.h prior to building the
|
||||
program, or it can be disabled later by removing the file(s) LOGFILE.;*
|
||||
@@ -393,7 +405,7 @@ Notes:
|
||||
more elaborate log file named XLOGFILE containing more information is
|
||||
handled similarly.
|
||||
|
||||
10. Some attempt at support for VMS versions earlier than V4.6 has been
|
||||
12. Some attempt at support for VMS versions earlier than V4.6 has been
|
||||
included, but no such obsolete system was available for testing it.
|
||||
vmsbuild.com detects the need for the extra support routines and
|
||||
arranges automatically for them to be compiled. The reason that
|
||||
@@ -404,7 +416,7 @@ Notes:
|
||||
[That was written many years ago and the chance of it still working
|
||||
is very small.]
|
||||
|
||||
11. vmsbuild.com collects almost all of the object files (xxx.OBJ) into
|
||||
13. vmsbuild.com collects almost all of the object files (xxx.OBJ) into
|
||||
an object library (NETHACK.OLB) as it compiles the source files.
|
||||
This should prevent the quota-exceeded problems from the linker
|
||||
that some sites have reported for prior versions. Note that if you
|
||||
@@ -416,7 +428,7 @@ Notes:
|
||||
If you forget to replace the library entry, your newly compiled code
|
||||
will not be included in the new executable image.
|
||||
|
||||
12. To access "wizard mode"--intended for debugging purposes, not to
|
||||
14. To access "wizard mode"--intended for debugging purposes, not to
|
||||
spoil the game with unlimited wishes--you must be running from the
|
||||
username compiled into the game via Local_WIZARD in vmsconf.h, and
|
||||
you must specify "-D" on the command line when invoking NetHack.
|
||||
@@ -427,10 +439,10 @@ Notes:
|
||||
Any character name you specify will be ignored in favor of "wizard".
|
||||
|
||||
[More out of date information. Rather than compile-time Local_WIZARD,
|
||||
uses(s) allowed to entre wizard mode are now controlled by the entry
|
||||
users(s) allowed to entre wizard mode are now controlled by the entry
|
||||
WIZARDS in the file SYSCONF.]
|
||||
|
||||
13. At program startup time, NetHack uses the empty file PERM to prevent
|
||||
15. At program startup time, NetHack uses the empty file PERM to prevent
|
||||
two different processes from using the same character name (under the
|
||||
same UIC ownership) at the same time. It does this by temporarily
|
||||
giving that file a second directory entry named PERM.LOCK, then
|
||||
@@ -472,7 +484,7 @@ Notes:
|
||||
is accomplished using temporary entry RECORD.LOCK and LOGFILE using
|
||||
entry LOGFILE.LOCK.
|
||||
|
||||
14. Unless you have both Motif and the Athena Widget set from MIT, you
|
||||
16. Unless you have both Motif and the Athena Widget set from MIT, you
|
||||
will not be able to use the X11 interface on VMS. Even if you do
|
||||
have both those things, such a configuration has not been tested and
|
||||
there are no provisions for it in vmsbuild.com. Makefile.src does
|
||||
@@ -498,7 +510,7 @@ Notes:
|
||||
window manager in order for any changes to take effect; it's easiest
|
||||
to just make the session manager quit and then log in again.
|
||||
|
||||
15. If necessary, send problem reports via e-mail to
|
||||
17. If necessary, send problem reports via e-mail to
|
||||
<devteam@nethack.org>
|
||||
Always include version information for NetHack, the operating system,
|
||||
and the C compiler used.
|
||||
@@ -506,6 +518,7 @@ Notes:
|
||||
20-OCT-2003
|
||||
minimally updated 9-NOV-2015...
|
||||
and again 5-MAY-2019...
|
||||
and yet again 26-JAN-2020...
|
||||
|
||||
# NetHack 3.7 Install.vms $NHDT-Date: 1575245132 2019/12/02 00:05:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.16 $
|
||||
# Copyright (c) 2003 by Robert Patrick Rankin
|
||||
|
||||
2
sys/wince/.gitattributes
vendored
2
sys/wince/.gitattributes
vendored
@@ -1,4 +1,4 @@
|
||||
*.ce NHSUBST
|
||||
*.mak NHSUBST
|
||||
*.bat NHSUBST
|
||||
* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.4)
|
||||
* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.5)
|
||||
|
||||
2
sys/wince/ceinc/.gitattributes
vendored
2
sys/wince/ceinc/.gitattributes
vendored
@@ -1 +1 @@
|
||||
* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.4)
|
||||
* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.5)
|
||||
|
||||
@@ -284,8 +284,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,6,4,0
|
||||
PRODUCTVERSION 3,6,4,0
|
||||
FILEVERSION 3,6,5,0
|
||||
PRODUCTVERSION 3,6,5,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x9L
|
||||
@@ -300,17 +300,17 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "NetHack 3.6.4 for Windows CE\0"
|
||||
VALUE "Comments", "NetHack 3.6.5 for Windows CE\0"
|
||||
VALUE "CompanyName", " \0"
|
||||
VALUE "FileDescription", "nethackm\0"
|
||||
VALUE "FileVersion", "3, 6, 4, 0\0"
|
||||
VALUE "FileVersion", "3, 6, 5, 0\0"
|
||||
VALUE "InternalName", "nethackm\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1985-2019\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1985-2020\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "nethackm.exe\0"
|
||||
VALUE "PrivateBuild", "090914\0"
|
||||
VALUE "ProductName", "NetHack\0"
|
||||
VALUE "ProductVersion", "3, 6, 4, 0\0"
|
||||
VALUE "ProductVersion", "3, 6, 5, 0\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
|
||||
@@ -260,8 +260,8 @@ END
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,6,4,0
|
||||
PRODUCTVERSION 3,6,4,0
|
||||
FILEVERSION 3,6,5,0
|
||||
PRODUCTVERSION 3,6,5,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x9L
|
||||
@@ -276,17 +276,17 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "NetHack 3.6.4 for Smartphone 2002\0"
|
||||
VALUE "Comments", "NetHack 3.6.5 for Smartphone 2002\0"
|
||||
VALUE "CompanyName", " \0"
|
||||
VALUE "FileDescription", "nethackm\0"
|
||||
VALUE "FileVersion", "3, 6, 4, 0\0"
|
||||
VALUE "FileVersion", "3, 6, 5, 0\0"
|
||||
VALUE "InternalName", "nethackm\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1985-2019\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1985-2020\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "nethackm.exe\0"
|
||||
VALUE "PrivateBuild", "090914\0"
|
||||
VALUE "ProductName", "NetHack For Smartphone\0"
|
||||
VALUE "ProductVersion", "3, 6, 4, 0\0"
|
||||
VALUE "ProductVersion", "3, 6, 5, 0\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
|
||||
@@ -16,7 +16,7 @@ contributed the port.
|
||||
|
||||
Alex Kompel, Dion Nicolaas, Yitzhak Sapir, Derek S. Ray, Michael Allison,
|
||||
Pasi Kallinen, Bart House, and Janet Walz contributed to the maintainance
|
||||
of the tty and graphical windows versions of NetHack 3.6.4.
|
||||
of the tty and graphical windows versions of NetHack 3.6.5.
|
||||
|
||||
You can build a TTY version of NetHack and a Windows Graphical
|
||||
version. You can use one of the following build environments:
|
||||
@@ -151,7 +151,7 @@ a 32-bit x86 version, or a 64-bit x64 version. The default Makefile
|
||||
is set up for a 32-bit x86 version, but that's only because it will
|
||||
run on the most number of existing Windows environments.
|
||||
|
||||
NetHack's save files and bones files in the 3.6.4 release have not yet
|
||||
NetHack's save files and bones files in the 3.6.5 release have not yet
|
||||
evolved enough to allow them to interchange between the 32-bit version
|
||||
and the 64-bit version (or between different platforms). Hopefully
|
||||
that will change in an upcoming release.
|
||||
@@ -164,7 +164,7 @@ I. Dispelling the Myths:
|
||||
|
||||
We have provided a Makefile for each of the following compilers:
|
||||
|
||||
o Microsoft Visual Studio 2015 or 2017 C++ Compiler
|
||||
o Microsoft Visual Studio 2017 or 2019 C++ Compiler
|
||||
The Community Editions are fine and available at no cost
|
||||
o MinGW 2.0 (with GCC 3.2)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
NAME NETHACK
|
||||
DESCRIPTION 'NetHack 3.6.4 for Windows'
|
||||
DESCRIPTION 'NetHack 3.6.5 for Windows'
|
||||
EXETYPE WINDOWS
|
||||
STUB 'WINSTUB.EXE'
|
||||
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||
|
||||
@@ -1162,7 +1162,7 @@ VA_DECL(const char *, s)
|
||||
if (iflags.window_inited)
|
||||
end_screen();
|
||||
buf[0] = '\n';
|
||||
(void) vsprintf(&buf[1], s, VA_ARGS);
|
||||
(void) vsnprintf(&buf[1], sizeof buf - 1, s, VA_ARGS);
|
||||
msmsg(buf);
|
||||
really_move_cursor();
|
||||
VA_END();
|
||||
@@ -1980,7 +1980,7 @@ VA_DECL(const char *, fmt)
|
||||
char buf[ROWNO * COLNO]; /* worst case scenario */
|
||||
VA_START(fmt);
|
||||
VA_INIT(fmt, const char *);
|
||||
Vsprintf(buf, fmt, VA_ARGS);
|
||||
(void) vsnprintf(buf, sizeof buf, fmt, VA_ARGS);
|
||||
if (redirect_stdout)
|
||||
fprintf(stdout, "%s", buf);
|
||||
else {
|
||||
|
||||
@@ -78,24 +78,34 @@ static struct stat hbuf;
|
||||
|
||||
extern char orgdir[];
|
||||
|
||||
void
|
||||
int
|
||||
get_known_folder_path(
|
||||
const KNOWNFOLDERID * folder_id,
|
||||
char * path
|
||||
, size_t path_size)
|
||||
{
|
||||
PWSTR wide_path;
|
||||
if (FAILED(SHGetKnownFolderPath(folder_id, 0, NULL, &wide_path)))
|
||||
if (FAILED(SHGetKnownFolderPath(folder_id, 0, NULL, &wide_path))) {
|
||||
error("Unable to get known folder path");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
size_t converted;
|
||||
errno_t err;
|
||||
|
||||
err = wcstombs_s(&converted, path, path_size, wide_path, path_size - 1);
|
||||
err = wcstombs_s(&converted, path, path_size, wide_path, _TRUNCATE);
|
||||
|
||||
CoTaskMemFree(wide_path);
|
||||
|
||||
if (err != 0) error("Failed folder path string conversion");
|
||||
if (err == STRUNCATE || err == EILSEQ) {
|
||||
// silently handle this problem
|
||||
return FALSE;
|
||||
} else if (err != 0) {
|
||||
error("Failed folder (%u) path string conversion, unexpected err = %d", folder_id->Data1, err);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -107,14 +117,16 @@ create_directory(const char * path)
|
||||
error("Unable to create directory '%s'", path);
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
build_known_folder_path(
|
||||
const KNOWNFOLDERID * folder_id,
|
||||
char * path,
|
||||
size_t path_size,
|
||||
boolean versioned)
|
||||
{
|
||||
get_known_folder_path(folder_id, path, path_size);
|
||||
if(!get_known_folder_path(folder_id, path, path_size))
|
||||
return FALSE;
|
||||
|
||||
strcat(path, "\\NetHack\\");
|
||||
create_directory(path);
|
||||
if (versioned) {
|
||||
@@ -122,6 +134,7 @@ build_known_folder_path(
|
||||
VERSION_MAJOR, VERSION_MINOR);
|
||||
create_directory(path);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -249,17 +262,22 @@ set_default_prefix_locations(const char *programPath)
|
||||
g.fqn_prefix[TROUBLEPREFIX] = portable_device_path;
|
||||
g.fqn_prefix[DATAPREFIX] = executable_path;
|
||||
} else {
|
||||
build_known_folder_path(&FOLDERID_Profile, profile_path,
|
||||
sizeof(profile_path), FALSE);
|
||||
if(!build_known_folder_path(&FOLDERID_Profile, profile_path,
|
||||
sizeof(profile_path), FALSE))
|
||||
strcpy(profile_path, executable_path);
|
||||
|
||||
build_known_folder_path(&FOLDERID_Profile, versioned_profile_path,
|
||||
sizeof(profile_path), TRUE);
|
||||
if(!build_known_folder_path(&FOLDERID_Profile, versioned_profile_path,
|
||||
sizeof(profile_path), TRUE))
|
||||
strcpy(versioned_profile_path, executable_path);
|
||||
|
||||
build_known_folder_path(&FOLDERID_LocalAppData,
|
||||
versioned_user_data_path, sizeof(versioned_user_data_path), TRUE);
|
||||
if(!build_known_folder_path(&FOLDERID_LocalAppData,
|
||||
versioned_user_data_path, sizeof(versioned_user_data_path), TRUE))
|
||||
strcpy(versioned_user_data_path, executable_path);
|
||||
|
||||
if(!build_known_folder_path(&FOLDERID_ProgramData,
|
||||
versioned_global_data_path, sizeof(versioned_global_data_path), TRUE))
|
||||
strcpy(versioned_global_data_path, executable_path);
|
||||
|
||||
build_known_folder_path(&FOLDERID_ProgramData,
|
||||
versioned_global_data_path, sizeof(versioned_global_data_path), TRUE);
|
||||
g.fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path;
|
||||
g.fqn_prefix[CONFIGPREFIX] = profile_path;
|
||||
g.fqn_prefix[HACKPREFIX] = versioned_profile_path;
|
||||
|
||||
@@ -241,11 +241,11 @@ VA_DECL(const char *, s)
|
||||
end_screen();
|
||||
if (WINDOWPORT("tty")) {
|
||||
buf[0] = '\n';
|
||||
(void) vsprintf(&buf[1], s, VA_ARGS);
|
||||
(void) vsnprintf(&buf[1], sizeof buf - (1 + sizeof "\n"), s, VA_ARGS);
|
||||
Strcat(buf, "\n");
|
||||
msmsg(buf);
|
||||
} else {
|
||||
(void) vsprintf(buf, s, VA_ARGS);
|
||||
(void) vsnprintf(buf, sizeof buf - sizeof "\n", s, VA_ARGS);
|
||||
Strcat(buf, "\n");
|
||||
raw_printf(buf);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(UNIX) && !defined(LINT) && !defined(GCC_WARN)
|
||||
static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.7\t2019/12/17";
|
||||
static const char SCCS_Id[] UNUSED = "@(#)makedefs.c\t3.7\t2020/01/18";
|
||||
#endif
|
||||
|
||||
/* names of files to be generated */
|
||||
|
||||
2
win/gem/.gitattributes
vendored
2
win/gem/.gitattributes
vendored
@@ -1 +1 @@
|
||||
* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.4)
|
||||
* NH_filestag=(file%s_for_GEM_versions_-_untested_for_3.6.5)
|
||||
|
||||
2
win/gnome/.gitattributes
vendored
2
win/gnome/.gitattributes
vendored
@@ -1 +1 @@
|
||||
* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.4)
|
||||
* NH_filestag=(file%s_for_GNOME_versions_-_untested_for_3.6.5)
|
||||
|
||||
@@ -339,7 +339,7 @@ BEGIN
|
||||
VALUE "FileDescription", "NetHack for Windows - Graphical Interface"
|
||||
VALUE "FileVersion", "3.7.0"
|
||||
VALUE "InternalName", "NetHackW"
|
||||
VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
|
||||
VALUE "LegalCopyright", "Copyright (C) 1985 - 2020. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
|
||||
VALUE "OriginalFilename", "NetHackW.exe"
|
||||
VALUE "PrivateBuild", "140606"
|
||||
VALUE "ProductName", "NetHack"
|
||||
|
||||
@@ -305,9 +305,14 @@ mswin_map_stretch(HWND hWnd, LPSIZE map_size, BOOL redraw)
|
||||
|
||||
}
|
||||
|
||||
/* TODO: Should we round instead of clamping? */
|
||||
data->xFrontTile = (int) ((double) data->xBackTile * data->frontScale);
|
||||
data->yFrontTile = (int) ((double) data->yBackTile * data->frontScale);
|
||||
|
||||
/* ensure tile is at least one pixel in size */
|
||||
if (data->xFrontTile < 1) data->xFrontTile = 1;
|
||||
if (data->yFrontTile < 1) data->yFrontTile = 1;
|
||||
|
||||
/* ensure front tile is non-zero in size */
|
||||
data->xFrontTile = max(data->xFrontTile, 1);
|
||||
data->yFrontTile = max(data->yFrontTile, 1);
|
||||
|
||||
@@ -2318,7 +2318,7 @@ logDebug(const char *fmt, ...)
|
||||
/* Reading and writing settings from the registry. */
|
||||
#define CATEGORYKEY "Software"
|
||||
#define COMPANYKEY "NetHack"
|
||||
#define PRODUCTKEY "NetHack 3.6.4"
|
||||
#define PRODUCTKEY "NetHack 3.6.5"
|
||||
#define SETTINGSKEY "Settings"
|
||||
#define MAINSHOWSTATEKEY "MainShowState"
|
||||
#define MAINMINXKEY "MainMinX"
|
||||
|
||||
@@ -79,7 +79,7 @@ BEGIN
|
||||
VALUE "FileDescription", "NetHack for Windows - TTY Interface"
|
||||
VALUE "FileVersion", "3.7.0"
|
||||
VALUE "InternalName", "NetHack"
|
||||
VALUE "LegalCopyright", "Copyright (C) 1985 - 2019. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
|
||||
VALUE "LegalCopyright", "Copyright (C) 1985 - 2020. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
|
||||
VALUE "OriginalFilename", "NetHack.exe"
|
||||
VALUE "ProductName", "NetHack"
|
||||
VALUE "ProductVersion", "3.7.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp rescap">
|
||||
<Identity Name="30485NetHackDevTeam.NetHack3.6" Publisher="CN=8BDC628A-FAAA-4EBA-8B5B-EB61BA93BA1F" Version="363.0.21.0" />
|
||||
<Identity Name="30485NetHackDevTeam.NetHack3.6" Publisher="CN=8BDC628A-FAAA-4EBA-8B5B-EB61BA93BA1F" Version="363.0.28.0" />
|
||||
<Properties>
|
||||
<DisplayName>NetHack 3.6</DisplayName>
|
||||
<PublisherDisplayName>NetHack DevTeam</PublisherDisplayName>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<Copy SourceFiles="$(SysWinntDir)porthelp" DestinationFolder="$(DatDir)"/>
|
||||
<WriteLinesToFile File="$(DatDir)dlb.lst" Lines="@(DlbList->'%(filename)%(extension)')" Overwrite="true"/>
|
||||
<Exec Command="$(ToolsDir)dlb.exe cIf $(DatDir)dlb.lst $(BinDir)nhdat" WorkingDirectory="$(DatDir)"/>
|
||||
<Exec Command=""$(ToolsDir)dlb.exe" cIf dlb.lst "$(BinDir)nhdat"" WorkingDirectory="$(DatDir)"/>
|
||||
<Delete Files="$(DatDir)porthelp"/>
|
||||
|
||||
</Target>
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
<Target Name="Build"
|
||||
Inputs="$(ToolsDir)makedefs.exe"
|
||||
Outputs="@(Defs)">
|
||||
<Exec Command="$(ToolsDir)makedefs.exe -v" WorkingDirectory="$(UtilDir)"/>
|
||||
<Exec Command="$(ToolsDir)makedefs.exe -o" WorkingDirectory="$(UtilDir)"/>
|
||||
<Exec Command="$(ToolsDir)makedefs.exe -p" WorkingDirectory="$(UtilDir)"/>
|
||||
<Exec Command="$(ToolsDir)makedefs.exe -z" WorkingDirectory="$(UtilDir)"/>
|
||||
<Exec Command="$(ToolsDir)makedefs.exe -d" WorkingDirectory="$(DatDir)"/>
|
||||
<Exec Command="$(ToolsDir)makedefs.exe -r" WorkingDirectory="$(DatDir)"/>
|
||||
<Exec Command="$(ToolsDir)makedefs.exe -s" WorkingDirectory="$(DatDir)"/>
|
||||
<Exec Command="$(ToolsDir)makedefs.exe -h" WorkingDirectory="$(DatDir)"/>
|
||||
<Exec Command=""$(ToolsDir)makedefs.exe" -v" WorkingDirectory="$(UtilDir)"/>
|
||||
<Exec Command=""$(ToolsDir)makedefs.exe" -o" WorkingDirectory="$(UtilDir)"/>
|
||||
<Exec Command=""$(ToolsDir)makedefs.exe" -p" WorkingDirectory="$(UtilDir)"/>
|
||||
<Exec Command=""$(ToolsDir)makedefs.exe" -z" WorkingDirectory="$(UtilDir)"/>
|
||||
<Exec Command=""$(ToolsDir)makedefs.exe" -d" WorkingDirectory="$(DatDir)"/>
|
||||
<Exec Command=""$(ToolsDir)makedefs.exe" -r" WorkingDirectory="$(DatDir)"/>
|
||||
<Exec Command=""$(ToolsDir)makedefs.exe" -s" WorkingDirectory="$(DatDir)"/>
|
||||
<Exec Command=""$(ToolsDir)makedefs.exe" -h" WorkingDirectory="$(DatDir)"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<Delete Files="@(Defs)"/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Target Name="Build"
|
||||
Inputs="$(ToolsDir)tile2bmp.exe;$(WinShareDir)monsters.txt;$(WinShareDir)objects.txt"
|
||||
Outputs="$(WinWin32Dir)tiles.bmp">
|
||||
<Exec Command="$(ToolsDir)tile2bmp.exe tiles.bmp" WorkingDirectory="$(SrcDir)"/>
|
||||
<Exec Command=""$(ToolsDir)tile2bmp.exe" tiles.bmp" WorkingDirectory="$(SrcDir)"/>
|
||||
<Move SourceFiles="$(SrcDir)tiles.bmp" DestinationFolder="$(WinWin32Dir)"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Target Name="Build"
|
||||
Inputs="$(ToolsDir)tilemap.exe"
|
||||
Outputs="$(SrcDir)tile.c">
|
||||
<Exec Command="$(ToolsDir)tilemap.exe" WorkingDirectory="$(SrcDir)"/>
|
||||
<Exec Command=""$(ToolsDir)tilemap.exe"" WorkingDirectory="$(SrcDir)"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<Delete Files="$(SrcDir)tile.c"/>
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<Target Name="Build"
|
||||
Inputs="$(ToolsDir)uudecode.exe;@(UUFiles)"
|
||||
Outputs="@(IconFiles);@(BmpFiles);@(RecordFiles)">
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(SysWinntDir)nhico.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(WinWin32Dir)mnsel.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(WinWin32Dir)mnselcnt.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(WinWin32Dir)mnunsel.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(WinWin32Dir)petmark.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(WinWin32Dir)pilemark.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(WinWin32Dir)splash.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(WinWin32Dir)rip.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command="$(ToolsDir)uudecode.exe $(WinWin32Dir)record.uu" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(SysWinntDir)nhico.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(WinWin32Dir)mnsel.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(WinWin32Dir)mnselcnt.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(WinWin32Dir)mnunsel.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(WinWin32Dir)petmark.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(WinWin32Dir)pilemark.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(WinWin32Dir)splash.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(WinWin32Dir)rip.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
<Exec Command=""$(ToolsDir)uudecode.exe" "$(WinWin32Dir)record.uu"" WorkingDirectory="$(WinWin32Dir)"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<Delete Files="@(IconFiles);@(BmpFiles);@(RecordFiles)"/>
|
||||
|
||||
Reference in New Issue
Block a user