[Pkg-nethack-devel] nethack/util makedefs.c,1.1.1.1,1.2

Joshua Kwan joshk-guest@quantz.debian.org
Tue, 09 Dec 2003 16:14:48 +0000


Update of /cvsroot/pkg-nethack/nethack/util
In directory quantz:/tmp/cvs-serv9687/util

Modified Files:
	makedefs.c 
Log Message:
Merge Nethack 3.4.3 upstream source.


Index: makedefs.c
===================================================================
RCS file: /cvsroot/pkg-nethack/nethack/util/makedefs.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- makedefs.c	7 Oct 2003 19:00:39 -0000	1.1.1.1
+++ makedefs.c	9 Dec 2003 16:14:45 -0000	1.2
@@ -171,6 +171,7 @@
 static boolean FDECL(h_filter, (char *));
 static boolean FDECL(ranged_attk,(struct permonst*));
 static int FDECL(mstrength,(struct permonst *));
+static void NDECL(build_savebones_compat_string);
 
 static boolean FDECL(qt_comment, (char *));
 static boolean FDECL(qt_control, (char *));
@@ -605,6 +606,27 @@
 	return;
 }
 
+static char save_bones_compat_buf[BUFSZ];
+
+static void
+build_savebones_compat_string()
+{
+#ifdef VERSION_COMPATIBILITY
+	unsigned long uver = VERSION_COMPATIBILITY;
+#endif
+	Strcpy(save_bones_compat_buf,
+		"save and bones files accepted from version");
+#ifdef VERSION_COMPATIBILITY
+	Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d",
+		((uver & 0xFF000000L) >> 24), ((uver & 0x00FF0000L) >> 16),
+		((uver & 0x0000FF00L) >> 8),
+		VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
+#else
+	Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only",
+		VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
+#endif
+}
+
 static const char *build_opts[] = {
 #ifdef AMIGA_WBENCH
 		"Amiga WorkBench support",
@@ -612,6 +634,9 @@
 #ifdef ANSI_DEFAULT
 		"ANSI default terminal",
 #endif
+#ifdef AUTOPICKUP_EXCEPTIONS
+		"autopickup_exceptions",
+#endif
 #ifdef TEXTCOLOR
 		"color",
 #endif
@@ -749,6 +774,7 @@
 #ifdef ZEROCOMP
 		"zero-compressed save files",
 #endif
+		save_bones_compat_buf,
 		"basic NetHack features"
 	};
 
@@ -799,6 +825,7 @@
 		exit(EXIT_FAILURE);
 	}
 
+	build_savebones_compat_string();
 	Fprintf(ofp,
 #ifdef BETA
 		"\n    NetHack version %d.%d.%d [beta]\n",