From 5c81ca3f4149bd341a652cf5164d5ad29b332799 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sun, 25 Dec 2022 12:18:30 -0800 Subject: [PATCH] Resolve warning: 'DOS' (and 'SUNDISPLAY') is not defined, evaluates to 0; use #ifdef/#if defined(...) --- src/bitblt.c | 6 +++--- src/initkbd.c | 2 +- src/xc.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bitblt.c b/src/bitblt.c index c0374f4..c95de6f 100644 --- a/src/bitblt.c +++ b/src/bitblt.c @@ -99,7 +99,7 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl, LispPTR tos) ScreenLocked = T; #endif /* DOS */ -#if SUNDISPLAY || DOS +#if defined(SUNDISPLAY) || defined(DOS) displayflg = cursorin(pbt->pbtdesthi, (pbt->pbtdestlo + (dx >> 4)), w, h, backwardflg) || cursorin(pbt->pbtsourcehi, (pbt->pbtsourcelo + (sx >> 4)), w, h, backwardflg); #endif /* SUNDISPLAY */ @@ -115,14 +115,14 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl, LispPTR tos) num_gray = ((TEXTUREBBT *)pbt)->pbtgrayheightlessone + 1; curr_gray_line = ((TEXTUREBBT *)pbt)->pbtgrayoffset; -#if DOS +#ifdef DOS if (displayflg) (currentdsp->mouse_invisible)(currentdsp, IOPage); ; #endif /* SUNDISPLAY / DOS */ new_bitblt_code; -#if DOS +#ifdef DOS flush_display_lineregion(dx, dstbase, w, h); if (displayflg) (currentdsp->mouse_visible)(IOPage->dlmousex, IOPage->dlmousey); #endif /* SUNDISPLAY / DOS */ diff --git a/src/initkbd.c b/src/initkbd.c index 846d9b1..e97962b 100644 --- a/src/initkbd.c +++ b/src/initkbd.c @@ -225,7 +225,7 @@ void init_keyboard(int flg) /* if 0 init else re-init */ /* ----------------------------------------------------------------*/ void device_before_exit(void) { -#if DOS +#ifdef DOS (currentmouse->device.exit)(currentmouse); (currentkbd->device.exit)(currentkbd); #endif /* SUNDISPLAY DOS*/ diff --git a/src/xc.c b/src/xc.c index e6133c2..6580d59 100644 --- a/src/xc.c +++ b/src/xc.c @@ -110,7 +110,7 @@ extern DspInterface currentdsp; typedef struct conspage ConsPage; typedef ByteCode *InstPtr; -#if (DOS && OPDISP) +#if defined(DOS) && defined(OPDISP) #include "inlndos.h" InstPtr pccache asm("si"); LispPTR *cspcache asm("di"); @@ -211,7 +211,7 @@ void dispatch(void) { } #endif -#if (DOS && OPDISP) +#if defined(DOS) && defined(OPDISP) #else LispPTR *cspcache; LispPTR tscache;