From 7b559f4d02e896ca00ae14df19e70b8e51062985 Mon Sep 17 00:00:00 2001 From: Ingo Paschke Date: Mon, 11 May 2026 16:40:00 +0200 Subject: [PATCH] Amiga: delete dead files and dead-macro code Delete amigst.c (empty) and amitty.c (TTY/BBS stub). Drop WINVERS_AMIT, SUPERBITMAP_MAP, EXTMENU, SHELL/dosh(), and the bbs_id reference in src/files.c. --- include/amiconf.h | 2 - src/files.c | 9 ---- sys/amiga/amidos.c | 21 -------- sys/amiga/amigst.c | 28 ---------- sys/amiga/amitty.c | 78 --------------------------- sys/amiga/winami.c | 46 ---------------- sys/amiga/windefs.h | 1 - sys/amiga/winext.h | 3 -- sys/unix/hints/include/cross-post.500 | 2 - sys/unix/hints/include/cross-pre2.500 | 8 +-- 10 files changed, 4 insertions(+), 194 deletions(-) delete mode 100644 sys/amiga/amigst.c delete mode 100644 sys/amiga/amitty.c diff --git a/include/amiconf.h b/include/amiconf.h index a362c94f8..6ce9cbae5 100644 --- a/include/amiconf.h +++ b/include/amiconf.h @@ -180,8 +180,6 @@ typedef unsigned short AMII_COLOR_TYPE; #define ANSI_DEFAULT #endif -extern int amibbs; /* BBS mode? */ - #ifdef AMII_GRAPHICS extern int amii_numcolors; void amii_setpens(int); diff --git a/src/files.c b/src/files.c index 1891ba604..16c0f32c8 100644 --- a/src/files.c +++ b/src/files.c @@ -110,10 +110,6 @@ static char fqn_filename_buffer[FQN_NUMBUF][FQN_MAX_FILENAME]; #ifdef AMIGA extern char PATH[]; /* see sys/amiga/amidos.c */ -extern char bbs_id[]; -#ifdef __SASC_60 -#include -#endif #include extern void amii_set_text_font(char *, int); @@ -1065,11 +1061,6 @@ set_savefile_name(boolean regularize_it) #if defined(MICRO) && !defined(WIN32) && !defined(MSDOS) if (strlen(gs.SAVEP) < (SAVESIZE - 1)) Strcpy(gs.SAVEF, gs.SAVEP); - else -#ifdef AMIGA - if (strlen(gs.SAVEP) + strlen(bbs_id) < (SAVESIZE - 1)) - strncat(gs.SAVEF, bbs_id, PATHLEN); -#endif { int i = strlen(gs.SAVEP); #ifdef AMIGA diff --git a/sys/amiga/amidos.c b/sys/amiga/amidos.c index 475fb4824..e7b22259a 100644 --- a/sys/amiga/amidos.c +++ b/sys/amiga/amidos.c @@ -123,27 +123,6 @@ getlogin(void) /* abs() provided by libnix/stdlib */ -#ifdef SHELL -int -dosh(void) -{ - int i = 0; - char buf[BUFSZ]; - extern struct ExecBase *SysBase; - - /* Only under 2.0 and later ROMs do we have System() */ - if (SysBase->LibNode.lib_Version >= 37 && !amibbs) { - getlin("Enter CLI Command...", buf); - if (buf[0] != '\033') - i = System(buf, NULL); - } else { - i = 0; - pline("No mysterious force prevented you from using multitasking."); - } - return i; -} -#endif /* SHELL */ - #ifdef MFLOPPY #include diff --git a/sys/amiga/amigst.c b/sys/amiga/amigst.c deleted file mode 100644 index c0ace8cdf..000000000 --- a/sys/amiga/amigst.c +++ /dev/null @@ -1,28 +0,0 @@ -/* NetHack 3.6 amigst.c $NHDT-Date: 1432512794 2015/05/25 00:13:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */ -/* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ -/* NetHack may be freely redistributed. See license for details. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#undef strcmpi -#include -#include - -#include "hack.h" -#include "winprocs.h" -#include "winami.h" - -#include "windefs.h" -#include "winext.h" -#include "winproto.h" - -/* end amigst.c */ diff --git a/sys/amiga/amitty.c b/sys/amiga/amitty.c deleted file mode 100644 index e47f3b693..000000000 --- a/sys/amiga/amitty.c +++ /dev/null @@ -1,78 +0,0 @@ -/* NetHack 3.6 amitty.c $NHDT-Date: 1432512795 2015/05/25 00:13:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */ -/* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */ -/* NetHack may be freely redistributed. See license for details. */ - -/* TTY-specific code for the Amiga - * This is still experimental. - * Still to do: - * add real termcap handling - currently requires ANSI_DEFAULT - */ - -#include "hack.h" -#include "tcap.h" -#include -#include - -void tty_change_color(void); -char *tty_get_color_string(void); - -int amibbs = 0; /* BBS mode */ -char bbs_id[80] = ""; /* BBS uid equivalent */ -long afh_in, afh_out; /* BBS mode Amiga filehandles */ - -#ifdef TTY_GRAPHICS - -void -settty(const char *s) -{ - end_screen(); - if (s) - raw_print(s); - iflags.cbreak = ON; /* this is too easy: probably wrong */ -#if 1 /* should be version>=36 */ - /* if(IsInteractive(afh_in)){ */ - SetMode(afh_in, 0); /* con mode */ -/* } */ -#endif -} -void -gettty() -{ -#if 1 /* should be VERSION >=36 */ - /* if(IsInteractive(afh_in)){ */ - SetMode(afh_in, 1); /* raw mode */ -/* } */ -#endif -} -void -setftty() -{ - iflags.cbreak = ON; /* ditto */ -} -char kill_char = 'X' - '@'; -char erase_char = '\b'; -int -tgetch(void) -{ - unsigned char x; - Read(afh_in, &x, 1); - return (x == '\r') ? '\n' : x; -} -void -get_scr_size() -{ - CO = 80; - LI = 24; -} - -#endif - -void -tty_change_color() -{ -} -char * -tty_get_color_string() -{ - return (""); -} diff --git a/sys/amiga/winami.c b/sys/amiga/winami.c index 97782356b..28f041884 100644 --- a/sys/amiga/winami.c +++ b/sys/amiga/winami.c @@ -422,11 +422,6 @@ amii_get_ext_cmd(void) menu_item *mip; anything id; struct amii_WinDesc *cw; -#ifdef EXTMENU - winid win; - int i; - char buf[256]; -#endif int colx; int bottom = 0; @@ -444,47 +439,6 @@ amii_get_ext_cmd(void) bottom = amii_msgborder(w); colx = 3; -#ifdef EXTMENU - if (iflags.extmenu) { - win = amii_create_nhwindow(NHW_MENU); - amii_start_menu(win, MENU_BEHAVE_STANDARD); - pline("#"); - amii_putstr(WIN_MESSAGE, -1, " "); - - for (i = 0; extcmdlist[i].ef_txt != NULL; ++i) { - id.a_char = *extcmdlist[i].ef_txt; - sprintf(buf, "%-10s - %s ", extcmdlist[i].ef_txt, - extcmdlist[i].ef_desc); - amii_add_menu(win, (const glyph_info *) 0, &id, - extcmdlist[i].ef_txt[0], 0, 0, NO_COLOR, - buf, MENU_ITEMFLAGS_NONE); - } - - amii_end_menu(win, (char *) 0); - sel = amii_select_menu(win, PICK_ONE, &mip); - amii_destroy_nhwindow(win); - - if (sel == 1) { - sel = mip->item.a_char; - for (i = 0; extcmdlist[i].ef_txt != NULL; ++i) { - if (sel == extcmdlist[i].ef_txt[0]) - break; - } - - /* copy in the text */ - if (extcmdlist[i].ef_txt != NULL) { - amii_clear_nhwindow(WIN_MESSAGE); - (void) put_ext_cmd((char *) extcmdlist[i].ef_txt, 0, cw, - bottom); - return (i); - } else - DisplayBeep(NULL); - } - - return (-1); - } -#endif - amii_clear_nhwindow(WIN_MESSAGE); /* Was NHW_MESSAGE */ if (scrollmsg) { pline("#"); diff --git a/sys/amiga/windefs.h b/sys/amiga/windefs.h index 85a800633..07f6da180 100644 --- a/sys/amiga/windefs.h +++ b/sys/amiga/windefs.h @@ -57,7 +57,6 @@ CLIPPING must be defined for the AMIGA version #define WINVERS_AMII (strcmp("amii", windowprocs.name) == 0) #define WINVERS_AMIV (strcmp("amiv", windowprocs.name) == 0) -#define WINVERS_AMIT (strcmp("amitty", windowprocs.name) == 0) /* cw->data[x] contains 2 characters worth of special information. These * characters are stored at the offsets as described here. diff --git a/sys/amiga/winext.h b/sys/amiga/winext.h index e3ef8ef86..02d1436a6 100644 --- a/sys/amiga/winext.h +++ b/sys/amiga/winext.h @@ -59,9 +59,6 @@ extern struct IOStdReq ConsoleIO; extern struct MsgPort *HackPort; extern int txwidth, txheight, txbaseline; -#ifdef SUPERBITMAP_MAP -extern struct BitMap amii_vbm; -#endif /* This gadget data is replicated for menu/text windows... */ extern struct PropInfo PropScroll; diff --git a/sys/unix/hints/include/cross-post.500 b/sys/unix/hints/include/cross-post.500 index 73ba215d7..51357dafb 100644 --- a/sys/unix/hints/include/cross-post.500 +++ b/sys/unix/hints/include/cross-post.500 @@ -232,10 +232,8 @@ endif # CROSS_TO_MIPS ifdef CROSS_TO_AMIGA $(TARGETPFX)amidos.o : ../sys/amiga/amidos.c $(HACK_H) -$(TARGETPFX)amigst.o : ../sys/amiga/amigst.c $(HACK_H) $(TARGETPFX)amirip.o : ../sys/amiga/amirip.c $(HACK_H) $(TARGETPFX)amistack.o : ../sys/amiga/amistack.c $(HACK_H) -$(TARGETPFX)amitty.o : ../sys/amiga/amitty.c $(HACK_H) $(TARGETPFX)amiwind.o : ../sys/amiga/amiwind.c \ ../sys/amiga/amimenu.c $(HACK_H) $(TARGETPFX)winami.o : ../sys/amiga/winami.c $(HACK_H) diff --git a/sys/unix/hints/include/cross-pre2.500 b/sys/unix/hints/include/cross-pre2.500 index 6a1331c6a..44dafac51 100644 --- a/sys/unix/hints/include/cross-pre2.500 +++ b/sys/unix/hints/include/cross-pre2.500 @@ -511,9 +511,9 @@ endif override TARGET_LFLAGS= $(TOOLARCH) -noixemul -Wl,--allow-multiple-definition override TARGET_LIBS += $(LIBLM) VARDATND += nhtiles.bmp -override SYSSRC = ../sys/amiga/amidos.c ../sys/amiga/amigst.c \ +override SYSSRC = ../sys/amiga/amidos.c \ ../sys/amiga/amimenu.c ../sys/amiga/amirip.c \ - ../sys/amiga/amistack.c ../sys/amiga/amitty.c \ + ../sys/amiga/amistack.c \ ../sys/amiga/amiwind.c ../sys/amiga/clipwin.c \ ../sys/amiga/colorwin.c \ ../sys/amiga/winami.c ../sys/amiga/winchar.c \ @@ -522,9 +522,9 @@ override SYSSRC = ../sys/amiga/amidos.c ../sys/amiga/amigst.c \ ../sys/amiga/winstr.c ../sys/share/pcmain.c \ ../win/share/bmptiles.c ../win/share/giftiles.c \ ../win/share/tileset.c -override SYSOBJ = $(TARGETPFX)amidos.o $(TARGETPFX)amigst.o \ +override SYSOBJ = $(TARGETPFX)amidos.o \ $(TARGETPFX)amirip.o $(TARGETPFX)amistack.o \ - $(TARGETPFX)amitty.o $(TARGETPFX)amiwind.o \ + $(TARGETPFX)amiwind.o \ $(TARGETPFX)winami.o $(TARGETPFX)winchar.o \ $(TARGETPFX)winfuncs.o $(TARGETPFX)winkey.o \ $(TARGETPFX)winamenu.o $(TARGETPFX)winreq.o \