no quotes in WINDOWPORT macro invocation
This commit is contained in:
@@ -195,7 +195,7 @@ void
|
||||
sanitize_name(char *namebuf)
|
||||
{
|
||||
int c;
|
||||
boolean strip_8th_bit = (WINDOWPORT("tty")
|
||||
boolean strip_8th_bit = (WINDOWPORT(tty)
|
||||
&& !iflags.wc_eight_bit_input);
|
||||
|
||||
/* it's tempting to skip this for single-user platforms, since
|
||||
|
||||
@@ -1532,7 +1532,7 @@ wiz_show_wmodes(void)
|
||||
int x, y;
|
||||
char row[COLNO + 1];
|
||||
struct rm *lev;
|
||||
boolean istty = WINDOWPORT("tty");
|
||||
boolean istty = WINDOWPORT(tty);
|
||||
|
||||
win = create_nhwindow(NHW_TEXT);
|
||||
if (istty)
|
||||
|
||||
@@ -110,7 +110,7 @@ panictrace_handler(int sig_unused UNUSED)
|
||||
int f2;
|
||||
|
||||
#ifdef CURSES_GRAPHICS
|
||||
if (iflags.window_inited && WINDOWPORT("curses")) {
|
||||
if (iflags.window_inited && WINDOWPORT(curses)) {
|
||||
extern void curses_uncurse_terminal(void); /* wincurs.h */
|
||||
|
||||
/* it is risky calling this during a program-terminating signal,
|
||||
|
||||
@@ -1361,7 +1361,7 @@ docompress_file(const char *filename, boolean uncomp)
|
||||
int f;
|
||||
unsigned ln;
|
||||
#ifdef TTY_GRAPHICS
|
||||
boolean istty = WINDOWPORT("tty");
|
||||
boolean istty = WINDOWPORT(tty);
|
||||
#endif
|
||||
|
||||
#ifdef COMPRESS_EXTENSION
|
||||
|
||||
@@ -2441,7 +2441,7 @@ update_inventory(void)
|
||||
save_suppress_price = iflags.suppress_price;
|
||||
iflags.suppress_price = 0;
|
||||
#if defined(TTY_PERM_INVENT) && defined(CORE_INVENT)
|
||||
if (WINDOWPORT("tty"))
|
||||
if (WINDOWPORT(tty))
|
||||
sync_perminvent();
|
||||
else
|
||||
#else
|
||||
@@ -5407,7 +5407,7 @@ sync_perminvent(void)
|
||||
* FALSE without actually doing anything else.
|
||||
*/
|
||||
#ifdef TTY_PERM_INVENT
|
||||
if (WINDOWPORT("tty"))
|
||||
if (WINDOWPORT(tty))
|
||||
perm_invent_toggled(TRUE); /* TRUE means negated */
|
||||
#endif
|
||||
(void) doredraw();
|
||||
@@ -5443,7 +5443,7 @@ sync_perminvent(void)
|
||||
* [port]_update_inventory() mechanism.
|
||||
*/
|
||||
|
||||
if (WINDOWPORT("tty") && iflags.perm_invent)
|
||||
if (WINDOWPORT(tty) && iflags.perm_invent)
|
||||
wport_id = "tty perm_invent";
|
||||
else
|
||||
wport_id = "perm_invent";
|
||||
|
||||
@@ -2063,7 +2063,7 @@ optfn_msg_window(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
opts[0] = '\0';
|
||||
#if PREV_MSGS
|
||||
tmp = iflags.prevmsg_window;
|
||||
if (WINDOWPORT("curses")) {
|
||||
if (WINDOWPORT(curses)) {
|
||||
if (tmp == 's' || tmp == 'c')
|
||||
tmp = iflags.prevmsg_window = 'r';
|
||||
}
|
||||
@@ -2492,7 +2492,7 @@ optfn_petattr(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
return optn_err;
|
||||
|
||||
#ifdef CURSES_GRAPHICS
|
||||
if (WINDOWPORT("curses")) {
|
||||
if (WINDOWPORT(curses)) {
|
||||
char tmpbuf[QBUFSZ];
|
||||
|
||||
Strcpy(opts, curses_fmt_attrs(tmpbuf));
|
||||
@@ -4408,7 +4408,7 @@ optfn_boolean(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
perm_invent_toggled() and routines it calls don't check
|
||||
iflags.perm_invent so it doesn't matter that 'SET IT HERE'
|
||||
hasn't been executed yet */
|
||||
if (WINDOWPORT("tty") && !g.opt_initial && !negated) {
|
||||
if (WINDOWPORT(tty) && !g.opt_initial && !negated) {
|
||||
perm_invent_toggled(FALSE);
|
||||
/* perm_invent_toggled()
|
||||
-> sync_perminvent()
|
||||
@@ -4498,7 +4498,7 @@ optfn_boolean(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
break;
|
||||
case opt_hilite_pet:
|
||||
#ifdef CURSES_GRAPHICS
|
||||
if (WINDOWPORT("curses")) {
|
||||
if (WINDOWPORT(curses)) {
|
||||
/* if we're enabling hilite_pet and petattr isn't set,
|
||||
set it to Inverse; if we're disabling, leave petattr
|
||||
alone so that re-enabling will get current value back
|
||||
@@ -4515,7 +4515,7 @@ optfn_boolean(int optidx, int req, boolean negated, char *opts, char *op)
|
||||
status_initialize(REASSESS_ONLY);
|
||||
g.opt_need_redraw = TRUE;
|
||||
#ifdef QT_GRAPHICS
|
||||
} else if (WINDOWPORT("Qt")) {
|
||||
} else if (WINDOWPORT(Qt)) {
|
||||
/* Qt doesn't support HILITE_STATUS or FLUSH_STATUS so fails
|
||||
VIA_WINDOWPORT(), but it does support WC2_HITPOINTBAR */
|
||||
g.context.botlx = TRUE;
|
||||
@@ -4877,7 +4877,7 @@ handler_msg_window(void)
|
||||
#if PREV_MSGS /* tty or curses */
|
||||
winid tmpwin;
|
||||
anything any;
|
||||
boolean is_tty = WINDOWPORT("tty"), is_curses = WINDOWPORT("curses");
|
||||
boolean is_tty = WINDOWPORT(tty), is_curses = WINDOWPORT(curses);
|
||||
int clr = 0;
|
||||
|
||||
if (is_tty || is_curses) {
|
||||
@@ -6304,7 +6304,7 @@ initoptions_finish(void)
|
||||
* Option processing can take place before a user-decided WindowPort
|
||||
* is even initialized, so check for that too.
|
||||
*/
|
||||
if (!WINDOWPORT("safe-startup")) {
|
||||
if (!WINDOWPORT(safe-startup)) {
|
||||
if (iflags.hilite_delta && !wc2_supported("statushilites")) {
|
||||
raw_printf("Status highlighting not supported for %s interface.",
|
||||
windowprocs.name);
|
||||
@@ -8956,7 +8956,7 @@ enhance_menu_text(
|
||||
availsz = sz - nowsz;
|
||||
|
||||
#ifdef TTY_PERM_INVENT
|
||||
if (bool_p == &iflags.perm_invent && WINDOWPORT("tty")) {
|
||||
if (bool_p == &iflags.perm_invent && WINDOWPORT(tty)) {
|
||||
if (thisopt->setwhere == set_gameview)
|
||||
Snprintf(eos(buf), availsz, " *terminal size is too small");
|
||||
}
|
||||
|
||||
@@ -788,7 +788,7 @@ dorecover(NHFILE* nhfp)
|
||||
#ifdef AMII_GRAPHICS
|
||||
{
|
||||
extern struct window_procs amii_procs;
|
||||
if (WINDOWPORT("amii")) {
|
||||
if (WINDOWPORT(amii)) {
|
||||
extern winid WIN_BASE;
|
||||
clear_nhwindow(WIN_BASE); /* hack until there's a hook for this */
|
||||
}
|
||||
@@ -804,7 +804,7 @@ dorecover(NHFILE* nhfp)
|
||||
curs(WIN_MAP, 1, 1);
|
||||
dotcnt = 0;
|
||||
dotrow = 2;
|
||||
if (!WINDOWPORT("X11"))
|
||||
if (!WINDOWPORT(X11))
|
||||
putstr(WIN_MAP, 0, "Restoring:");
|
||||
#endif
|
||||
restoreinfo.mread_flags = 1; /* return despite error */
|
||||
@@ -821,7 +821,7 @@ dorecover(NHFILE* nhfp)
|
||||
dotrow++;
|
||||
dotcnt = 0;
|
||||
}
|
||||
if (!WINDOWPORT("X11")) {
|
||||
if (!WINDOWPORT(X11)) {
|
||||
putstr(WIN_MAP, 0, ".");
|
||||
}
|
||||
mark_synch();
|
||||
|
||||
@@ -149,7 +149,7 @@ dosave0(void)
|
||||
dotcnt = 0;
|
||||
dotrow = 2;
|
||||
curs(WIN_MAP, 1, 1);
|
||||
if (!WINDOWPORT("X11"))
|
||||
if (!WINDOWPORT(X11))
|
||||
putstr(WIN_MAP, 0, "Saving:");
|
||||
#endif
|
||||
nhfp->mode = WRITING | FREEING;
|
||||
@@ -197,7 +197,7 @@ dosave0(void)
|
||||
dotrow++;
|
||||
dotcnt = 0;
|
||||
}
|
||||
if (!WINDOWPORT("X11")) {
|
||||
if (!WINDOWPORT(X11)) {
|
||||
putstr(WIN_MAP, 0, ".");
|
||||
}
|
||||
mark_synch();
|
||||
|
||||
@@ -1516,16 +1516,16 @@ maybe_play_sound(const char* msg)
|
||||
&& !iflags.vt_sounddata
|
||||
#endif
|
||||
#if defined(QT_GRAPHICS)
|
||||
&& WINDOWPORT("Qt")
|
||||
&& WINDOWPORT(Qt)
|
||||
#endif
|
||||
#if defined(WIN32)
|
||||
&& (WINDOWPORT("tty") || WINDOWPORT("mswin") || WINDOWPORT("curses"))
|
||||
&& (WINDOWPORT(tty) || WINDOWPORT(mswin) || WINDOWPORT(curses))
|
||||
#endif
|
||||
#endif /* WIN32 || QT_GRAPHICS */
|
||||
)
|
||||
play_usersound(snd->filename, snd->volume);
|
||||
#if defined(TTY_GRAPHICS) && defined(TTY_SOUND_ESCCODES)
|
||||
else if (snd && iflags.vt_sounddata && snd->idx >= 0 && WINDOWPORT("tty"))
|
||||
else if (snd && iflags.vt_sounddata && snd->idx >= 0 && WINDOWPORT(tty))
|
||||
play_usersound_via_idx(snd->idx, snd->volume);
|
||||
#endif /* TTY_GRAPHICS && TTY_SOUND_ESCCODES */
|
||||
#endif /* WIN32 || QT_GRAPHICS || TTY_SOUND_ESCCODES */
|
||||
|
||||
@@ -312,7 +312,7 @@ choose_windows(const char *s)
|
||||
free((genericptr_t) tmps) /*, tmps = 0*/ ;
|
||||
|
||||
if (windowprocs.win_raw_print == def_raw_print
|
||||
|| WINDOWPORT("safe-startup"))
|
||||
|| WINDOWPORT(safe-startup))
|
||||
nh_terminate(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user