From a3387432accf9b204c8b43abf3bc7c401743f528 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 10 Apr 2015 19:11:47 -0400 Subject: [PATCH 1/7] Document wallification changes. --- doc/fixes35.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 5f5abf250..27c9aca0d 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1117,6 +1117,9 @@ options to create the character blind or nudist moving clouds on the plane of air disclose extinct species alongside genocided ones tribute to Terry Pratchett +Some levels in Gehennom now use the old corridor-style maze instead of + the new room-style. Beelzebub's level always does this and the + "beetle legs" are restored. Platform- and/or Interface-Specific New Features From b86ad06d6bd20172af0e4e00b062e60c7c346e57 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 3 Apr 2015 14:07:53 -0400 Subject: [PATCH 2/7] Implement a new system-based matching harness. The intent is to look for platform-specific facilities for regex matching, to provide portable MENUCOLORS configuration files. This is a prototype implementation being committed to see if Windows can use the POSIX regex implementation provided with the C++11 standard library. If this works, I will write a harness for POSIX regexes and for pmatch(), and those can be linked in by platforms as appropriate. pmatch() should be used only as a very last resort, because it breaks compatibility between platforms. --- include/color.h | 16 +++---------- include/config.h | 14 +----------- include/nhregex.h | 19 ++++++++++++++++ src/options.c | 49 ++++++---------------------------------- sys/share/cppregex.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 81 insertions(+), 68 deletions(-) create mode 100644 include/nhregex.h create mode 100644 sys/share/cppregex.cpp diff --git a/include/color.h b/include/color.h index f7bec4a08..56c43af15 100644 --- a/include/color.h +++ b/include/color.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 color.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 color.h $NHDT-Date: 1428084467 2015/04/03 18:07:47 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.7 $ */ /* NetHack 3.5 color.h $Date: 2009/05/06 10:44:34 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)color.h 3.5 1992/02/02 */ /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */ @@ -7,9 +7,7 @@ #ifndef COLOR_H #define COLOR_H -#ifdef MENU_COLOR_REGEX -#include -#endif +#include /* * The color scheme used is tailored for an IBM PC. It consists of the @@ -56,15 +54,7 @@ #define HI_ZAP CLR_BRIGHT_BLUE struct menucoloring { -# ifdef MENU_COLOR_REGEX -# ifdef MENU_COLOR_REGEX_POSIX - regex_t match; -# else - struct re_pattern_buffer match; -# endif -# else - char *match; -# endif + struct nhregex *match; int color, attr; struct menucoloring *next; }; diff --git a/include/config.h b/include/config.h index 4cce7dba8..5fc3d0d8f 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 config.h $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.51 $ */ +/* NetHack 3.5 config.h $NHDT-Date: 1428084467 2015/04/03 18:07:47 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.76 $ */ /* NetHack 3.5 config.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -436,18 +436,6 @@ typedef unsigned char uchar; * bugs left here. */ -/* Menucolors */ -/* HACK: this is being added to fix the builds temporarily. - * Remove it whenever we finally get a real regex for Win32 */ -#ifdef UNIX -# define MENU_COLOR_REGEX /* use GNU regex */ -/*# define MENU_COLOR_REGEX_POSIX*/ /* use POSIX regex */ -#endif -/* if neither is defined, uses pmatch() - * pmatch() provides basic globbing: '*' and '?' wildcards. - */ - - #define STATUS_VIA_WINDOWPORT /* re-work of the status line updating process */ #define STATUS_HILITES /* support hilites of status fields */ /* #define WINCHAIN*/ /* stacked window systems */ diff --git a/include/nhregex.h b/include/nhregex.h new file mode 100644 index 000000000..1708b565e --- /dev/null +++ b/include/nhregex.h @@ -0,0 +1,19 @@ +/* NetHack 3.5 nhregex.h $NHDT-Date: 1428084467 2015/04/03 18:07:47 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.0 $ */ +/* NetHack 3.5 nhregex.h $Date: 2009/05/06 10:44:33 $ $Revision: 1.4 $ */ +/* Copyright (c) Sean Hunt 2015. */ +/* NetHack may be freely redistributed. See license for details. */ + +#ifndef NHREGEX_H +#define NHREGEX_H + +#include + +struct nhregex; + +struct nhregex *regex_init(void); +boolean regex_compile(const char *s, struct nhregex *re); +const char *regex_error_desc(struct nhregex *re); +boolean regex_match(const char *s, struct nhregex *re); +void regex_free(struct nhregex *re); + +#endif diff --git a/src/options.c b/src/options.c index c65f3db28..3925b2a14 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 options.c $NHDT-Date: 1427073746 2015/03/23 01:22:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.164 $ */ +/* NetHack 3.5 options.c $NHDT-Date: 1428084467 2015/04/03 18:07:47 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.181 $ */ /* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -15,6 +15,7 @@ NEARDATA struct instance_flags iflags; /* provide linkage */ #define static #else #include "hack.h" +#include "nhregex.h" #include "tcap.h" #include #endif @@ -1170,11 +1171,6 @@ char *str; int i, c = NO_COLOR, a = ATR_NONE; struct menucoloring *tmp; char *tmps, *cs = strchr(str, '='); -#ifdef MENU_COLOR_REGEX_POSIX - int errnum; - char errbuf[80]; -#endif - const char *err = (char *)0; if (!cs || !str) return FALSE; @@ -1217,28 +1213,9 @@ char *str; } tmp = (struct menucoloring *)alloc(sizeof(struct menucoloring)); -#ifdef MENU_COLOR_REGEX -#ifdef MENU_COLOR_REGEX_POSIX - errnum = regcomp(&tmp->match, tmps, REG_EXTENDED | REG_NOSUB); - if (errnum != 0) - { - regerror(errnum, &tmp->match, errbuf, sizeof(errbuf)); - err = errbuf; - } -#else - tmp->match.translate = 0; - tmp->match.fastmap = 0; - tmp->match.buffer = 0; - tmp->match.allocated = 0; - tmp->match.regs_allocated = REGS_FIXED; - err = re_compile_pattern(tmps, strlen(tmps), &tmp->match); -#endif -#else - tmp->match = (char *)alloc(strlen(tmps)+1); - (void) memcpy((genericptr_t)tmp->match, (genericptr_t)tmps, strlen(tmps)+1); -#endif - if (err) { - raw_printf("\nMenucolor regex error: %s\n", err); + tmp->match = regex_init(); + if (!regex_compile(tmps, tmp->match)) { + raw_printf("\nMenucolor regex error: %s\n", regex_error_desc(tmp->match)); wait_synch(); free(tmp); return FALSE; @@ -1259,15 +1236,7 @@ int *color, *attr; struct menucoloring *tmpmc; if (iflags.use_menu_color) for (tmpmc = menu_colorings; tmpmc; tmpmc = tmpmc->next) -#ifdef MENU_COLOR_REGEX -# ifdef MENU_COLOR_REGEX_POSIX - if (regexec(&tmpmc->match, str, 0, NULL, 0) == 0) { -# else - if (re_search(&tmpmc->match, str, strlen(str), 0, 9999, 0) >= 0) { -# endif -#else - if (pmatch(tmpmc->match, str)) { -#endif + if (regex_match(str, tmpmc->match)) { *color = tmpmc->color; *attr = tmpmc->attr; return TRUE; @@ -1282,11 +1251,7 @@ free_menu_coloring() while (tmp) { struct menucoloring *tmp2 = tmp->next; -#ifdef MENU_COLOR_REGEX - (void) regfree(&tmp->match); -#else - free(tmp->match); -#endif + regex_free(tmp->match); free(tmp); tmp = tmp2; } diff --git a/sys/share/cppregex.cpp b/sys/share/cppregex.cpp new file mode 100644 index 000000000..446929cc5 --- /dev/null +++ b/sys/share/cppregex.cpp @@ -0,0 +1,51 @@ +/* NetHack 3.5 cppregex.cpp $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 cppregex.cpp $Date: 2009/05/06 10:44:33 $ $Revision: 1.4 $ */ +/* Copyright (c) Sean Hunt 2015. */ +/* NetHack may be freely redistributed. See license for details. */ + +#include +#include + +extern "C" { + #include + + struct nhregex { + std::unique_ptr re; + std::unique_ptr err; + }; + + struct nhregex *regex_init(void) { + return new nhregex; + } + + boolean regex_compile(const char *s, struct nhregex *re) { + if (!re) + return FALSE; + try { + re->re.reset(new std::regex(s, std::regex::extended | std::regex::nosubs | std::regex::optimize)); + re->err.reset(nullptr); + return TRUE; + } catch (const std::regex_error& err) { + re->err.reset(new std::regex_error(err)); + re->re.reset(nullptr); + return FALSE; + } + } + + const char *regex_error_desc(struct nhregex *re) { + if (re->err) + return re->err->what(); + else + return nullptr; + } + + boolean regex_match(const char *s, struct nhregex *re) { + if (!re->re) + return false; + return regex_search(s, *re->re, std::regex_constants::match_any); + } + + void regex_free(struct nhregex *re) { + delete re; + } +} From 80aa109855d54c88561bbfdee79c894ac5d28ebe Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 3 Apr 2015 15:08:29 -0400 Subject: [PATCH 3/7] Use extern.h for regexes. I was planning to do this anyway, but it created an include loop that was breaking it on Windows. --- include/color.h | 4 +--- include/extern.h | 8 +++++++- include/nhregex.h | 19 ------------------- src/options.c | 3 +-- sys/share/cppregex.cpp | 2 +- 5 files changed, 10 insertions(+), 26 deletions(-) delete mode 100644 include/nhregex.h diff --git a/include/color.h b/include/color.h index 56c43af15..a772dd84c 100644 --- a/include/color.h +++ b/include/color.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 color.h $NHDT-Date: 1428084467 2015/04/03 18:07:47 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.7 $ */ +/* NetHack 3.5 color.h $NHDT-Date: 1428088106 2015/04/03 19:08:26 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.8 $ */ /* NetHack 3.5 color.h $Date: 2009/05/06 10:44:34 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)color.h 3.5 1992/02/02 */ /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */ @@ -7,8 +7,6 @@ #ifndef COLOR_H #define COLOR_H -#include - /* * The color scheme used is tailored for an IBM PC. It consists of the * standard 8 colors, folowed by their bright counterparts. There are diff --git a/include/extern.h b/include/extern.h index 199201925..997885882 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,5 +1,4 @@ /* NetHack 3.5 extern.h $NHDT-Date: 1428806395 2015/04/12 02:39:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.455 $ */ -/* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1488,6 +1487,13 @@ E void NDECL(init_lan_features); E char *NDECL(lan_username); #endif +/* ### nhregex.c ### */ +E struct nhregex * NDECL(regex_init); +E boolean FDECL(regex_compile, (const char *, struct nhregex *)); +E const char *FDECL(regex_error_desc, (struct nhregex *)); +E boolean FDECL(regex_match, (const char *, struct nhregex*)); +E void FDECL(regex_free, (struct nhregex *)); + /* ### nttty.c ### */ #ifdef WIN32CON diff --git a/include/nhregex.h b/include/nhregex.h deleted file mode 100644 index 1708b565e..000000000 --- a/include/nhregex.h +++ /dev/null @@ -1,19 +0,0 @@ -/* NetHack 3.5 nhregex.h $NHDT-Date: 1428084467 2015/04/03 18:07:47 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.0 $ */ -/* NetHack 3.5 nhregex.h $Date: 2009/05/06 10:44:33 $ $Revision: 1.4 $ */ -/* Copyright (c) Sean Hunt 2015. */ -/* NetHack may be freely redistributed. See license for details. */ - -#ifndef NHREGEX_H -#define NHREGEX_H - -#include - -struct nhregex; - -struct nhregex *regex_init(void); -boolean regex_compile(const char *s, struct nhregex *re); -const char *regex_error_desc(struct nhregex *re); -boolean regex_match(const char *s, struct nhregex *re); -void regex_free(struct nhregex *re); - -#endif diff --git a/src/options.c b/src/options.c index 3925b2a14..83c3c0abf 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 options.c $NHDT-Date: 1428084467 2015/04/03 18:07:47 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.181 $ */ +/* NetHack 3.5 options.c $NHDT-Date: 1428088105 2015/04/03 19:08:25 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.182 $ */ /* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -15,7 +15,6 @@ NEARDATA struct instance_flags iflags; /* provide linkage */ #define static #else #include "hack.h" -#include "nhregex.h" #include "tcap.h" #include #endif diff --git a/sys/share/cppregex.cpp b/sys/share/cppregex.cpp index 446929cc5..8d0704fde 100644 --- a/sys/share/cppregex.cpp +++ b/sys/share/cppregex.cpp @@ -7,7 +7,7 @@ #include extern "C" { - #include + #include struct nhregex { std::unique_ptr re; From 302ad5025fd2d0b4305002a7301769eeaf8838b5 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 3 Apr 2015 16:25:17 -0400 Subject: [PATCH 4/7] Catch regex matching errors to avoid crashing. --- sys/share/cppregex.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/share/cppregex.cpp b/sys/share/cppregex.cpp index 8d0704fde..e775d7c6f 100644 --- a/sys/share/cppregex.cpp +++ b/sys/share/cppregex.cpp @@ -42,7 +42,11 @@ extern "C" { boolean regex_match(const char *s, struct nhregex *re) { if (!re->re) return false; - return regex_search(s, *re->re, std::regex_constants::match_any); + try { + return regex_search(s, *re->re, std::regex_constants::match_any); + } catch (const std::regex_error& err) { + return false; + } } void regex_free(struct nhregex *re) { From c7578b7c34e34919f183df917dfff15473427892 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Thu, 9 Apr 2015 10:38:15 -0400 Subject: [PATCH 5/7] Add POSIX implementation of regex. This also includes documentation of the regex engine in posixregex.c, because I couldn't think of anywhere better to put it. --- sys/share/cppregex.cpp | 3 +- sys/share/posixregex.c | 92 ++++++++++++++++++++++++++++++++++++++++++ sys/unix/Makefile.src | 8 ++-- 3 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 sys/share/posixregex.c diff --git a/sys/share/cppregex.cpp b/sys/share/cppregex.cpp index e775d7c6f..a0a1bbdc8 100644 --- a/sys/share/cppregex.cpp +++ b/sys/share/cppregex.cpp @@ -1,11 +1,12 @@ /* NetHack 3.5 cppregex.cpp $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ -/* NetHack 3.5 cppregex.cpp $Date: 2009/05/06 10:44:33 $ $Revision: 1.4 $ */ /* Copyright (c) Sean Hunt 2015. */ /* NetHack may be freely redistributed. See license for details. */ #include #include +/* nhregex interface documented in sys/share/posixregex.c */ + extern "C" { #include diff --git a/sys/share/posixregex.c b/sys/share/posixregex.c new file mode 100644 index 000000000..17cb2841e --- /dev/null +++ b/sys/share/posixregex.c @@ -0,0 +1,92 @@ +/* NetHack 3.5 posixregex.c $NHDT-Date: 1428590280 2015/04/09 14:38:00 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.0 $ */ +/* Copyright (c) Sean Hunt 2015. */ +/* NetHack may be freely redistributed. See license for details. */ + +#include + +#include + +/* The nhregex interface is implemented by several source files. The + * file to be used can be linked in by the build. + * + * The regex standard implemented should be POSIX extended regular + * expressions, see: + * http://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap09.html + * If an implementation uses an alternate expression format, this should + * be clearly noted; this will result in incompatibility of config files + * when NetHack is compiled with that implementation. + * + * struct nhregex + * The nhregex structure is an opaque structure type containing the + * information about a compiled regular expression. + * + * struct nhregex *regex_init(void) + * Used to create a new instance of the nhregex structure. It is + * uninitialized and can only safely be passed to regex_compile. + * + * boolean regex_compile(const char *s, struct nhregex *re) + * Used to compile s into a regex and store it in re. Returns TRUE if + * successful and FALSE otherwise. re is invalidated regardless of + * success. + * + * const char *regex_error_desc(struct nhregex *re) + * Used to retrieve an error description from an error created involving + * re. Returns NULL if no description can be retrieved. The returned + * string may be a static buffer and so is only valid until the next + * call to regex_error_desc. + * + * boolean regex_match(const char *s, struct nhregex *re) + * Used to determine if s (or any substring) matches the regex compiled + * into re. Only valid if the most recent call to regex_compile on re + * succeeded. + * + * void regex_free(struct nhregex *re) + * Deallocate a regex object. + */ + +struct nhregex { + regex_t re; + int err; +}; + +struct nhregex *regex_init() { + return malloc (sizeof (struct nhregex)); +} + +boolean regex_compile(const char *s, struct nhregex *re) { + if (!re) + return FALSE; + if ((re->err = regcomp(&re->re, s, REG_EXTENDED | REG_NOSUB))) + return FALSE; + return TRUE; +} + +const char *regex_error_desc(struct nhregex *re) { + static char buf[BUFSZ]; + + if (!re || !re->err) + return NULL; + + /* FIXME: Using a static buffer here is not ideal, but avoids memory + * leaks. Consider the allocation more carefully. */ + regerror(re->err, &re->re, buf, BUFSZ); + + return buf; +} + +boolean regex_match(const char *s, struct nhregex *re) { + if (!re) + return FALSE; + + int result; + if ((result = regexec(&re->re, s, 0, NULL, 0))) { + if (result != REG_NOMATCH) + re->err = result; + return FALSE; + } + return TRUE; +} + +void regex_free(struct nhregex *re) { + free(re); +} diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index b64a838c9..79d34fc64 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.src $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.src $NHDT-Date: 1428590253 2015/04/09 14:37:33 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.38 $ # NetHack 3.5 Makefile.src $Date: 2012/01/20 03:41:33 $ $Revision: 1.37 $ # Root of source tree: @@ -338,7 +338,7 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \ # all operating-system-dependent .c (for dependencies and such) SYSCSRC = ../sys/atari/tos.c ../sys/share/pcmain.c ../sys/share/pcsys.c \ - ../sys/share/pctty.c ../sys/share/pcunix.c ../sys/share/random.c \ + ../sys/share/pctty.c ../sys/share/pcunix.c ../sys/share/posixregex.c ../sys/share/random.c \ ../sys/share/ioctl.c ../sys/share/unixtty.c ../sys/unix/unixmain.c \ ../sys/unix/unixunix.c ../sys/unix/unixres.c ../sys/be/bemain.c @@ -391,7 +391,7 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \ minion.o mklev.o mkmap.o \ mkmaze.o mkobj.o mkroom.o mon.o mondata.o monmove.o monstr.o \ mplayer.o mthrowu.o muse.o music.o o_init.o objnam.o options.o \ - pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o \ + pager.o pickup.o pline.o polyself.o posixregex.o potion.o pray.o priest.o \ quest.o questpgr.o read.o rect.o region.o restore.o rip.o rnd.o \ role.o rumors.o save.o shk.o shknam.o sit.o sounds.o sp_lev.o spell.o \ sys.o \ @@ -603,6 +603,8 @@ random.o: ../sys/share/random.c $(HACK_H) $(CC) $(CFLAGS) -c ../sys/share/random.c ioctl.o: ../sys/share/ioctl.c $(HACK_H) ../include/tcap.h $(CC) $(CFLAGS) -c ../sys/share/ioctl.c +posixregex.o: ../sys/share/posixregex.c $(HACK_H) + $(CC) $(CFLAGS) -c ../sys/share/posixregex.c unixtty.o: ../sys/share/unixtty.c $(HACK_H) $(CC) $(CFLAGS) -c ../sys/share/unixtty.c unixmain.o: ../sys/unix/unixmain.c $(HACK_H) ../include/dlb.h From 38861c1e0d28fcbdca59222c7446439378beb553 Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Fri, 10 Apr 2015 18:33:12 -0400 Subject: [PATCH 6/7] add cppregex.cpp to NetHackW so it'll link properly --- win/win32/NetHackW.vcxproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/win/win32/NetHackW.vcxproj b/win/win32/NetHackW.vcxproj index 9305e23b9..c90ff1112 100644 --- a/win/win32/NetHackW.vcxproj +++ b/win/win32/NetHackW.vcxproj @@ -636,6 +636,7 @@ copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh %(PreprocessorDefinitions) %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) %(AdditionalIncludeDirectories) @@ -1776,4 +1777,4 @@ copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh - \ No newline at end of file + From a66224f9dca419f3704c40cd7166190580e095a7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 10 Apr 2015 19:24:06 -0400 Subject: [PATCH 7/7] Add some new files to top level Files --- Files | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Files b/Files index b898e19e4..658cfc3ee 100644 --- a/Files +++ b/Files @@ -86,7 +86,7 @@ windows.c wizard.c worm.c worn.c write.c zap.c sys/amiga: -(files for Amiga versions) +(files for Amiga versions - untested for 3.6.0) Build.ami Install.ami Makefile.agc Makefile.ami NetHack.cnf amidos.c amidos.p amifont.uu amifont8.uu amigst.c amii.hlp amimenu.c amirip.c amisnd.c amistack.c @@ -97,12 +97,12 @@ winfuncs.c winkey.c winmenu.c winproto.h winreq.c winstr.c xpm2iff.c sys/atari: -(files for Atari version) +(files for Atari version - untested for 3.6.0) Install.tos atarifnt.uue nethack.mnu setup.g tos.c unx2atar.sed sys/be: -(files for BeOS version) +(files for BeOS version - untested for 3.6.0) README bemain.c sys/mac: @@ -115,7 +115,7 @@ macwin.c mgetline.c mmodal.c mrecover.c mrecover.hqx mttymain.c sys/msdos: -(files for MSDOS version) +(files for MSDOS version - untested for 3.6.0) Install.dos Makefile.BC Makefile.GCC Makefile.MSC moveinit.pat msdos.c msdoshlp.txt ovlinit.c pckeys.c pctiles.c pctiles.h pcvideo.h portio.h schema1.BC schema2.BC @@ -125,7 +125,7 @@ vidtxt.c vidvga.c nhico.uu nhpif.uu sys/os2: -(files for OS/2 version) +(files for OS/2 version - untested for 3.6.0) Install.os2 Makefile.os2 nhpmico.uu os2.c sys/share: @@ -152,6 +152,10 @@ termcap (lex/yacc output for special level and dungeon compilers) dgn_comp.h dgn_lex.c dgn_yacc.c lev_comp.h lev_lex.c lev_yacc.c +(posix regex for versions that include regex in their C library) +posixregex.c +(c++ regex code for versions that can build a C++ module and link it in) +cppregex.cpp sys/share/sounds: (files for Amiga and Macintosh versions) @@ -174,14 +178,14 @@ sys/unix/hints: linux linux-x11 macosx macos-x11 unix sys/vms: -(files for VMS version) +(files for VMS version - untested for 3.6.0) Install.vms Makefile.dat Makefile.doc Makefile.src Makefile.top Makefile.utl install.com lev_lex.h nethack.com oldcrtl.c spec_lev.com vmsbuild.com vmsfiles.c vmsmail.c vmsmain.c vmsmisc.c vmstty.c vmsunix.c sys/wince: -(files for Windows CE and PocketPC) +(files for Windows CE and PocketPC - untested for 3.6.0) Install.ce bootstrp.mak celib.c cesetup.bat cesound.c defaults.nh keypad.uu menubar.uu mhaskyn.c mhaskyn.h mhcmd.c mhcmd.h mhcolor.c mhcolor.h mhdlg.c