summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/birth.cc9
-rw-r--r--src/cmd4.cc29
-rw-r--r--src/files.cc28
-rw-r--r--src/h-config.h27
-rw-r--r--src/h-system.h8
-rw-r--r--src/init2.cc3
-rw-r--r--src/loadsave.cc3
-rw-r--r--src/main.c2
-rw-r--r--src/notes.cc3
-rw-r--r--src/squeltch.cc3
-rw-r--r--src/util.cc11
-rw-r--r--src/wizard1.cc15
12 files changed, 3 insertions, 138 deletions
diff --git a/src/birth.cc b/src/birth.cc
index 5d7e64bd..f3897496 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -3396,9 +3396,6 @@ int load_savefile_names()
strcpy(tmp, "global.svg");
path_build(buf, 1024, ANGBAND_DIR_SAVE, tmp);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Read the file */
fff = my_fopen(buf, "r");
@@ -3469,9 +3466,6 @@ int load_savefile_names()
strncpy(player_base, savefile_names[max], 32);
process_player_name(TRUE);
- /* File type is 'SAVE' */
- FILE_TYPE(FILE_TYPE_SAVE);
-
/* Try to open the savefile */
fd = fd_open(savefile, O_RDONLY);
@@ -3508,9 +3502,6 @@ void save_savefile_names()
strcpy(tmp, "global.svg");
path_build(buf, 1024, ANGBAND_DIR_SAVE, tmp);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Read the file */
fff = my_fopen(buf, "w");
diff --git a/src/cmd4.cc b/src/cmd4.cc
index f2d2b755..4b6c040c 100644
--- a/src/cmd4.cc
+++ b/src/cmd4.cc
@@ -1023,9 +1023,6 @@ static errr option_dump(cptr fname)
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, fname);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Append to the file */
fff = my_fopen(buf, "a");
@@ -1435,9 +1432,6 @@ static errr macro_dump(cptr fname)
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, fname);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Append to the file */
fff = my_fopen(buf, "a");
@@ -1591,9 +1585,6 @@ static errr keymap_dump(cptr fname)
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, fname);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Append to the file */
fff = my_fopen(buf, "a");
@@ -1665,9 +1656,6 @@ void do_cmd_macros(void)
/* Keymap mode */
mode = get_keymap_mode();
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Enter "icky" mode */
character_icky = TRUE;
@@ -2028,10 +2016,6 @@ void do_cmd_visuals(void)
char buf[1024];
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
-
/* Enter "icky" mode */
character_icky = TRUE;
@@ -2464,10 +2448,6 @@ void do_cmd_colors(void)
char buf[1024];
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
-
/* Enter "icky" mode */
character_icky = TRUE;
@@ -2944,9 +2924,6 @@ void do_cmd_save_screen(void)
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, "dump.txt");
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Append to the file */
fff = my_fopen(buf, "w");
@@ -4050,9 +4027,6 @@ void do_cmd_knowledge(void)
int i;
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Enter "icky" mode */
character_icky = TRUE;
@@ -4218,9 +4192,6 @@ void do_cmd_knowledge(void)
*/
void do_cmd_checkquest(void)
{
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Enter "icky" mode */
character_icky = TRUE;
diff --git a/src/files.cc b/src/files.cc
index e0990984..cc168ba5 100644
--- a/src/files.cc
+++ b/src/files.cc
@@ -2557,9 +2557,6 @@ errr file_character(cptr name, bool_ full)
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, name);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Check for existing file */
fd = fd_open(buf, O_RDONLY);
@@ -3885,9 +3882,6 @@ void help_file_screenshot(cptr name)
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, name);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Append to the file */
htm = my_fopen(buf, "w");
@@ -3941,9 +3935,6 @@ void html_screenshot(cptr name)
/* Build the filename */
path_build(buf, 1024, ANGBAND_DIR_USER, name);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Append to the file */
htm = my_fopen(buf, "w");
@@ -4064,23 +4055,6 @@ void process_player_name(bool_ sf)
}
}
-
-#ifdef MACINTOSH
-
- /* Extract "useful" letters */
- for (i = 0; player_base[i]; i++)
- {
- char c = player_base[i];
-
- /* Convert "dot" to "underscore" */
- if (c == '@.') c = '_';
-
- /* Accept all the letters */
- tmp[k++] = c;
- }
-
-#else
-
/* Extract "useful" letters */
for (i = 0; player_base[i]; i++)
{
@@ -4093,8 +4067,6 @@ void process_player_name(bool_ sf)
else if (strchr("@. _", c)) tmp[k++] = '_';
}
-#endif
-
#if defined(WINDOWS)
diff --git a/src/h-config.h b/src/h-config.h
index fc2721ef..09e9bac8 100644
--- a/src/h-config.h
+++ b/src/h-config.h
@@ -20,13 +20,6 @@ extern "C" {
*/
/*
- * OPTION: Compile on a Macintosh (see "A-mac-h" or "A-mac-pch")
- */
-#ifndef MACINTOSH
-/* #define MACINTOSH */
-#endif
-
-/*
* OPTION: Compile on Windows (automatic)
*/
#ifndef WINDOWS
@@ -67,7 +60,7 @@ extern "C" {
* functions to extract user names and expand "tildes" in filenames.
* Basically, SET_UID should *only* be set for "Unix" machines.
*/
-#if !defined(MACINTOSH) && !defined(WINDOWS)
+#if !defined(WINDOWS)
# define SET_UID
#endif
@@ -81,29 +74,11 @@ extern "C" {
*/
#undef PATH_SEP
#define PATH_SEP "/"
-#ifdef MACINTOSH
-# undef PATH_SEP
-# define PATH_SEP ":"
-#endif
#if defined(WINDOWS) || defined(WINNT)
# undef PATH_SEP
# define PATH_SEP "\\"
#endif
-
-/*
- * The Macintosh allows the use of a "file type" when creating a file
- */
-#if defined(MACINTOSH) && !defined(applec)
-# define FILE_TYPE_TEXT 'TEXT'
-# define FILE_TYPE_DATA 'DATA'
-# define FILE_TYPE_SAVE 'SAVE'
-# define FILE_TYPE(X) (_ftype = (X))
-#else
-# define FILE_TYPE(X) ((void)0)
-#endif
-
-
#ifdef __cplusplus
} // extern "C"
#endif
diff --git a/src/h-system.h b/src/h-system.h
index f7759668..92041742 100644
--- a/src/h-system.h
+++ b/src/h-system.h
@@ -38,17 +38,11 @@
-#ifdef MACINTOSH
-# include <unix.h>
-#endif
-
#if defined(WINDOWS)
# include <io.h>
#endif
-#if !defined(MACINTOSH)
-# include <memory.h>
-#endif
+#include <memory.h>
# include <fcntl.h>
diff --git a/src/init2.cc b/src/init2.cc
index 0f646d75..338ebf10 100644
--- a/src/init2.cc
+++ b/src/init2.cc
@@ -1338,9 +1338,6 @@ void init_angband(void)
/* Failure */
if (fd < 0)
{
- /* File type is "DATA" */
- FILE_TYPE(FILE_TYPE_DATA);
-
/* Create a new high score file */
fd = fd_make(buf, mode);
diff --git a/src/loadsave.cc b/src/loadsave.cc
index 1fe550fd..1806d7c8 100644
--- a/src/loadsave.cc
+++ b/src/loadsave.cc
@@ -2888,9 +2888,6 @@ static bool_ save_player_aux(char *name)
/* No file yet */
fff = NULL;
- /* File type is "SAVE" */
- FILE_TYPE(FILE_TYPE_SAVE);
-
/* Create the savefile */
fd = fd_make(name, mode);
diff --git a/src/main.c b/src/main.c
index a20eb6b6..680e5c5a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,7 +25,7 @@
*/
-#if !defined(MACINTOSH) && !defined(WINDOWS)
+#if !defined(WINDOWS)
/*
diff --git a/src/notes.cc b/src/notes.cc
index d8b6a77f..326381c9 100644
--- a/src/notes.cc
+++ b/src/notes.cc
@@ -53,9 +53,6 @@ void output_note(char *final_note)
char basename[13];
char buf[1024];
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Hack -- extract first 8 characters of name and append an extension */
(void)strnfmt(basename, sizeof(basename), "%.8s.nte", player_base);
basename[sizeof(basename) - 1] = '\0';
diff --git a/src/squeltch.cc b/src/squeltch.cc
index 8e8c5b8f..bab1e5c0 100644
--- a/src/squeltch.cc
+++ b/src/squeltch.cc
@@ -185,9 +185,6 @@ static void automatizer_save_rules()
// Build the filename
path_build(buf, 1024, ANGBAND_DIR_USER, name);
- // File type is "TEXT"
- FILE_TYPE(FILE_TYPE_TEXT);
-
if (file_exist(buf))
{
c_put_str(TERM_WHITE, "File exists, continue?[y/n]",
diff --git a/src/util.cc b/src/util.cc
index 8971b97f..08af0658 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -363,17 +363,6 @@ errr my_fgets(FILE *fff, char *buf, huge n)
/*
-* The Macintosh is a little bit brain-dead sometimes
-*/
-#ifdef MACINTOSH
-# define open(N, F, M) \
-((M), open((char*)(N), F))
-# define write(F, B, S) \
-write(F, (char*)(B), S)
-#endif /* MACINTOSH */
-
-
-/*
* Several systems have no "O_BINARY" flag
*/
#ifndef O_BINARY
diff --git a/src/wizard1.cc b/src/wizard1.cc
index 6762da3f..616a46cd 100644
--- a/src/wizard1.cc
+++ b/src/wizard1.cc
@@ -383,9 +383,6 @@ static void spoil_obj_desc(cptr fname)
/* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Open the file */
fff = my_fopen(buf, "w");
@@ -1242,9 +1239,6 @@ static void spoil_artifact(cptr fname)
/* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Open the file */
fff = my_fopen(buf, "w");
@@ -1333,9 +1327,6 @@ static void spoil_mon_desc(cptr fname)
/* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Open the file */
fff = my_fopen(buf, "w");
@@ -1477,9 +1468,6 @@ static void spoil_mon_info(cptr fname)
/* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
/* Open the file */
fff = my_fopen(buf, "w");
@@ -2381,9 +2369,6 @@ static void spoil_spells(cptr fname)
/* Build the filename */
path_build(buf, sizeof(buf), ANGBAND_DIR_USER, fname);
- /* File type is "TEXT" */
- FILE_TYPE(FILE_TYPE_TEXT);
-
fff = my_fopen(buf, "w");
/* Oops */