Index: src/externs.h
===================================================================
RCS file: /home/rr9/angband/angband/src/externs.h,v
retrieving revision 1.118
diff -u -r1.118 externs.h
--- src/externs.h	8 Feb 2005 12:35:46 -0000	1.118
+++ src/externs.h	23 Oct 2005 22:14:28 -0000
@@ -226,6 +226,7 @@
 extern cptr ANGBAND_DIR_USER;
 extern cptr ANGBAND_DIR_XTRA;
 extern cptr ANGBAND_DIR_SCRIPT;
+extern char *fat_data_suffix;
 extern bool item_tester_full;
 extern byte item_tester_tval;
 extern bool (*item_tester_hook)(const object_type*);
Index: src/h-system.h
===================================================================
RCS file: /home/rr9/angband/angband/src/h-system.h,v
retrieving revision 1.7
diff -u -r1.7 h-system.h
--- src/h-system.h	14 Feb 2003 21:43:54 -0000	1.7
+++ src/h-system.h	23 Oct 2005 22:14:29 -0000
@@ -70,6 +70,27 @@
 #endif
 
 
+/* Ensure that NeXT can use fat binaries by default */
+#ifdef NeXT
+
+# if defined(m68k)
+#  define FAT_SUFFIX_DEFAULT   "m68k"
+# endif
+
+# if defined(i386)
+#  define FAT_SUFFIX_DEFAULT   "i386"
+# endif
+
+# if defined(sparc)
+#  define FAT_SUFFIX_DEFAULT   "sparc"
+# endif
+
+# if defined(hppa)
+#  define FAT_SUFFIX_DEFAULT   "hppa"
+# endif
+
+#endif
+
 #ifdef SET_UID
 
 # ifndef USG
Index: src/init2.c
===================================================================
RCS file: /home/rr9/angband/angband/src/init2.c,v
retrieving revision 1.81
diff -u -r1.81 init2.c
--- src/init2.c	6 Jan 2005 16:24:48 -0000	1.81
+++ src/init2.c	23 Oct 2005 22:14:30 -0000
@@ -62,9 +62,11 @@
  * by the user) will NOT end in the "PATH_SEP" string, see the special
  * "path_build()" function in "util.c" for more information.
  *
- * Mega-Hack -- support fat raw files under NEXTSTEP, using special
- * "suffixed" directories for the "ANGBAND_DIR_DATA" directory, but
- * requiring the directories to be created by hand by the user.
+ * We support "fat binaries" by using a string variable as an
+ * architecture-dependent suffix for the ANGBAND_DIR_DATA directory.
+ * The user (or the main-xxx code, either will do) will have to create
+ * this directory themselves.  Note that this variable, fat_data_suffix,
+ * is in variables.c.
  *
  * Hack -- first we free all the strings, since this is known
  * to succeed even if the strings have not been allocated yet,
@@ -185,7 +186,17 @@
 	ANGBAND_DIR_BONE = string_make(buf);
 
 	/* Build the path to the user specific sub-directory */
-	path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "data");
+	if (fat_data_suffix)
+	{
+		/* Support fat binaries */
+		path_build(buf, sizeof(buf), ANGBAND_DIR_USER,
+		           format("data-%s", fat_data_suffix));
+	}
+	else
+	{
+		/* Just build a "simple" path otherwise */
+		path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "data");
+	}
 
 	/* Build a relative path name */
 	ANGBAND_DIR_DATA = string_make(buf);
@@ -206,10 +217,16 @@
 	strcpy(tail, "bone");
 	ANGBAND_DIR_BONE = string_make(path);
 
-	/* Build a path name */
-	strcpy(tail, "data");
+
+	/* Build a path name - support fat binaries */
+	if (fat_data_suffix)
+		sprintf(tail, "data-%s", fat_data_suffix);
+	else
+		strcpy(tail, "data");
+
 	ANGBAND_DIR_DATA = string_make(path);
 
+
 	/* Build a path name */
 	strcpy(tail, "save");
 	ANGBAND_DIR_SAVE = string_make(path);
@@ -226,44 +243,6 @@
 
 #endif /* VM */
 
-
-#ifdef NeXT
-
-	/* Allow "fat binary" usage with NeXT */
-	if (TRUE)
-	{
-		cptr next = NULL;
-
-# if defined(m68k)
-		next = "m68k";
-# endif
-
-# if defined(i386)
-		next = "i386";
-# endif
-
-# if defined(sparc)
-		next = "sparc";
-# endif
-
-# if defined(hppa)
-		next = "hppa";
-# endif
-
-		/* Use special directory */
-		if (next)
-		{
-			/* Forget the old path name */
-			string_free(ANGBAND_DIR_DATA);
-
-			/* Build a new path name */
-			sprintf(tail, "data-%s", next);
-			ANGBAND_DIR_DATA = string_make(path);
-		}
-	}
-
-#endif /* NeXT */
-
 }
 
 
Index: src/variable.c
===================================================================
RCS file: /home/rr9/angband/angband/src/variable.c,v
retrieving revision 1.42
diff -u -r1.42 variable.c
--- src/variable.c	5 Mar 2005 11:03:28 -0000	1.42
+++ src/variable.c	23 Oct 2005 22:14:31 -0000
@@ -756,6 +756,22 @@
  */
 cptr ANGBAND_DIR_SCRIPT;
 
+/*
+ * Fat binary support.
+ *
+ * Semething should set this before the code gets to init_file_paths,
+ * or it won't have any effect.  This gets appended to the end of
+ * ANGBAND_DIR_DATA, and lets us support fat binaries, which may require
+ * multiple sets of data files.
+ *
+ * Hack -- allow a default to be set via a macro.
+ */
+#ifdef FAT_SUFFIX_DEFAULT
+char *fat_data_suffix = FAT_SUFFIX_DEFAULT;
+#else
+char *fat_data_suffix = 0;
+#endif
+
 
 /*
  * Total Hack -- allow all items to be listed (even empty ones)

