change NetHack's MACOSX references to MACOS
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
* Mac Stuff.
|
||||
*/
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#define MACOSX
|
||||
#define MACOS
|
||||
#endif
|
||||
|
||||
#ifdef macintosh /* Auto-defined symbol for MPW compilers (sc and mrc) */
|
||||
|
||||
@@ -424,7 +424,7 @@ struct savefile_info {
|
||||
#if defined(__linux__) && defined(__GLIBC__) && (__GLIBC__ >= 2)
|
||||
#define PANICTRACE_LIBC
|
||||
#endif
|
||||
#if defined(MACOSX)
|
||||
#if defined(MACOS)
|
||||
#define PANICTRACE_LIBC
|
||||
#endif
|
||||
#ifdef UNIX
|
||||
|
||||
@@ -91,13 +91,13 @@ E int srandom(unsigned int);
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if defined(MACOSX)
|
||||
#if defined(MACOS)
|
||||
E long lrand48(void);
|
||||
E void srand48(long);
|
||||
#else
|
||||
extern long lrand48(void);
|
||||
extern void srand48(long);
|
||||
#endif /* MACOSX */
|
||||
#endif /* MACOS */
|
||||
#endif /* BSD || ULTRIX || RANDOM */
|
||||
|
||||
#if !defined(BSD) || defined(ultrix)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
*/
|
||||
/* #define TIMED_DELAY */ /* usleep() */
|
||||
#endif
|
||||
#if defined(MACOSX) && !defined(TIMED_DELAY)
|
||||
#if defined(MACOS) && !defined(TIMED_DELAY)
|
||||
#define TIMED_DELAY
|
||||
#endif
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
/* the high quality random number routines */
|
||||
#ifndef USE_ISAAC64
|
||||
# if defined(BSD) || defined(LINUX) || defined(ULTRIX) || defined(CYGWIN32) \
|
||||
|| defined(RANDOM) || defined(MACOSX)
|
||||
|| defined(RANDOM) || defined(MACOS)
|
||||
# define Rand() random()
|
||||
# else
|
||||
# define Rand() lrand48()
|
||||
@@ -392,7 +392,7 @@
|
||||
#endif /* LINUX */
|
||||
#endif /* GNOME_GRAPHICS */
|
||||
|
||||
#if defined(MACOSX) && !defined(LIBNH)
|
||||
#if defined(MACOS) && !defined(LIBNH)
|
||||
# define RUNTIME_PASTEBUF_SUPPORT
|
||||
#endif
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
#ifdef LINUX
|
||||
# define DEV_RANDOM "/dev/urandom"
|
||||
#else
|
||||
# if defined(BSD) || defined(MACOSX)
|
||||
# if defined(BSD) || defined(MACOS)
|
||||
# define DEV_RANDOM "/dev/random"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -1871,9 +1871,9 @@ fprefx(struct obj *otmp)
|
||||
} else if (otmp->otyp == APPLE && otmp->cursed && !Sleep_resistance) {
|
||||
; /* skip core joke; feedback deferred til fpostfx() */
|
||||
|
||||
#if defined(MAC) || defined(MACOSX)
|
||||
#if defined(MAC) || defined(MACOS)
|
||||
/* KMH -- Why should Unix have all the fun?
|
||||
We check MACOSX before UNIX to get the Apple-specific apple
|
||||
We check MACOS before UNIX to get the Apple-specific apple
|
||||
message; the '#if UNIX' code will still kick in for pear. */
|
||||
} else if (otmp->otyp == APPLE) {
|
||||
pline("Delicious! Must be a Macintosh!");
|
||||
|
||||
@@ -122,7 +122,7 @@ NetHackQtBind::NetHackQtBind(int& argc, char** argv) :
|
||||
QString qvers = version_string(cvers);
|
||||
QCoreApplication::setApplicationVersion(qvers);
|
||||
}
|
||||
#ifdef MACOSX
|
||||
#ifdef MACOS
|
||||
/* without this, neither control+x nor option+x do anything;
|
||||
with it, control+x is ^X and option+x still does nothing */
|
||||
QCoreApplication::setAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
|
||||
|
||||
@@ -534,10 +534,10 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
||||
setWindowTitle("NetHack-Qt");
|
||||
setWindowIcon(QIcon(QPixmap(qt_compact_mode ? nh_icon_small : nh_icon)));
|
||||
|
||||
#ifdef MACOSX
|
||||
#ifdef MACOS
|
||||
/*
|
||||
* OSX Note:
|
||||
* The toolbar on OSX starts with a system menu labeled with the
|
||||
* MacOS Note:
|
||||
* The toolbar on MacOS starts with a system menu labeled with the
|
||||
* Apple logo and an application menu labeled with the application's
|
||||
* name (taken from Info.plist if present, otherwise the base name
|
||||
* of the running program). After that, application-specific menus
|
||||
@@ -585,7 +585,7 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
||||
{ game, "History", 3, dohistory},
|
||||
{ game, "Redraw", 0, doredraw}, // useless
|
||||
{ game,
|
||||
#ifdef MACOSX
|
||||
#ifdef MACOS
|
||||
/* Qt on OSX would rename "Options" to "Preferences..." and
|
||||
move it from intended destination to the application menu;
|
||||
the ampersand produces &O which makes Alt+O into a keyboard
|
||||
@@ -597,7 +597,7 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
||||
{ game, 0, 3},
|
||||
{ game, "Save-and-exit", 3, dosave},
|
||||
{ game,
|
||||
#ifdef MACOSX
|
||||
#ifdef MACOS
|
||||
/* need something to prevent matching leading "quit" so that it
|
||||
isn't hijacked for the application menu; the ampersand is to
|
||||
make &Q be a keyboard shortcut (but see Options above) */
|
||||
@@ -687,7 +687,7 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
||||
};
|
||||
|
||||
QAction *actn;
|
||||
#ifndef MACOSX
|
||||
#ifndef MACOS
|
||||
(void) game->addAction("Qt settings...", this, SLOT(doQtSettings(bool)));
|
||||
#else
|
||||
/* on OSX, put this in the application menu instead of the game menu;
|
||||
@@ -707,7 +707,7 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
||||
#endif
|
||||
|
||||
actn = help->addAction("About NetHack-Qt", this, SLOT(doAbout(bool)));
|
||||
#ifdef MACOSX
|
||||
#ifdef MACOS
|
||||
actn->setMenuRole(QWidgetAction::AboutRole);
|
||||
/* for OSX, the preceding "About" went into the application menu;
|
||||
now add another duplicate one to the Help dropdown menu */
|
||||
@@ -793,7 +793,7 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
||||
info->setTitle("Info");
|
||||
menubar->addMenu(info);
|
||||
menubar->addSeparator();
|
||||
#ifndef MACOSX
|
||||
#ifndef MACOS
|
||||
help->setTitle("Help");
|
||||
#else
|
||||
// On OSX, an entry in the menubar called "Help" will get an
|
||||
@@ -1021,7 +1021,7 @@ void NetHackQtMainWindow::doQuit(bool)
|
||||
// either one, other implementations only have that other one (plus
|
||||
// nethack's #quit command itself) but this routine is unconditional
|
||||
// in case someone wants to change that
|
||||
#ifdef MACOSX
|
||||
#ifdef MACOS
|
||||
QString info;
|
||||
info.sprintf("This will end your NetHack session.%s",
|
||||
!g.program_state.something_worth_saving ? ""
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define DYNAMIC_STATUSLINES
|
||||
|
||||
// NetHackQtBind::notify() doesn't see ^V on OSX
|
||||
#ifdef MACOSX
|
||||
#ifdef MACOS
|
||||
#define CTRL_V_HACK
|
||||
#endif
|
||||
|
||||
|
||||
@@ -578,7 +578,7 @@ get_window_frame_extents(Widget w,
|
||||
/*
|
||||
* FIXME!
|
||||
*/
|
||||
#ifdef MACOSX
|
||||
#ifdef MACOS
|
||||
/*
|
||||
* Default window manager doesn't support _NET_FRAME_EXTENTS.
|
||||
* Without this position tweak, the persistent inventory window
|
||||
|
||||
Reference in New Issue
Block a user