#endif
/*
+ * Cleaning up a couple of things to make these easier to change --AR
+ */
+#ifdef JP
+#define PREF_FILE_NAME "Hengband Preferences"
+#else
+#define PREF_FILE_NAME "Angband Preferences"
+#endif
+
+/*
* Use "malloc()" instead of "NewPtr()"
*/
/* #define USE_MALLOC */
ptocstr((StringPtr)foo);
/* Append the preference file name */
-#ifdef JP
- strcat(foo, "Hengband Preferences");
-#else
- strcat(foo, "Angband Preferences");
-#endif
+ strcat(foo, PREF_FILE_NAME);
+
/* Open the preference file */
fff = fopen(foo, "r");
SetVol(0, env.sysVRefNum);
/* Open the file */
-#ifdef JP
- fff = fopen(":Preferences:Hengband Preferences", "r");
- if (!fff) fff = fopen(":Hengband Preferences", "r");
-#else
- fff = fopen(":Preferences:Angband Preferences", "r");
- if (!fff) fff = fopen(":Angband Preferences", "r");
-#endif
+ fff = fopen(PREF_FILE_NAME, "r");
+
/* Restore */
HSetVol(0, savev, saved);
}
ptocstr((StringPtr)foo);
/* Append the preference file name */
-#ifdef JP
- strcat(foo, "Hengband Preferences");
-#else
- strcat(foo, "Angband Preferences");
-#endif
+ strcat(foo, PREF_FILE_NAME);
+
/* Open the preference file */
/* my_fopen set file type and file creator for MPW */
fff = my_fopen(foo, "w");
/* Open the preference file */
/* my_fopen set file type and file creator for MPW */
-#ifdef JP
- fff = my_fopen(":Preferences:Hengband Preferences", "w");
- if (!fff) fff = my_fopen(":Hengband Preferences", "w");
+ fff = fopen(PREF_FILE_NAME, "w");
-#else
- fff = my_fopen(":Preferences:Angband Preferences", "w");
- if (!fff) fff = my_fopen(":Angband Preferences", "w");
-#endif
/* Restore */
HSetVol(0, savev, saved);
}