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