more SYSCF and related bits - cleanup and features

infrastructure for "system options" - things currently specified at build
 time that should be changeable at install time or run time but not really
 under user control
generalize contact info so it can be localized and it doesn't have to be
 an email address
move recently introduced WIZARDS into sysopt
drop bogus OPTIONS=wizards possibility
new function build_english_list() to comma-ize and add 'or' from a whitespace separated list: A.  A or B.  A, B, or C.
syscf file now handles: WIZARDS SUPPORT RECOVER
 SUPPORT specifies local support information
 RECOVER will eventually supply port-specific and/or localized info on how
  to run recover (or get it run for you).
Note: in sys/msdos I changed sys.o (generated from pcsys.c) to pcsys.o
Note: sys/msdos/Makefile.GCC has 2 rules for sys.o (now pcsys.o)
This commit is contained in:
keni
2008-01-31 00:56:59 +00:00
parent d8a45a57b5
commit 6f0e178368
32 changed files with 329 additions and 137 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)decl.h 3.5 2007/01/12 */
/* SCCS Id: @(#)decl.h 3.5 2008/01/30 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -199,9 +199,6 @@ E const char *occtxt; /* defined when occupation != NULL */
E const char *nomovemsg;
E const char nul[];
E char lock[];
#ifdef SYSCF
E char wizards[];
#endif
E const schar xdir[], ydir[], zdir[];

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)extern.h 3.5 2008/01/19 */
/* SCCS Id: @(#)extern.h 3.5 2008/01/30 */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -640,6 +640,7 @@ E struct kinfo *FDECL(find_delayed_killer, (int));
E void FDECL(dealloc_killer, (struct kinfo*));
E void FDECL(save_killers, (int,int));
E void FDECL(restore_killers, (int));
E char *FDECL(build_english_list, (char *));
/* ### engrave.c ### */

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)hack.h 3.5 2008/01/19 */
/* SCCS Id: @(#)hack.h 3.5 2008/01/30 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -168,6 +168,7 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
#include "extern.h"
#include "winprocs.h"
#include "sys.h"
#ifdef USE_TRAMPOLI
#include "wintty.h"
@@ -419,5 +420,8 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
#else
# define CFDECLSPEC
#endif
#define DEVTEAM_EMAIL "devteam@nethack.org"
#define DEVTEAM_URL "http://www.nethack.org"
#endif /* HACK_H */

20
include/sys.h Normal file
View File

@@ -0,0 +1,20 @@
/* SCCS Id: @(#)sys.h 3.5 2008/01/30 */
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef SYS_H
#define SYS_H
#define E extern
E void NDECL(sys_early_init);
struct sysopt {
char *support; /* local support contact */
char *recover; /* how to run recover - may be overridden by win port */
char *wizards;
};
E struct sysopt sysopt;
#endif /* SYS_H */