From 31927cd2555bf99c2a6e59c67823daa60f0cea19 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Wed, 17 Feb 2021 11:35:33 -0800 Subject: [PATCH] Clean up missing include file when compiling for INIT (#359) * Compiling for INIT requires an extra include file vs normal. * Compiling for INIT often includes tracing which also requires additional includes --- src/bbtsub.c | 18 ++++++++++-------- src/binds.c | 2 +- src/bitblt.c | 6 +++++- src/findkey.c | 3 ++- src/gc.c | 2 +- src/gc2.c | 3 ++- src/gvar2.c | 2 +- src/return.c | 2 +- 8 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/bbtsub.c b/src/bbtsub.c index f0f7635..10f4f57 100644 --- a/src/bbtsub.c +++ b/src/bbtsub.c @@ -76,6 +76,16 @@ extern IOPAGE *IOPage68K; #include "display.h" #include "dbprint.h" +#ifdef INIT +#include "initkbddefs.h" +extern int kbd_for_makeinit; + +#define init_kbd_startup \ + if (!kbd_for_makeinit) { \ + init_keyboard(0); \ + kbd_for_makeinit = 1; \ + }; +#endif #if !defined(SUNDISPLAY) #include "devif.h" @@ -278,12 +288,6 @@ extern int ScreenLocked; /* for mouse tracking */ (SRCTYPE == INVERT_atom ? (OPERATION == ERASE_atom ? 0 : 1) /* SRCTYPE == INPUT, TEXTURE */ \ : (OPERATION == ERASE_atom ? 1 : 0)) -#define init_kbd_startup \ - if (!kbd_for_makeinit) { \ - init_keyboard(0); \ - kbd_for_makeinit = 1; \ - }; - extern struct pixrect *SrcePixRect, *DestPixRect, *TexturePixRect; extern struct pixrect *BlackTexturePixRect, *WhiteTexturePixRect; extern DLword TEXTURE_atom; @@ -294,8 +298,6 @@ extern DLword ERASE_atom; extern DLword PAINT_atom; extern DLword REPLACE_atom; -extern int kbd_for_makeinit; /*** FOR INIT ***/ - /************************************************************************/ /* */ /* b i t b l t s u b */ diff --git a/src/binds.c b/src/binds.c index 678df0b..74b1096 100644 --- a/src/binds.c +++ b/src/binds.c @@ -13,7 +13,7 @@ #include "lispemul.h" #include "lspglob.h" #include "emlglob.h" - +#include "testtooldefs.h" #include "bindsdefs.h" /************************************************** diff --git a/src/bitblt.c b/src/bitblt.c index ec193f1..a8843c2 100644 --- a/src/bitblt.c +++ b/src/bitblt.c @@ -41,6 +41,11 @@ #include "bitbltdefs.h" #include "initdspdefs.h" +#if defined(INIT) +#include "initkbddefs.h" +extern int kbd_for_makeinit; +#endif + #ifdef DOS #include "devif.h" #include "iopage.h" @@ -50,7 +55,6 @@ extern IOPAGE *IOPage68K; extern int LispWindowFd; extern int ScreenLocked; -extern int kbd_for_makeinit; #ifdef COLOR extern int MonoOrColor; diff --git a/src/findkey.c b/src/findkey.c index 6aabeb2..dbf01e1 100644 --- a/src/findkey.c +++ b/src/findkey.c @@ -10,13 +10,14 @@ #include "version.h" +#include #include "lispemul.h" #include "lispmap.h" #include "emlglob.h" #include "stack.h" #include "lspglob.h" #include "adr68k.h" - +#include "testtooldefs.h" #include "findkeydefs.h" /***********************************************************************/ diff --git a/src/gc.c b/src/gc.c index 1118f95..caaca1b 100644 --- a/src/gc.c +++ b/src/gc.c @@ -15,7 +15,7 @@ #include "lsptypes.h" #include "emlglob.h" #include "gcdata.h" - +#include "testtooldefs.h" #include "gcdefs.h" #include "gchtfinddefs.h" diff --git a/src/gc2.c b/src/gc2.c index 01ed20d..f0601fa 100644 --- a/src/gc2.c +++ b/src/gc2.c @@ -22,6 +22,7 @@ */ /**********************************************************************/ +#include #include "lispemul.h" #include "lispmap.h" #include "lsptypes.h" @@ -29,7 +30,7 @@ #include "emlglob.h" #include "address.h" #include "adr68k.h" - +#include "testtooldefs.h" #include "gc2defs.h" #include "gcscandefs.h" diff --git a/src/gvar2.c b/src/gvar2.c index 90ec8c0..fbf513f 100644 --- a/src/gvar2.c +++ b/src/gvar2.c @@ -18,7 +18,7 @@ #include "emlglob.h" #include "cell.h" #include "dbprint.h" - +#include "commondefs.h" #include "gvar2defs.h" #include "gchtfinddefs.h" diff --git a/src/return.c b/src/return.c index 3b114a4..c0ea0e8 100644 --- a/src/return.c +++ b/src/return.c @@ -39,7 +39,7 @@ #include "initatms.h" #include "cell.h" #include "return.h" - +#include "testtooldefs.h" #include "returndefs.h" #include "commondefs.h"