remove SYSFLAGS and MFLOPPY code

A check into github issue 364 confirmed that
ba6edbe5dc
had incorrectly updated the bwrite sizeof entry for sysflags.

The SYSFLAGS and MFLOPPY code is all in the outdated part of the tree, so just
remove it rather than re-correct it.

Closes #364
Closes #207
This commit is contained in:
nhmall
2020-07-05 08:50:13 -04:00
parent 84bba3f099
commit 5a437b336a
25 changed files with 63 additions and 881 deletions

View File

@@ -1,190 +0,0 @@
/* NetHack 3.6 amiconf.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1990, 1991, 1992, 1993.
*/
/* NetHack may be freely redistributed. See license for details. */
#ifndef AMICONF_H
#define AMICONF_H
#undef abs /* avoid using macro form of abs */
#ifndef __SASC_60
#undef min /* this gets redefined */
#undef max /* this gets redefined */
#endif
#include <time.h> /* get time_t defined before use! */
#ifdef __SASC_60 /* since SAS can prevent re-inclusion */
#include <stdlib.h> /* general things, including builtins */
#include <string.h>
#endif
#ifdef AZTEC_50
#include <stdlib.h>
#define AZTEC_C_WORKAROUND /* Bug which turns up in sounds.c. Bummer... */
#define NO_SIGNAL /* 5.0 signal handling doesn't like SIGINT... */
#endif
#ifdef _DCC
#include <stdlib.h>
#define _SIZE_T
#endif
#ifndef __GNUC__
typedef long off_t;
#endif
#define MICRO /* must be defined to allow some inclusions */
#define NOCWD_ASSUMPTIONS /* Allow paths to be specified for HACKDIR, \
LEVELDIR, SAVEDIR, BONESDIR, DATADIR, \
SCOREDIR, LOCKDIR, CONFIGDIR, and TROUBLEDIR */
/* data librarian defs */
#ifndef NOCWD_ASSUMPTIONS
#define DLBFILE "NetHack:nhdat" /* main library */
#define DLBFILE2 "NetHack:nhsdat" /* sound library */
#else
#define DLBFILE "nhdat" /* main library */
#define DLBFILE2 "nhsdat" /* sound library */
#endif
#define FILENAME_CMP stricmp /* case insensitive */
#ifndef __SASC_60
#define O_BINARY 0
#endif
/* Compile in New Intuition look for 2.0 */
#ifdef IDCMP_CLOSEWINDOW
#ifndef INTUI_NEW_LOOK
#define INTUI_NEW_LOOK 1
#endif
#endif
#define MFLOPPY /* You'll probably want this; provides assistance \
* for typical personal computer configurations \
*/
#define RANDOM
/* ### amidos.c ### */
extern void FDECL(nethack_exit, (int));
/* ### amiwbench.c ### */
extern void NDECL(ami_wbench_init);
extern void NDECL(ami_wbench_args);
extern int FDECL(ami_wbench_getsave, (int));
extern void FDECL(ami_wbench_unlink, (char *));
extern int FDECL(ami_wbench_iconsize, (char *));
extern void FDECL(ami_wbench_iconwrite, (char *));
extern int FDECL(ami_wbench_badopt, (const char *));
extern void NDECL(ami_wbench_cleanup);
extern void FDECL(getlind, (const char *, char *, const char *));
/* ### winreq.c ### */
extern void amii_setpens(int);
extern void FDECL(exit, (int));
extern void NDECL(CleanUp);
extern void FDECL(Abort, (long));
extern int NDECL(getpid);
extern char *FDECL(CopyFile, (const char *, const char *));
extern int NDECL(kbhit);
extern int NDECL(WindowGetchar);
extern void FDECL(ami_argset, (int *, char *[]));
extern void FDECL(ami_mkargline, (int *, char **[]));
extern void FDECL(ami_wininit_data, (int));
#define FromWBench 0 /* A hint for compiler ... */
/* extern boolean FromWBench; /* how were we run? */
extern int ami_argc;
extern char **ami_argv;
#ifndef MICRO_H
#include "micro.h"
#endif
#ifndef PCCONF_H
#include "pcconf.h" /* remainder of stuff is almost same as the PC */
#endif
#define remove(x) unlink(x)
/* DICE wants rewind() to return void. We want it to return int. */
#if defined(_DCC) || defined(__GNUC__)
#define rewind(f) fseek(f, 0, 0)
#endif
#ifdef AZTEC_C
extern FILE *FDECL(freopen, (const char *, const char *, FILE *));
extern char *FDECL(gets, (char *));
#endif
#define msmsg printf
/*
* If AZTEC_C we can't use the long cpath in vision.c....
*/
#ifdef AZTEC_C
#undef MACRO_CPATH
#endif
/*
* (Possibly) configurable Amiga options:
*/
#define TEXTCOLOR /* Use colored monsters and objects */
#define HACKFONT /* Use special hack.font */
#define SHELL /* Have a shell escape command (!) */
#define MAIL /* Get mail at unexpected occasions */
#define DEFAULT_ICON "NetHack:default.icon" /* private icon */
#define AMIFLUSH /* toss typeahead (select flush in .cnf) */
/* #define OPT_DISPMAP /* enable fast_map option */
/* new window system options */
/* WRONG - AMIGA_INTUITION should go away */
#ifdef AMII_GRAPHICS
#define AMIGA_INTUITION /* high power graphics interface (amii) */
#endif
#define CHANGE_COLOR 1
#ifdef TEXTCOLOR
#define DEPTH 6 /* Maximum depth of the screen allowed */
#else
#define DEPTH 2 /* Four colors...sigh... */
#endif
#define AMII_MAXCOLORS (1L << DEPTH)
typedef unsigned short AMII_COLOR_TYPE;
#define PORT_HELP "nethack:amii.hlp"
#undef TERMLIB
#define AMII_MUFFLED_VOLUME 40
#define AMII_SOFT_VOLUME 50
#define AMII_OKAY_VOLUME 60
#define AMII_LOUDER_VOLUME 80
#ifdef TTY_GRAPHICS
#define ANSI_DEFAULT
#endif
extern int amibbs; /* BBS mode? */
#ifdef AMII_GRAPHICS
extern int amii_numcolors;
void FDECL(amii_setpens, (int));
#endif
/* for cmd.c: override version in micro.h */
#ifdef __SASC_60
#undef M
#define M(c) ((c) -128)
#endif
#endif /* AMICONF_H */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 decl.h $NHDT-Date: 1591017415 2020/06/01 13:16:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.237 $ */
/* NetHack 3.6 decl.h $NHDT-Date: 1593953331 2020/07/05 12:48:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.238 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2007. */
/* NetHack may be freely redistributed. See license for details. */
@@ -803,13 +803,6 @@ struct instance_globals {
#ifdef MICRO
char levels[PATHLEN]; /* where levels are */
#endif /* MICRO */
#ifdef MFLOPPY
char permbones[PATHLEN]; /* where permanent copy of bones go */
int ramdisk = FALSE; /* whether to copy bones to levels or not */
int saveprompt = TRUE;
const char *alllevels = "levels.*";
const char *allbones = "bones*.*";
#endif
struct sinfo program_state;
/* detect.c */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dungeon.h $NHDT-Date: 1447755969 2015/11/17 10:26:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.24 $ */
/* NetHack 3.6 dungeon.h $NHDT-Date: 1593953333 2020/07/05 12:48:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.38 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -167,15 +167,6 @@ struct linfo {
/* Note: VISITED and LFILE_EXISTS are currently almost always
* set at the same time. However they _mean_ different things.
*/
#ifdef MFLOPPY
#define FROMPERM 1 /* for ramdisk use */
#define TOPERM 2 /* for ramdisk use */
#define ACTIVE 1
#define SWAPPED 2
int where;
long time;
long size;
#endif /* MFLOPPY */
};
/* types and structures for dungeon map recording

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 extern.h $NHDT-Date: 1593771615 2020/07/03 10:20:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.849 $ */
/* NetHack 3.6 extern.h $NHDT-Date: 1593953334 2020/07/05 12:48:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.850 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -787,9 +787,6 @@ E char *FDECL(fname_encode, (const char *, CHAR_P, char *, char *, int));
E char *FDECL(fname_decode, (CHAR_P, char *, char *, int));
E const char *FDECL(fqname, (const char *, int, int));
E FILE *FDECL(fopen_datafile, (const char *, const char *, int));
#ifdef MFLOPPY
E void NDECL(set_lock_and_bones);
#endif
E void FDECL(zero_nhfile, (NHFILE *));
E void FDECL(close_nhfile, (NHFILE *));
E void FDECL(rewind_nhfile, (NHFILE *));
@@ -799,9 +796,6 @@ E NHFILE *FDECL(open_levelfile, (int, char *));
E void FDECL(delete_levelfile, (int));
E void NDECL(clearlocks);
E NHFILE *FDECL(create_bonesfile, (d_level *, char **, char *));
#ifdef MFLOPPY
E void NDECL(cancel_bonesfile);
#endif
E void FDECL(commit_bonesfile, (d_level *));
E NHFILE *FDECL(open_bonesfile, (d_level *, char **));
E int FDECL(delete_bonesfile, (d_level *));
@@ -1935,13 +1929,6 @@ E const char *NDECL(get_portable_device);
#if defined(MICRO) || defined(WIN32)
E void NDECL(flushout);
E int NDECL(dosh);
#ifdef MFLOPPY
E void FDECL(eraseall, (const char *, const char *));
E void FDECL(copybones, (int));
E void NDECL(playwoRAMdisk);
E int FDECL(saveDiskPrompt, (int));
E void NDECL(gameDiskPrompt);
#endif
E void FDECL(append_slash, (char *));
E void FDECL(getreturn, (const char *));
#ifndef AMIGA
@@ -2303,13 +2290,7 @@ E boolean FDECL(tricked_fileremoved, (NHFILE *, char *));
#ifdef INSURANCE
E void NDECL(savestateinlock);
#endif
#ifdef MFLOPPY
E boolean FDECL(savelev, (NHFILE *, XCHAR_P));
E boolean FDECL(swapin_file, (int));
E void NDECL(co_false);
#else
E void FDECL(savelev, (NHFILE *, XCHAR_P));
#endif
E genericptr_t FDECL(mon_to_buffer, (struct monst *, int *));
E boolean FDECL(close_check, (int));
E void FDECL(savecemetery, (NHFILE *, struct cemetery **));

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 flag.h $NHDT-Date: 1581637124 2020/02/13 23:38:44 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.176 $ */
/* NetHack 3.7 flag.h $NHDT-Date: 1593953335 2020/07/05 12:48:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.183 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -135,43 +135,6 @@ struct flag {
int runmode; /* update screen display during run moves */
};
/*
* System-specific flags that are saved with the game if SYSFLAGS is defined.
*/
#if defined(AMIFLUSH) || defined(AMII_GRAPHICS) || defined(OPT_DISPMAP)
#define SYSFLAGS
#else
#if defined(MFLOPPY) || defined(MAC)
#define SYSFLAGS
#endif
#endif
#ifdef SYSFLAGS
struct sysflag {
char sysflagsid[10];
#ifdef AMIFLUSH
boolean altmeta; /* use ALT keys as META */
boolean amiflush; /* kill typeahead */
#endif
#ifdef AMII_GRAPHICS
int numcols;
unsigned short
amii_dripens[20]; /* DrawInfo Pens currently there are 13 in v39 */
AMII_COLOR_TYPE amii_curmap[AMII_MAXCOLORS]; /* colormap */
#endif
#ifdef OPT_DISPMAP
boolean fast_map; /* use optimized, less flexible map display */
#endif
#ifdef MFLOPPY
boolean asksavedisk;
#endif
#ifdef MAC
boolean page_wait; /* put up a --More-- after a page of messages */
#endif
};
#endif
/*
* Flags that are set each time the game is started.
* These are not saved with the game.
@@ -289,11 +252,6 @@ struct instance_flags {
uchar bouldersym; /* symbol for boulder display */
char prevmsg_window; /* type of old message window to use */
boolean extmenu; /* extended commands use menu interface */
#ifdef MFLOPPY
boolean checkspace; /* check disk space before writing files */
/* (in iflags to allow restore after moving
* to >2GB partition) */
#endif
#ifdef MICRO
boolean BIOS; /* use IBM or ST BIOS calls when appropriate */
#endif
@@ -430,9 +388,6 @@ struct instance_flags {
#define preload_tiles wc_preload_tiles
extern NEARDATA struct flag flags;
#ifdef SYSFLAGS
extern NEARDATA struct sysflag sysflags;
#endif
extern NEARDATA struct instance_flags iflags;
/* last_msg values

View File

@@ -83,27 +83,8 @@ pfx_##a,
"status window alignment")
NHOPTC(altkeyhandler, 20, opt_in, set_in_game, No, Yes, No, No, NoAlias,
"alternate key handler")
#if defined(SYSFLAGS) && defined(AMIGA)
NHOPTB(altmeta, 0, opt_out, set_in_config, On, No, No, No, NoAlias,
&sysflags.altmeta)
#else
#ifdef ALTMETA
NHOPTB(altmeta, 0, opt_out, set_in_game, Off, No, No, No, NoAlias,
&iflags.altmeta)
#else
NHOPTB(altmeta, 0, opt_out, set_in_config, Off, No, No, No, NoAlias,
(boolean *) 0)
#endif
#endif
NHOPTB(ascii_map, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,
&iflags.wc_ascii_map)
#if defined(SYSFLAGS) && defined(MFLOPPY)
NHOPTB(asksavedisk, 0, opt_in, set_gameview, Off, No, No, No, NoAlias,
&sysflags.asksavedisk)
#else
NHOPTB(asksavedisk, 0, opt_in, set_gameview, Off, No, No, No, NoAlias,
(boolean *) 0)
#endif
NHOPTB(autodescribe, 0, opt_out, set_in_game, On, Yes, No, No, NoAlias,
&iflags.autodescribe)
NHOPTB(autodig, 0, opt_in, set_in_game, Off, Yes, No, No, NoAlias,

View File

@@ -1,105 +0,0 @@
/* NetHack 3.6 os2conf.h $NHDT-Date: 1432512775 2015/05/25 00:12:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993, 1996. */
/* NetHack may be freely redistributed. See license for details. */
#ifdef OS2
#ifndef OS2CONF_H
#define OS2CONF_H
/*
* Compiler configuration. Compiler may be
* selected either here or in Makefile.os2.
*/
/* #define OS2_MSC /* Microsoft C 5.1 and 6.0 */
#define OS2_GCC /* GCC emx 0.8f */
/* #define OS2_CSET2 /* IBM C Set/2 (courtesy Jeff Urlwin) */
/* #define OS2_CSET2_VER_1 /* CSet/2 version selection */
/* #define OS2_CSET2_VER_2 /* - " - */
/*
* System configuration.
*/
#define OS2_USESYSHEADERS /* use compiler's own system headers */
/* #define OS2_HPFS /* use OS/2 High Performance File System */
#if defined(OS2_GCC) || defined(OS2_CSET2)
#define OS2_32BITAPI /* enable for compilation in OS/2 2.0 */
#endif
/*
* Other configurable options. Generally no
* reason to touch the defaults, I think.
*/
/*#define MFLOPPY /* floppy and ramdisk support */
#define RANDOM /* Berkeley random(3) */
#define SHELL /* shell escape */
/* #define TERMLIB /* use termcap file */
#define ANSI_DEFAULT /* allows NetHack to run without termcap file */
#define TEXTCOLOR /* allow color */
/*
* The remaining code shouldn't need modification.
*/
#ifdef MSDOS
#undef MSDOS /* MSC autodefines this but we don't want it */
#endif
#ifndef MICRO
#define MICRO /* must be defined to allow some inclusions */
#endif
#if !defined(TERMLIB) && !defined(ANSI_DEFAULT)
#define ANSI_DEFAULT /* have to have one or the other */
#endif
#define PATHLEN 260 /* maximum pathlength (HPFS) */
#define FILENAME 260 /* maximum filename length (HPFS) */
#ifndef MICRO_H
#include "micro.h" /* necessary externs for [os_name].c */
#endif
#ifndef SYSTEM_H
#include "system.h"
#endif
#ifndef index
#define index strchr
#endif
#ifndef rindex
#define rindex strrchr
#endif
#include <time.h>
/* the high quality random number routines */
#ifndef USE_ISAAC64
# ifdef RANDOM
# define Rand() random()
# else
# define Rand() rand()
# endif
#endif
/* file creation mask */
#include <sys\types.h>
#include <sys\stat.h>
#define FCMASK (S_IREAD | S_IWRITE)
#include <fcntl.h>
#ifdef __EMX__
#include <unistd.h>
#define sethanguphandler(foo) (void) signal(SIGHUP, (SIG_RET_TYPE) foo)
#endif
void hangup(int i);
#endif /* OS2CONF_H */
#endif /* OS2 */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pcconf.h $NHDT-Date: 1457207019 2016/03/05 19:43:39 $ $NHDT-Branch: chasonr $:$NHDT-Revision: 1.19 $ */
/* NetHack 3.6 pcconf.h $NHDT-Date: 1593953338 2020/07/05 12:48:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.27 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -35,10 +35,6 @@
/*#define OVERLAY */ /* Manual overlay definition (MSC 6.0ax only) */
#ifndef __GO32__
#define MFLOPPY /* Support for floppy drives and ramdisks by dgk */
#endif
#define SHELL /* via exec of COMMAND.COM */
/*

View File

@@ -1,83 +0,0 @@
/* NetHack 3.6 tosconf.h $NHDT-Date: 1432512782 2015/05/25 00:13:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
/* NetHack may be freely redistributed. See license for details. */
#ifdef TOS
#ifndef TOSCONF_H
#define TOSCONF_H
#define MICRO /* must be defined to allow some inclusions */
/*
Adjust these options to suit your compiler. The default here is for
GNU C with the MiNT library.
*/
/*#define NO_SIGNAL /* library doesn't support signals */
/*#define NO_FSTAT /* library doesn't have fstat() call */
#define MINT /* library supports MiNT extensions to TOS */
#ifdef __MINT__
#define MINT
#endif
#ifdef O_BINARY
#define FCMASK O_BINARY
#else
#define FCMASK 0660
#define O_BINARY 0
#endif
#ifdef UNIXDEBUG
#define remove(x) unlink(x)
#endif
/* configurable options */
#define MFLOPPY /* floppy support */
#define RANDOM /* improved random numbers */
#define SHELL /* allow spawning of shell */
#define TERMLIB /* use termcap */
#define TEXTCOLOR /* allow color */
#define MAIL /* enable the fake maildemon */
#ifdef MINT
#define SUSPEND /* allow suspending the game */
#endif
#ifndef TERMLIB
#define ANSI_DEFAULT /* use vt52 by default */
#endif
#if defined(__GNUC__) || defined(__MINT__)
/* actually, only more recent GNU C libraries have strcmpi
* on the other hand, they're free -- if yours is out of
* date, grab the most recent from atari.archive.umich.edu
*/
#define STRNCMPI
#undef strcmpi
extern int FDECL(strcmpi, (const char *, const char *));
extern int FDECL(strncmpi, (const char *, const char *, size_t));
#endif
#include <termcap.h>
#include <unistd.h>
/* instead of including system.h from pcconf.h */
#include <string.h>
#include <stdlib.h>
#include <types.h>
#define SIG_RET_TYPE __Sigfunc
#define SYSTEM_H
#ifndef MICRO_H
#include "micro.h"
#endif
#ifndef PCCONF_H
#include "pcconf.h" /* remainder of stuff is same as the PC */
#endif
#ifdef TEXTCOLOR
extern boolean colors_changed; /* in tos.c */
#endif
#endif /* TOSCONF_H */
#endif /* TOS */