From 6380314f06986829ab13c48bc625716408a9b3a6 Mon Sep 17 00:00:00 2001 From: Hourier Date: Sun, 26 Jan 2020 00:56:34 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20MAC=5FMPW=E3=81=AE?= =?utf8?q?=E3=83=97=E3=83=AA=E3=83=97=E3=83=AD=E3=82=92=E5=89=8A=E9=99=A4?= =?utf8?q?=20(CARBON=20=E3=81=A8=20MACH=5FO=5FCARBON=E3=81=AF=E4=BF=9D?= =?utf8?q?=E7=95=99)=20/=20Removed=20preprocessor=20MAC=5FMPW=20(holding?= =?utf8?q?=20CARBON=20and=20MACH=5FO=5FCARBON)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/h-config.h | 11 ----------- src/util.c | 13 +++---------- src/util.h | 6 +----- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/h-config.h b/src/h-config.h index 0f5d2af22..50d9d68fc 100644 --- a/src/h-config.h +++ b/src/h-config.h @@ -32,15 +32,6 @@ #endif /* - * Extract the "MAC_MPW" flag from the compiler - */ -#if defined(__SC__) || defined(__MRC__) -# ifndef MAC_MPW -# define MAC_MPW -# endif -#endif - -/* * OPTION: Compile on a HPUX version of UNIX */ #ifndef HPUX @@ -593,9 +584,7 @@ * Check the modification time of *_info.raw files * (by Keldon Jones) */ -#ifndef MAC_MPW #define CHECK_MODIFICATION_TIME -#endif /* * Use the new sorting routines for creation diff --git a/src/util.c b/src/util.c index 235a107d0..9677350ac 100644 --- a/src/util.c +++ b/src/util.c @@ -339,13 +339,6 @@ errr path_parse(char *buf, int max, concptr file) { /* Accept the filename */ (void)strnfmt(buf, max, "%s", file); - -#if defined(MAC_MPW) && defined(CARBON) - /* Fix it according to the current operating system */ - convert_pathname(buf); -#endif /* MAC_MPW && CARBON */ - - /* Success */ return 0; } @@ -442,14 +435,14 @@ FILE *my_fopen(concptr file, concptr mode) { char buf[1024]; -#if defined(MAC_MPW) || defined(MACH_O_CARBON) +#if defined(MACH_O_CARBON) FILE *tempfff; #endif /* Hack -- Try to parse the path */ if (path_parse(buf, 1024, file)) return (NULL); -#if defined(MAC_MPW) || defined(MACH_O_CARBON) +#if defined(MACH_O_CARBON) if (my_strchr(mode, 'w')) { /* setting file type/creator */ @@ -733,7 +726,7 @@ int fd_make(concptr file, BIT_FLAGS mode) /* Hack -- Try to parse the path */ if (path_parse(buf, 1024, file)) return -1; -#if defined(MAC_MPW) || defined(MACH_O_CARBON) +#if defined(MACH_O_CARBON) { int fdes; /* Create the file, fail if exists, write-only, binary */ diff --git a/src/util.h b/src/util.h index 81da40f3c..96224ca3e 100644 --- a/src/util.h +++ b/src/util.h @@ -310,15 +310,11 @@ extern void user_name(char *buf, int id); extern int usleep(huge usecs); #endif -#if defined(MAC_MPW) && defined(CARBON) -extern void convert_pathname(char *path); -#endif - #if defined(MACH_O_CARBON) extern void fsetfileinfo(concptr path, u32b fcreator, u32b ftype); #endif -#if defined(MAC_MPW) || defined(MACH_O_CARBON) +#if defined(MACH_O_CARBON) /* Globals needed */ extern u32b _ftype; extern u32b _fcreator; -- 2.11.0