no quotes in WINDOWPORT macro invocation

This commit is contained in:
nhmall
2022-06-29 22:13:28 -04:00
parent eaa3b35fcf
commit a518d82c54
16 changed files with 51 additions and 51 deletions

View File

@@ -188,7 +188,7 @@ getlock(void)
#else /*SELF_RECOVER*/
if (recover_savefile()) {
#if defined(TTY_GRAPHICS)
if (WINDOWPORT("tty"))
if (WINDOWPORT(tty))
clear_screen(); /* display gets fouled up otherwise */
#endif
goto gotlock;

View File

@@ -316,7 +316,7 @@ void intron(void) /* enable kbd interupts if enabled when game started */
{
#ifdef TTY_GRAPHICS
/* Ugly hack to keep from changing tty modes for non-tty games -dlc */
if (WINDOWPORT("tty") && intr_char != nonesuch
if (WINDOWPORT(tty) && intr_char != nonesuch
&& curttyb2.intr_sym != '\003') {
curttyb2.intr_sym = '\003';
setctty();
@@ -328,7 +328,7 @@ void introff(void) /* disable kbd interrupts if required*/
{
#ifdef TTY_GRAPHICS
/* Ugly hack to keep from changing tty modes for non-tty games -dlc */
if (WINDOWPORT("tty") && curttyb2.intr_sym != nonesuch) {
if (WINDOWPORT(tty) && curttyb2.intr_sym != nonesuch) {
curttyb2.intr_sym = nonesuch;
setctty();
}
@@ -356,7 +356,7 @@ void
sco_mapon(void)
{
#ifdef TTY_GRAPHICS
if (WINDOWPORT("tty") && sco_flag_console) {
if (WINDOWPORT(tty) && sco_flag_console) {
if (sco_map_valid != -1) {
ioctl(0, LDSMAP, sco_chanmap_buf);
}
@@ -369,7 +369,7 @@ void
sco_mapoff(void)
{
#ifdef TTY_GRAPHICS
if (WINDOWPORT("tty") && sco_flag_console) {
if (WINDOWPORT(tty) && sco_flag_console) {
sco_map_valid = ioctl(0, LDGMAP, sco_chanmap_buf);
if (sco_map_valid != -1) {
ioctl(0, LDNMAP, (char *) 0);
@@ -390,7 +390,7 @@ void
init_sco_cons(void)
{
#ifdef TTY_GRAPHICS
if (WINDOWPORT("tty") && sco_flag_console) {
if (WINDOWPORT(tty) && sco_flag_console) {
atexit(sco_mapon);
sco_mapoff();
load_symset("IBMGraphics", PRIMARYSET);
@@ -420,7 +420,7 @@ void
linux_mapon(void)
{
#ifdef TTY_GRAPHICS
if (WINDOWPORT("tty") && linux_flag_console) {
if (WINDOWPORT(tty) && linux_flag_console) {
write(1, "\033(B", 3);
}
#endif
@@ -430,7 +430,7 @@ void
linux_mapoff(void)
{
#ifdef TTY_GRAPHICS
if (WINDOWPORT("tty") && linux_flag_console) {
if (WINDOWPORT(tty) && linux_flag_console) {
write(1, "\033(U", 3);
}
#endif
@@ -450,7 +450,7 @@ void
init_linux_cons(void)
{
#ifdef TTY_GRAPHICS
if (WINDOWPORT("tty") && linux_flag_console) {
if (WINDOWPORT(tty) && linux_flag_console) {
atexit(linux_mapon);
linux_mapoff();
#ifdef TEXTCOLOR

View File

@@ -1441,7 +1441,7 @@ cl_end(void)
void
raw_clear_screen(void)
{
if (WINDOWPORT("tty")) {
if (WINDOWPORT(tty)) {
cell_t * back = console.back_buffer;
cell_t * front = console.front_buffer;
COORD pos;

View File

@@ -541,14 +541,14 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
nethack_enter(argc, argv);
iflags.use_background_glyph = FALSE;
if (WINDOWPORT("mswin"))
if (WINDOWPORT(mswin))
iflags.use_background_glyph = TRUE;
if (WINDOWPORT("tty"))
if (WINDOWPORT(tty))
consoletty_open(1);
init_nhwindows(&argc, argv);
if (WINDOWPORT("tty"))
if (WINDOWPORT(tty))
toggle_mouse_support();
if (g.symset[PRIMARYSET].handling
@@ -569,7 +569,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
#endif /* TERMLIB || CURSES */
#if 0
#ifdef CURSES_GRAPHICS
if (WINDOWPORT("curses"))
if (WINDOWPORT(curses))
(*cursesgraphics_mode_callback)();
#endif
#endif
@@ -893,7 +893,7 @@ safe_routines(void)
* Get a set of valid safe windowport function
* pointers during early startup initialization.
*/
if (!WINDOWPORT("safe-startup"))
if (!WINDOWPORT(safe-startup))
windowprocs = *get_safe_procs(1);
if (!GUILaunched)
windowprocs.win_nhgetch = windows_console_custom_nhgetch;
@@ -1148,7 +1148,7 @@ getlock(void)
const char *fq_lock;
#define OOPS_BUFSZ 512
char oops[OOPS_BUFSZ];
boolean istty = WINDOWPORT("tty");
boolean istty = WINDOWPORT(tty);
/* we ignore QUIT and INT at this point */
if (!lock_file(HLOCK, LOCKPREFIX, 10)) {
@@ -1179,7 +1179,7 @@ getlock(void)
(void) nhclose(fd);
if (WINDOWPORT("tty"))
if (WINDOWPORT(tty))
prompt_result = tty_self_recover_prompt();
else
prompt_result = other_self_recover_prompt();
@@ -1316,7 +1316,7 @@ tty_self_recover_prompt(void)
c = 'n';
ct = 0;
saved_procs = windowprocs;
if (!WINDOWPORT("safe-startup"))
if (!WINDOWPORT(safe-startup))
windowprocs = *get_safe_procs(2); /* arg 2 uses no-newline variant */
windowprocs.win_nhgetch = windows_console_custom_nhgetch;
raw_print("\n");
@@ -1376,13 +1376,13 @@ int
other_self_recover_prompt(void)
{
register int c, ci, ct, pl, retval = 0;
boolean ismswin = WINDOWPORT("mswin"),
iscurses = WINDOWPORT("curses");
boolean ismswin = WINDOWPORT(mswin),
iscurses = WINDOWPORT(curses);
pl = 1;
c = 'n';
ct = 0;
if (iflags.window_inited || WINDOWPORT("curses")) {
if (iflags.window_inited || WINDOWPORT(curses)) {
c = yn("There are files from a game in progress under your name. "
"Recover?");
} else {

View File

@@ -201,7 +201,7 @@ VA_DECL(const char *, s)
/* error() may get called before tty is initialized */
if (iflags.window_inited)
end_screen();
if (WINDOWPORT("tty")) {
if (WINDOWPORT(tty)) {
buf[0] = '\n';
(void) vsnprintf(&buf[1], sizeof buf - (1 + sizeof "\n"), s, VA_ARGS);
Strcat(buf, "\n");
@@ -228,12 +228,12 @@ win32_abort(void)
{
int c;
if (WINDOWPORT("mswin") || WINDOWPORT("tty")) {
if (WINDOWPORT(mswin) || WINDOWPORT(tty)) {
if (iflags.window_inited)
exit_nhwindows((char *) 0);
iflags.window_inited = FALSE;
}
if (!WINDOWPORT("mswin") && !WINDOWPORT("safe-startup"))
if (!WINDOWPORT(mswin) && !WINDOWPORT(safe-startup))
safe_routines();
if (wizard) {
raw_print("Execute debug breakpoint wizard?");
@@ -482,7 +482,7 @@ getreturn(const char *str)
in_getreturn = TRUE;
Sprintf(buf,"Hit <Enter> %s.", str);
raw_print(buf);
if (WINDOWPORT("tty"))
if (WINDOWPORT(tty))
windows_console_custom_nhgetch();
wait_synch();
in_getreturn = FALSE;
@@ -493,7 +493,7 @@ getreturn(const char *str)
initializing the window port */
void nethack_enter_windows(void)
{
if (WINDOWPORT("tty"))
if (WINDOWPORT(tty))
nethack_enter_consoletty();
}