From c5d8ab1985b6c9e1e3184f353ccbd196506ca5f8 Mon Sep 17 00:00:00 2001 From: Ingo Paschke Date: Mon, 11 May 2026 16:49:11 +0200 Subject: [PATCH] Amiga: collapse #ifndef CROSS_TO_AMIGA include forks Every #include block had a paired NH: assign path for native builds. Only the cross-compile path is built now. --- sys/amiga/amiwind.c | 10 ---------- sys/amiga/winamenu.c | 6 ------ sys/amiga/winami.c | 10 ---------- sys/amiga/winchar.c | 11 ----------- sys/amiga/winfuncs.c | 10 ---------- sys/amiga/winkey.c | 6 ------ sys/amiga/winreq.c | 14 -------------- sys/amiga/winstr.c | 6 ------ 8 files changed, 73 deletions(-) diff --git a/sys/amiga/amiwind.c b/sys/amiga/amiwind.c index 705cb88e9..5ad6cb503 100644 --- a/sys/amiga/amiwind.c +++ b/sys/amiga/amiwind.c @@ -3,15 +3,9 @@ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */ /* NetHack may be freely redistributed. See license for details. */ -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/windefs.h" -#include "NH:sys/amiga/winext.h" -#include "NH:sys/amiga/winproto.h" -#else #include "windefs.h" #include "winext.h" #include "winproto.h" -#endif /* Have to undef CLOSE as display.h and intuition.h both use it */ #undef CLOSE @@ -38,11 +32,7 @@ struct Library *GadToolsBase = NULL; struct Library *LayersBase = NULL; struct Library *AslBase = NULL; -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/amimenu.c" -#else #include "amimenu.c" -#endif /* Now our own variables */ diff --git a/sys/amiga/winamenu.c b/sys/amiga/winamenu.c index 5ab2d7af8..2c53563b8 100644 --- a/sys/amiga/winamenu.c +++ b/sys/amiga/winamenu.c @@ -3,15 +3,9 @@ */ /* NetHack may be freely redistributed. See license for details. */ -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/windefs.h" -#include "NH:sys/amiga/winext.h" -#include "NH:sys/amiga/winproto.h" -#else #include "windefs.h" #include "winext.h" #include "winproto.h" -#endif /* Start building the text for a menu */ void diff --git a/sys/amiga/winami.c b/sys/amiga/winami.c index 28f041884..f2788fbcb 100644 --- a/sys/amiga/winami.c +++ b/sys/amiga/winami.c @@ -3,15 +3,9 @@ */ /* NetHack may be freely redistributed. See license for details. */ -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/windefs.h" -#include "NH:sys/amiga/winext.h" -#include "NH:sys/amiga/winproto.h" -#else #include "windefs.h" #include "winext.h" #include "winproto.h" -#endif #include "dlb.h" @@ -402,10 +396,6 @@ amii_askname(void) } } -/* Discarded ... -jhsa -#include "NH:sys/amiga/char.c" -*/ - /* Get the player selection character */ diff --git a/sys/amiga/winchar.c b/sys/amiga/winchar.c index a13a378b3..9b29152a7 100644 --- a/sys/amiga/winchar.c +++ b/sys/amiga/winchar.c @@ -9,23 +9,12 @@ #include #include -#ifndef CROSS_TO_AMIGA -#include "NH:src/tile.c" -#else #include "../src/tile.c" -#endif -#ifndef CROSS_TO_AMIGA -#include "NH:win/share/tile.h" -#include "NH:sys/amiga/windefs.h" -#include "NH:sys/amiga/winext.h" -#include "NH:sys/amiga/winproto.h" -#else #include "tile.h" #include "windefs.h" #include "winext.h" #include "winproto.h" -#endif /* NH:sys/amiga/winvchar.c */ int main(int, char **); diff --git a/sys/amiga/winfuncs.c b/sys/amiga/winfuncs.c index 86fed632f..46abfd165 100644 --- a/sys/amiga/winfuncs.c +++ b/sys/amiga/winfuncs.c @@ -3,28 +3,18 @@ */ /* NetHack may be freely redistributed. See license for details. */ -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/windefs.h" -#include "NH:sys/amiga/winext.h" -#include "NH:sys/amiga/winproto.h" -#else #include "windefs.h" #include "winext.h" #include "winproto.h" -#endif #include "patchlevel.h" extern struct TagItem scrntags[]; -#ifndef CROSS_TO_AMIGA -extern struct Library *ConsoleDevice; -#else extern struct Device * # ifdef __CONSTLIBBASEDECL__ __CONSTLIBBASEDECL__ # endif /* __CONSTLIBBASEDECL__ */ ConsoleDevice; -#endif static BitMapHeader amii_bmhd; static void cursor_common(struct RastPort *, int, int); diff --git a/sys/amiga/winkey.c b/sys/amiga/winkey.c index f2686bfde..57e47165c 100644 --- a/sys/amiga/winkey.c +++ b/sys/amiga/winkey.c @@ -2,15 +2,9 @@ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/windefs.h" -#include "NH:sys/amiga/winext.h" -#include "NH:sys/amiga/winproto.h" -#else #include "windefs.h" #include "winext.h" #include "winproto.h" -#endif int amii_nh_poskey(coordxy *x, coordxy *y, int *mod) diff --git a/sys/amiga/winreq.c b/sys/amiga/winreq.c index bf6f21974..76f6c1ec2 100644 --- a/sys/amiga/winreq.c +++ b/sys/amiga/winreq.c @@ -2,15 +2,9 @@ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/windefs.h" -#include "NH:sys/amiga/winext.h" -#include "NH:sys/amiga/winproto.h" -#else #include "windefs.h" #include "winext.h" #include "winproto.h" -#endif #define GADBLUEPEN 2 #define GADREDPEN 3 @@ -45,11 +39,7 @@ struct NewWindow StrWindow = { &String, NULL, NULL, NULL, NULL, 5, 5, 0xffff, 0xffff, CUSTOMSCREEN }; -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/colorwin.c" -#else #include "colorwin.c" -#endif #define XSIZE 2 #define YSIZE 3 @@ -58,11 +48,7 @@ struct NewWindow StrWindow = { #define GADOKAY 6 #define GADCANCEL 7 -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/clipwin.c" -#else #include "clipwin.c" -#endif void ClearCol(struct Window *w); diff --git a/sys/amiga/winstr.c b/sys/amiga/winstr.c index e6cfd4f45..2f7329467 100644 --- a/sys/amiga/winstr.c +++ b/sys/amiga/winstr.c @@ -2,15 +2,9 @@ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ -#ifndef CROSS_TO_AMIGA -#include "NH:sys/amiga/windefs.h" -#include "NH:sys/amiga/winext.h" -#include "NH:sys/amiga/winproto.h" -#else #include "windefs.h" #include "winext.h" #include "winproto.h" -#endif /* Put a string into the indicated window using the indicated attribute */ void