From a165d9ee429f9230ed9275936500f8915e413cf7 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 1 May 2026 09:11:29 -0400 Subject: [PATCH] preprocessor macro: MAC -> MACOS9 --- include/config.h | 12 ++++++------ include/config1.h | 8 ++++---- include/dlb.h | 2 +- include/extern.h | 2 +- include/flag.h | 2 +- include/global.h | 2 +- include/optlist.h | 6 +++--- include/tcap.h | 2 +- include/winprocs.h | 6 +++--- include/wintty.h | 6 +++--- outdated/include/mac-carbon.h | 1 + outdated/include/mac-qt.h | 1 + outdated/include/mac-term.h | 1 + outdated/include/macconf.h | 6 +++--- outdated/include/system.h | 12 ++++++------ outdated/win/gem/wingem.c | 4 ++-- src/allmain.c | 2 +- src/cfgfiles.c | 8 ++++---- src/eat.c | 2 +- src/end.c | 2 +- src/files.c | 30 +++++++++++++++--------------- src/getpos.c | 4 ++-- src/mdlib.c | 4 ++-- src/options.c | 12 ++++++------ src/shknam.c | 2 +- src/windows.c | 12 ++++++------ util/dlb_main.c | 2 +- util/makedefs.c | 18 +++++++++--------- win/curses/cursmain.c | 2 +- win/share/tilemap.c | 2 +- win/tty/getline.c | 2 +- win/tty/wintty.c | 4 ++-- 32 files changed, 92 insertions(+), 89 deletions(-) diff --git a/include/config.h b/include/config.h index 6eacad389..f5a44b289 100644 --- a/include/config.h +++ b/include/config.h @@ -36,7 +36,7 @@ /* Hint: if you're not developing code, don't define ULTRIX_PROTO. */ -#include "config1.h" /* should auto-detect MSDOS, MAC, AMIGA, and WIN32 */ +#include "config1.h" /* should auto-detect MSDOS, MACOS9, AMIGA, and WIN32 */ /* * Consolidated version, patchlevel, development status. @@ -67,8 +67,8 @@ * tty, X11, mac, amii, BeOS, Qt, Gem, Gnome, shim */ -/* MAC also means MAC windows */ -#ifdef MAC +/* MACOS9 also means MAC windows */ +#ifdef MACOS9 #ifndef AUX #define DEFAULT_WINDOW_SYS "mac" #endif @@ -339,7 +339,7 @@ #define ENTRYMAX 100 /* must be >= 10 */ #endif #ifndef PERS_IS_UID -#if !defined(MICRO) && !defined(MAC) && !defined(WIN32) +#if !defined(MICRO) && !defined(MACOS9) && !defined(WIN32) #define PERS_IS_UID 1 /* delete for PERSMAX per name; now per uid */ #else #define PERS_IS_UID 0 @@ -434,7 +434,7 @@ */ #define INSURANCE /* allow crashed game recovery */ -#if !defined(MAC) && !defined(SHIM_GRAPHICS) +#if !defined(MACOS9) && !defined(SHIM_GRAPHICS) #define CHDIR /* delete if no chdir() available */ #endif @@ -533,7 +533,7 @@ typedef unsigned char uchar; #define MACRO_CPATH /* use clear_path macros instead of functions */ #endif -#if !defined(MAC) +#if !defined(MACOS9) #if !defined(NOCLIPPING) #define CLIPPING /* allow smaller screens -- ERS */ #endif diff --git a/include/config1.h b/include/config1.h index 402e0e73c..8048be9d6 100644 --- a/include/config1.h +++ b/include/config1.h @@ -45,23 +45,23 @@ #endif #ifdef macintosh /* Auto-defined symbol for MPW compilers (sc and mrc) */ -#define MAC +#define MACOS9 #endif #ifdef THINK_C /* Think C auto-defined symbol */ -#define MAC +#define MACOS9 #define NEED_VARARGS #endif #ifdef __MWERKS__ /* defined by Metrowerks' Codewarrior compiler */ #ifndef __BEOS__ /* BeOS */ -#define MAC +#define MACOS9 #endif #define NEED_VARARGS #define USE_STDARG #endif -#if defined(MAC) || defined(__BEOS__) +#if defined(MACOS9) || defined(__BEOS__) #define DLB #undef UNIX #endif diff --git a/include/dlb.h b/include/dlb.h index 2fff03046..654b8c344 100644 --- a/include/dlb.h +++ b/include/dlb.h @@ -9,7 +9,7 @@ #ifdef DLB /* implementations */ -#if defined(MAC) && !defined(MAC_CROSS) +#if defined(MACOS9) && !defined(MACOS9_CROSS) #define DLBRSRC /* use Mac resources */ #else #define DLBLIB /* use a set of external files */ diff --git a/include/extern.h b/include/extern.h index 0550b63b8..4843b3731 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1451,7 +1451,7 @@ extern boolean stumble_on_door_mimic(coordxy, coordxy); extern int doopen_indir(coordxy, coordxy); extern int doclose(void); -#ifdef MAC +#ifdef MACOS9 /* outdated functions removed */ /* ### macfile.c ### */ /* ### macmain.c ### */ diff --git a/include/flag.h b/include/flag.h index e125694b3..cd78d899e 100644 --- a/include/flag.h +++ b/include/flag.h @@ -501,7 +501,7 @@ struct instance_flags { #ifdef MAC_GRAPHICS_ENV #define large_font obsolete #endif -#ifdef MAC +#ifdef MACOS9 #define popup_dialog wc_popup_dialog #endif #define preload_tiles wc_preload_tiles diff --git a/include/global.h b/include/global.h index 47e783742..b4eb54dbc 100644 --- a/include/global.h +++ b/include/global.h @@ -185,7 +185,7 @@ typedef uchar nhsym; #ifdef AMIGA #define PORT_ID "Amiga" #endif -#ifdef MAC +#ifdef MACOS9 #define PORT_ID "Mac" #endif #ifdef __APPLE__ diff --git a/include/optlist.h b/include/optlist.h index e91fb0238..c8d7e4b47 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -357,7 +357,7 @@ static int optfn_##a(int, int, boolean, char *, char *); NHOPTB(herecmd_menu, Advanced, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias, &iflags.herecmd_menu, Term_False, "show commands available in this location") -#if defined(MAC) +#if defined(MACOS9) NHOPTC(hicolor, Advanced, 15, opt_in, set_in_config, No, Yes, No, No, NoAlias, "same as palette, only order is reversed") @@ -390,7 +390,7 @@ static int optfn_##a(int, int, boolean, char *, char *); NHOPTB(idlecheckpoint, Advanced, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias, &iflags.idlecheckpoint, Term_Off, "update checkpoint file if input is idle for 10 seconds") -#ifndef MAC +#ifndef MACOS9 NHOPTB(ignintr, Advanced, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias, &flags.ignintr, Term_False, "ignore interrupt signals") @@ -542,7 +542,7 @@ static int optfn_##a(int, int, boolean, char *, char *); No, Yes, No, No, NoAlias, "the inventory order of the items in your pack") #ifdef CHANGE_COLOR -#ifndef MAC /* not old Mac OS9 */ +#ifndef MACOS9 /* not old Mac OS9 */ NHOPTC(palette, Advanced, 15, opt_in, set_gameview, No, Yes, Yes, No, "hicolor", "palette (adjust an RGB color in palette (color/R-G-B)") diff --git a/include/tcap.h b/include/tcap.h index 896c00e6f..2142a0879 100644 --- a/include/tcap.h +++ b/include/tcap.h @@ -13,7 +13,7 @@ #endif /* might display need graphics code? */ -#if !defined(AMIGA) && !defined(TOS) && !defined(MAC) +#if !defined(AMIGA) && !defined(TOS) && !defined(MACOS9) #if defined(TERMLIB) || defined(OS2) || defined(MSDOS) #define ASCIIGRAPH #endif diff --git a/include/winprocs.h b/include/winprocs.h index a60a00c77..a3a03feb4 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -76,7 +76,7 @@ struct window_procs { void (*win_delay_output)(void); #ifdef CHANGE_COLOR void (*win_change_color)(int, long, int); -#ifdef MAC +#ifdef MACOS9 void (*win_change_background)(int); short (*win_set_font_name)(winid, char *); #endif @@ -162,7 +162,7 @@ extern #define nh_delay_output (*windowprocs.win_delay_output) #ifdef CHANGE_COLOR #define change_color (*windowprocs.win_change_color) -#ifdef MAC +#ifdef MACOS9 #define change_background (*windowprocs.win_change_background) #define set_font_name (*windowprocs.win_set_font_name) #endif @@ -394,7 +394,7 @@ struct chain_procs { void (*win_delay_output)(CARGS); #ifdef CHANGE_COLOR void (*win_change_color)(CARGS, int, long, int); -#ifdef MAC +#ifdef MACOS9 void (*win_change_background)(CARGS, int); short (*win_set_font_name)(CARGS, winid, char *); #endif diff --git a/include/wintty.h b/include/wintty.h index c0c5d842e..12cde1d0d 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -280,7 +280,7 @@ extern void tty_number_pad(int); extern void tty_delay_output(void); #ifdef CHANGE_COLOR extern void tty_change_color(int color, long rgb, int reverse); -#ifdef MAC +#ifdef MACOS9 extern void tty_change_background(int white_or_black); extern short set_tty_font_name(winid, char *); #endif @@ -331,7 +331,7 @@ extern char *tgetstr(const char *, char **); extern char *tgoto(const char *, int, int); #endif /* NO_TERMCAP_HEADERS */ #else /* ?NO_TERMS */ -#ifdef MAC +#ifdef MACOS9 #ifdef putchar #undef putchar #undef putc @@ -342,7 +342,7 @@ extern char *tgoto(const char *, int, int); extern int term_putc(int c); extern int term_flush(void *desc); extern int term_puts(const char *str); -#endif /* MAC */ +#endif /* MACOS9 */ #if defined(MSDOS) || defined(WIN32) #if defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST) || defined(WIN32) #undef putchar diff --git a/outdated/include/mac-carbon.h b/outdated/include/mac-carbon.h index b773c732f..570368710 100644 --- a/outdated/include/mac-carbon.h +++ b/outdated/include/mac-carbon.h @@ -21,6 +21,7 @@ * set "Prefix File" to include/mac-carbon.h */ +#define MACOS9 #define MAC #undef UNIX diff --git a/outdated/include/mac-qt.h b/outdated/include/mac-qt.h index 429106c92..48e5bef7a 100644 --- a/outdated/include/mac-qt.h +++ b/outdated/include/mac-qt.h @@ -22,6 +22,7 @@ */ #undef MAC +#undef MACOS9 #define UNIX #define BSD diff --git a/outdated/include/mac-term.h b/outdated/include/mac-term.h index 8bef72d0b..c827f59cf 100644 --- a/outdated/include/mac-term.h +++ b/outdated/include/mac-term.h @@ -23,6 +23,7 @@ /* Stuff needed for the core of NetHack */ #undef MAC +#undef MACOS9 #define UNIX #define BSD #define __FreeBSD__ /* Darwin is based on FreeBSD */ diff --git a/outdated/include/macconf.h b/outdated/include/macconf.h index fdde526c3..76b7548d8 100644 --- a/outdated/include/macconf.h +++ b/outdated/include/macconf.h @@ -3,7 +3,7 @@ /*-Copyright (c) Kevin Hugo, 2004. */ /* NetHack may be freely redistributed. See license for details. */ -#ifdef MAC +#ifdef MACOS9 #ifndef MACCONF_H #define MACCONF_H @@ -16,7 +16,7 @@ * __MWERKS__ Metrowerks' Codewarrior compiler * * We use these early in config.h to define some needed symbols, - * including MAC. + * including MACOS9. # # The Metrowerks compiler defines __STDC__ (which sets NHSTC) and uses # WIDENED_PROTOTYPES (defined if UNWIDENED_PROTOTYPES is undefined and @@ -123,4 +123,4 @@ extern void error(const char *, ...); #define MAC_GRAPHICS_ENV #endif /* ! MACCONF_H */ -#endif /* MAC */ +#endif /* MACOS9 */ diff --git a/outdated/include/system.h b/outdated/include/system.h index 2616b07f6..df5b81d5e 100644 --- a/outdated/include/system.h +++ b/outdated/include/system.h @@ -21,7 +21,7 @@ /* some old may not define off_t and size_t; if your system is * one of these, define them by hand below */ -#if (defined(VMS) && !defined(__GNUC__)) || defined(MAC) +#if (defined(VMS) && !defined(__GNUC__)) || defined(MACOS9) #include #else #ifndef AMIGA @@ -41,7 +41,7 @@ typedef unsigned int size_t; #endif #endif /* MICRO && !TOS */ -#if defined(__TURBOC__) || defined(MAC) +#if defined(__TURBOC__) || defined(MACOS9) #include /* time_t is not in */ #endif #if defined(ULTRIX) && !(defined(ULTRIX_PROTO) || defined(NHSTDC)) @@ -200,7 +200,7 @@ extern int unlink(const char *); #endif /* AZTEC_50 && __GNUC__ */ -#ifdef MAC +#ifdef MACOS9 #ifndef __CONDITIONALMACROS__ /* universal headers */ extern int close(int); /* unistd.h */ extern int read(int, char *, int); /* unistd.h */ @@ -313,7 +313,7 @@ extern long fork(void); /* The POSIX string.h is required to define all the mem* and str* functions */ #include #else -#if defined(SYSV) || defined(VMS) || defined(MAC) || defined(SUNOS4) +#if defined(SYSV) || defined(VMS) || defined(MACOS9) || defined(SUNOS4) #if defined(NHSTDC) || (defined(VMS) && !defined(ANCIENT_VAXC)) #if !defined(_AIX32) && !(defined(SUNOS4) && defined(__STDC__)) /* Solaris unbundled cc (acc) */ @@ -423,7 +423,7 @@ extern char *strncat(char *, const char *, size_t); extern char *strpbrk(const char *, const char *); #ifdef NOT_C99 -#if defined(SYSV) || defined(MICRO) || defined(MAC) || defined(VMS) \ +#if defined(SYSV) || defined(MICRO) || defined(MACOS9) || defined(VMS) \ || defined(HPUX) extern char *strchr(const char *, int); extern char *strrchr(const char *, int); @@ -435,7 +435,7 @@ extern char *rindex(const char *, int); extern int strcmp(const char *, const char *); extern int strncmp(const char *, const char *, size_t); -#if defined(MICRO) || defined(MAC) || defined(VMS) +#if defined(MICRO) || defined(MACOS9) || defined(VMS) extern size_t strlen(const char *); #else #ifdef HPUX diff --git a/outdated/win/gem/wingem.c b/outdated/win/gem/wingem.c index 078a2d2a7..b41991f93 100644 --- a/outdated/win/gem/wingem.c +++ b/outdated/win/gem/wingem.c @@ -63,7 +63,7 @@ struct window_procs Gem_procs = { Gem_getlin, Gem_get_ext_cmd, Gem_number_pad, Gem_delay_output, #ifdef CHANGE_COLOR /* the Mac uses a palette device */ Gem_change_color, -#ifdef MAC +#ifdef MACOS9 Gem_change_background, Gem_set_font_name, #endif Gem_get_color_string, @@ -76,7 +76,7 @@ struct window_procs Gem_procs = { genl_can_suspend_no, }; -#ifdef MAC +#ifdef MACOS9 void * Gem_change_background(dummy) int dummy; diff --git a/src/allmain.c b/src/allmain.c index 530840a1a..86f5b1db4 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -742,7 +742,7 @@ init_sound_disp_gamewindows(void) ever having been used, use it here to pacify the Qt interface */ start_menu(WIN_INVEN, menu_behavior), end_menu(WIN_INVEN, (char *) 0); -#ifdef MAC +#ifdef MACOS9 /* This _is_ the right place for this - maybe we will * have to split init_sound_disp_gamewindows into * create_gamewindows and show_gamewindows to get rid of this ifdef... diff --git a/src/cfgfiles.c b/src/cfgfiles.c index 2ba0c2fde..bdd6a4f37 100644 --- a/src/cfgfiles.c +++ b/src/cfgfiles.c @@ -9,7 +9,7 @@ #include "dlb.h" #include -#if (!defined(MAC) && !defined(O_WRONLY) && !defined(AZTEC_C)) \ +#if (!defined(MACOS9) && !defined(O_WRONLY) && !defined(AZTEC_C)) \ || defined(USE_FCNTL) #include #endif @@ -127,7 +127,7 @@ static const char *default_configfile = #ifdef UNIX ".nethackrc"; #else -#if defined(MAC) || defined(__BEOS__) +#if defined(MACOS9) || defined(__BEOS__) "NetHack Defaults"; #else #if defined(MSDOS) || defined(WIN32) @@ -276,7 +276,7 @@ fopen_config_file(const char *filename, int src) } /* fall through to standard names */ -#if defined(MICRO) || defined(MAC) || defined(__BEOS__) || defined(WIN32) +#if defined(MICRO) || defined(MACOS9) || defined(__BEOS__) || defined(WIN32) set_configfile_name(fqname(default_configfile, CONFIGPREFIX, 0)); if ((fp = fopen(configfile, "r")) != (FILE *) 0) { return fp; @@ -367,7 +367,7 @@ fopen_config_file(const char *filename, int src) wait_synch(); } #endif /* !VMS => Unix */ -#endif /* !(MICRO || MAC || __BEOS__ || WIN32) */ +#endif /* !(MICRO || MACOS9 || __BEOS__ || WIN32) */ return (FILE *) 0; } diff --git a/src/eat.c b/src/eat.c index 1b58c316f..9a93b212f 100644 --- a/src/eat.c +++ b/src/eat.c @@ -2176,7 +2176,7 @@ fprefx(struct obj *otmp) } else if (otmp->otyp == APPLE && otmp->cursed && !Sleep_resistance) { ; /* skip core joke; feedback deferred til fpostfx() */ -#if defined(MAC) || defined(MACOS) +#if defined(MACOS9) || defined(MACOS) /* KMH -- Why should Unix have all the fun? We check MACOS before UNIX to get the Apple-specific apple message; the '#if UNIX' code will still kick in for pear. */ diff --git a/src/end.c b/src/end.c index ff67412eb..c567fd716 100644 --- a/src/end.c +++ b/src/end.c @@ -1676,7 +1676,7 @@ nh_terminate(int status) program_state.in_moveloop = 0; /* won't be returning to normal play */ l_nhcore_call(NHCORE_GAME_EXIT); -#ifdef MAC +#ifdef MACOS9 getreturn("to exit"); #endif /* don't bother to try to release memory if we're in panic mode, to diff --git a/src/files.c b/src/files.c index ad9c62ef6..b0744126e 100644 --- a/src/files.c +++ b/src/files.c @@ -38,7 +38,7 @@ #include "wintty.h" /* more() */ #endif -#if (!defined(MAC) && !defined(O_WRONLY) && !defined(AZTEC_C)) \ +#if (!defined(MACOS9) && !defined(O_WRONLY) && !defined(AZTEC_C)) \ || defined(USE_FCNTL) #include #endif @@ -137,7 +137,7 @@ extern boolean get_user_home_folder(char *, size_t); #endif #endif -#ifdef MAC +#ifdef MACOS9 #undef unlink #define unlink macunlink #endif @@ -647,7 +647,7 @@ create_levelfile(int lev, char errbuf[]) nhfp->fd = open(fq_lock, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, FCMASK); #else -#ifdef MAC +#ifdef MACOS9 nhfp->fd = maccreat(fq_lock, LEVL_TYPE); #else nhfp->fd = creat(fq_lock, FCMASK); @@ -693,7 +693,7 @@ open_levelfile(int lev, char errbuf[]) nhfp->fpdef = (FILE *) 0; } if (nhfp && nhfp->structlevel) { -#ifdef MAC +#ifdef MACOS9 nhfp->fd = macopen(fq_lock, O_RDONLY | O_BINARY, LEVL_TYPE); #else nhfp->fd = open(fq_lock, O_RDONLY | O_BINARY, 0); @@ -876,12 +876,12 @@ create_bonesfile(d_level *lev, char **bonesid, char errbuf[]) O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, _SH_DENYRW, _S_IREAD | _S_IWRITE); #else /* ?MICRO || WIN32 */ -/* implies UNIX or MAC (MAC is for OS9 or earlier) */ -#ifdef MAC +/* implies UNIX or MACOS9 (MACOS9 is for OS9 or earlier) */ +#ifdef MACOS9 nhfp->fd = maccreat(file, BONE_TYPE); #else nhfp->fd = creat(file, FCMASK); -#endif /* ?MAC */ +#endif /* ?MACOS9 */ #endif /* ?MICRO || WIN32 */ if (nhfp->fd < 0) failed = errno; @@ -971,7 +971,7 @@ open_bonesfile(d_level *lev, char **bonesid) #endif } if (nhfp->structlevel) { -#if defined(MAC) +#if defined(MACOS9) nhfp->fd = macopen(fq_bones, O_RDONLY | O_BINARY, BONE_TYPE); #elif defined(WIN32) err = _sopen_s(&nhfp->fd, fq_bones, _O_RDONLY | _O_BINARY, @@ -1145,7 +1145,7 @@ set_error_savefile(void) } Strcat(gs.SAVEF, ".e;1"); #else -#ifdef MAC +#ifdef MACOS9 Strcat(gs.SAVEF, "-e"); #else Strcat(gs.SAVEF, ".e"); @@ -1184,8 +1184,8 @@ create_savefile(void) nhfp->fd = open(fq_save, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, FCMASK); #else /* !MICRO && !WIN32 */ -/* UNIX || MAC implied (MAC is OS9 or earlier only) */ -#ifdef MAC +/* UNIX || MACOS9 implied (MACOS9 is OS9 or earlier only) */ +#ifdef MACOS9 nhfp->fd = maccreat(fq_save, SAVE_TYPE); #else nhfp->fd = creat(fq_save, FCMASK); @@ -1240,7 +1240,7 @@ open_savefile(void) nhfp->fplog = fopen("open-savefile.log", "w"); #endif } -#ifdef MAC +#ifdef MACOS9 nhfp->fd = macopen(fq_save, O_RDONLY | O_BINARY, SAVE_TYPE); #else nhfp->fd = open(fq_save, O_RDONLY | O_BINARY, 0); @@ -2500,7 +2500,7 @@ fopen_wizkit_file(void) #endif } -#if defined(MICRO) || defined(MAC) || defined(__BEOS__) || defined(WIN32) +#if defined(MICRO) || defined(MACOS9) || defined(__BEOS__) || defined(WIN32) if ((fp = fopen(fqname(gw.wizkit, CONFIGPREFIX, 0), "r")) != (FILE *) 0) return fp; #else @@ -2779,13 +2779,13 @@ check_recordfile(const char *dir UNUSED_if_not_OS2_CODEVIEW) } #else /* MICRO || WIN32*/ -#ifdef MAC +#ifdef MACOS9 /* Create the "record" file, if necessary */ fq_record = fqname(RECORD, SCOREPREFIX, 0); fd = macopen(fq_record, O_RDWR | O_CREAT, TEXT_TYPE); if (fd != -1) macclose(fd); -#endif /* MAC */ +#endif /* MACOS9 */ #endif /* MICRO || WIN32*/ } diff --git a/src/getpos.c b/src/getpos.c index ed53d334b..653dc3cb2 100644 --- a/src/getpos.c +++ b/src/getpos.c @@ -852,7 +852,7 @@ getpos(coord *ccp, boolean force, const char *goal) #endif curs(WIN_MAP, cx, cy); flush_screen(0); -#ifdef MAC +#ifdef MACOS9 lock_mouse_cursor(TRUE); #endif lock_mouse_buttons(TRUE); @@ -1149,7 +1149,7 @@ getpos(coord *ccp, boolean force, const char *goal) flush_screen(0); } exitgetpos: -#ifdef MAC +#ifdef MACOS9 lock_mouse_cursor(FALSE); #endif lock_mouse_buttons(FALSE); diff --git a/src/mdlib.c b/src/mdlib.c index fb4155dab..ca7dad4f3 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -147,7 +147,7 @@ static struct win_information window_opts[] = { #ifdef GNOME_GRAPHICS /* unmaintained/defunct */ { "Gnome", "Gnome", TRUE }, #endif -#ifdef MAC /* defunct OS 9 interface */ +#ifdef MACOS9 /* defunct OS 9 interface */ { "mac", "Mac", TRUE }, #endif #ifdef AMIGA_INTUITION /* unmaintained/defunct */ @@ -533,7 +533,7 @@ static const char *const build_opts[] = { "screen clipping", #endif #ifdef NO_TERMS -#ifdef MAC +#ifdef MACOS9 "screen control via mactty", #endif #ifdef SCREEN_BIOS diff --git a/src/options.c b/src/options.c index 4a292e03c..0b4ecaa38 100644 --- a/src/options.c +++ b/src/options.c @@ -2730,7 +2730,7 @@ optfn_palette( } #if 0 -/* old MAC OS9 code */ +/* old MACOS9 OS9 code */ staticfn int optfn_palette( int optidx UNUSED, int req, boolean negated UNUSED, @@ -5107,7 +5107,7 @@ pfxfn_font(int optidx, int req, boolean negated, char *opts, char *op) if (opttype > 0 && (op = string_for_opt(opts, FALSE)) != empty_optstr) { wc_set_font_name(opttype, op); -#ifdef MAC +#ifdef MACOS9 set_font_name(opttype, op); #endif return optn_ok; @@ -6791,12 +6791,12 @@ complain_about_duplicate(int optidx) { char buf[BUFSZ]; -#ifdef MAC +#ifdef MACOS9 /* the Mac has trouble dealing with the output of messages while * processing the config file. That should get fixed one day. * For now just return. */ -#else /* !MAC */ +#else /* !MACOS9 */ buf[0] = '\0'; if (using_alias) Sprintf(buf, " (via alias: %s)", allopt[optidx].alias); @@ -6804,7 +6804,7 @@ complain_about_duplicate(int optidx) (allopt[optidx].opttyp == CompOpt) ? "compound" : "boolean", allopt[optidx].name, buf); -#endif /* ?MAC */ +#endif /* ?MACOS9 */ return; } @@ -9431,7 +9431,7 @@ static const char *opt_intro[] = { " NetHack Options Help:", "", #define CONFIG_SLOT 3 /* fill in next value at run-time */ (char *) 0, -#if !defined(MICRO) && !defined(MAC) +#if !defined(MICRO) && !defined(MACOS9) "or use `NETHACKOPTIONS=\"\"' in your environment", #endif "( is a list of options separated by commas)", diff --git a/src/shknam.c b/src/shknam.c index 657487ed8..f1ae9ea67 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -128,7 +128,7 @@ static const char *const shktools[] = { #ifdef WIN32 "Lexa", "Niod", #endif -#ifdef MAC +#ifdef MACOS9 "Nhoj-lee", "Evad\'kh", "Ettaw-noj", "Tsew-mot", "Ydna-s", "Yao-hang", "Tonbar", "Kivenhoug", "Llardom", #endif diff --git a/src/windows.c b/src/windows.c index a36b0eaa4..49e88ab60 100644 --- a/src/windows.c +++ b/src/windows.c @@ -22,7 +22,7 @@ extern struct window_procs Qt_procs; #ifdef GEM_GRAPHICS /*#include "wingem.h"*/ #endif -#ifdef MAC +#ifdef MACOS9 extern struct window_procs mac_procs; #endif #ifdef BEOS_GRAPHICS @@ -111,7 +111,7 @@ static struct win_choices { #ifdef GEM_GRAPHICS { &Gem_procs, win_Gem_init CHAINR(0) }, #endif -#ifdef MAC +#ifdef MACOS9 { &mac_procs, 0 CHAINR(0) }, #endif #ifdef BEOS_GRAPHICS @@ -543,7 +543,7 @@ staticfn void hup_cliparound(int, int); #endif #ifdef CHANGE_COLOR staticfn void hup_change_color(int, long, int); -#ifdef MAC +#ifdef MACOS9 staticfn short hup_set_font_name(winid, char *); #endif staticfn char *hup_get_color_string(void); @@ -592,7 +592,7 @@ static struct window_procs hup_procs = { hup_void_ndecl, /* nh_delay_output */ #ifdef CHANGE_COLOR hup_change_color, -#ifdef MAC +#ifdef MACOS9 hup_void_fdecl_int, /* change_background */ hup_set_font_name, #endif @@ -795,14 +795,14 @@ hup_change_color(int color UNUSED, long rgb UNUSED, int reverse UNUSED) return; } -#ifdef MAC +#ifdef MACOS9 /*ARGSUSED*/ staticfn short hup_set_font_name(winid window UNUSED, char *fontname UNUSED) { return 0; } -#endif /* MAC */ +#endif /* MACOS9 */ staticfn char * hup_get_color_string(void) diff --git a/util/dlb_main.c b/util/dlb_main.c index 1926b871d..ae92fbacb 100644 --- a/util/dlb_main.c +++ b/util/dlb_main.c @@ -9,7 +9,7 @@ #include "dlb.h" #include "hacklib.h" -#if !defined(O_WRONLY) && !defined(MAC) && !defined(AZTEC_C) +#if !defined(O_WRONLY) && !defined(MACOS9) && !defined(AZTEC_C) #include #endif #if defined(__DJGPP__) diff --git a/util/makedefs.c b/util/makedefs.c index 53c90c151..8037b14cc 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -23,15 +23,15 @@ #include "dlb.h" #include "hacklib.h" -#ifdef MAC +#ifdef MACOS9 #if defined(__SC__) || defined(__MRC__) /* MPW compilers */ #define MPWTOOL #include #include -#else /* MAC without MPWTOOL */ +#else /* MACOS9 without MPWTOOL */ #define MACsansMPWTOOL #endif -#endif /* MAC */ +#endif /* MACOS9 */ #ifndef MPWTOOL #define SpinCursor(x) @@ -78,7 +78,7 @@ #define DGN_TEMPLATE "NH:dat/%s" /* where dungeon.pdf file goes */ #endif /* OLD_MAKEDEFS_OPTIONS */ #else /* not AMIGA */ -#if defined(MAC) && !defined(__MACH__) +#if defined(MACOS9) && !defined(__MACH__) /* MacOS 9 or earlier */ #define SOURCE_TEMPLATE ":src:%s" #if __SC__ || __MRC__ @@ -91,7 +91,7 @@ #define INCLUDE_TEMPLATE ":include:%s" #define DGN_TEMPLATE ":dat:%s" /* where dungeon.pdf file goes */ #endif /* OLD_MAKEDEFS_OPTIONS */ -#else /* neither AMIGA nor MAC */ +#else /* neither AMIGA nor MACOS9 */ #ifdef OS2 #define SOURCE_TEMPLATE "..\\src\\%s" #define DATA_TEMPLATE "..\\dat\\%s" @@ -100,7 +100,7 @@ #define INCLUDE_TEMPLATE "..\\include\\%s" #define DGN_TEMPLATE "..\\dat\\%s" /* where dungeon.pdf file goes */ #endif /* OLD_MAKEDEFS_OPTIONS */ -#else /* not AMIGA, MAC, or OS2 */ +#else /* not AMIGA, MACOS9, or OS2 */ #define SOURCE_TEMPLATE "../src/%s" #define DATA_TEMPLATE "../dat/%s" #define DATA_IN_TEMPLATE "../dat/%s" @@ -109,7 +109,7 @@ #define DGN_TEMPLATE "../dat/%s" /* where dungeon.pdf file goes */ #endif /* OLD_MAKEDEFS_OPTIONS */ #endif /* else !OS2 */ -#endif /* else !MAC */ +#endif /* else !MACOS9 */ #endif /* else !AMIGA */ static const char @@ -257,7 +257,7 @@ main(void) return 0; } -#else /* ! MAC */ +#else /* ! MACOS9 */ DISABLE_WARNING_UNREACHABLE_CODE @@ -1551,7 +1551,7 @@ do_oracles(void) break; if (!(ok = (fscanf(ofp, "%5lx", &offset) == 1))) break; -#ifdef MAC +#ifdef MACOS9 #ifdef __MWERKS__ /* MetroWerks CodeWarrior Pro 1's (AKA CW12) version of MSL diff --git a/win/curses/cursmain.c b/win/curses/cursmain.c index 4d1923eda..a8019be94 100644 --- a/win/curses/cursmain.c +++ b/win/curses/cursmain.c @@ -122,7 +122,7 @@ struct window_procs curses_procs = { curses_delay_output, #ifdef CHANGE_COLOR curses_change_color, -#ifdef MAC /* old OS 9, not OSX */ +#ifdef MACOS9 /* old OS 9, not OSX */ (void (*)(int)) 0, (short (*)(winid, char *)) 0, #endif diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 41583dfa0..a9bd73ad4 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -541,7 +541,7 @@ tilename(int set, const int file_entry, int gend UNUSED) #define SOURCE_TEMPLATE "NH:src/%s" #define INCLUDE_TEMPLATE "NH:include/t.%s" #else -#ifdef MAC +#ifdef MACOS9 #define SOURCE_TEMPLATE ":src:%s" #define INCLUDE_TEMPLATE ":include:%s" #else diff --git a/win/tty/getline.c b/win/tty/getline.c index acb3f7f14..03744f322 100644 --- a/win/tty/getline.c +++ b/win/tty/getline.c @@ -7,7 +7,7 @@ #ifdef TTY_GRAPHICS -#if !defined(MAC) +#if !defined(MACOS9) #define NEWAUTOCOMP #endif diff --git a/win/tty/wintty.c b/win/tty/wintty.c index b2c6a5c42..21e0ed8b1 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -20,7 +20,7 @@ /* leave this undefined; it produces bad screen output with rxvt-unicode */ /*#define DECgraphicsOptimization*/ -#ifdef MAC +#ifdef MACOS9 #define MICRO /* The Mac is a MICRO only for this file, not in general! */ #ifdef THINK_C extern void msmsg(const char *, ...); @@ -143,7 +143,7 @@ struct window_procs tty_procs = { tty_getlin, tty_get_ext_cmd, tty_number_pad, tty_delay_output, #ifdef CHANGE_COLOR /* the Mac uses a palette device */ tty_change_color, -#ifdef MAC +#ifdef MACOS9 tty_change_background, set_tty_font_name, #endif tty_get_color_string,