update config.h

Some reformatting (replacing tabs with spaces), but mostly updating some
of the comments, particularly about SYSCF.

Shouldn't GENERIC_USERNAMES be controllable via SYSCF?
This commit is contained in:
PatR
2015-11-16 18:55:15 -08:00
parent acc883f122
commit fa8ac8a2ce
+67 -40
View File
@@ -1,9 +1,8 @@
/* NetHack 3.6 config.h $NHDT-Date: 1433279371 2015/06/02 21:09:31 $ $NHDT-Branch: status_hilite $:$NHDT-Revision: 1.89 $ */
/* NetHack 3.6 config.h $NHDT-Date: 1447728911 2015/11/17 02:55:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.91 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice \
*/
#ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice */
#define CONFIG_H
/*
@@ -137,39 +136,55 @@
/*
* Section 2: Some global parameters and filenames.
* Commenting out WIZARD, LOGFILE, NEWS or PANICLOG removes that
* feature from the game; otherwise set the appropriate wizard
* name. LOGFILE, NEWS and PANICLOG refer to files in the
* playground.
*
* LOGFILE, XLOGFILE, NEWS and PANICLOG refer to files in
* the playground directory. Commenting out LOGFILE, XLOGFILE,
* NEWS or PANICLOG removes that feature from the game.
*
* Building with debugging features enabled is now unconditional;
* the old WIZARD setting for that has been eliminated.
* If SYSCF is enabled, WIZARD_NAME will be overridden at
* runtime by the SYSCF WIZARDS value.
*
* SYSCF: (not supported by all ports)
* If SYSCF is defined, the following configuration info is
* available in a global config space, with the compiled-in
* entries as defaults:
* WIZARDS (a value of * allows anyone to be wizard)
* (this does NOT default to compiled-in value)
* MAXPLAYERS (see MAX_NR_OF_PLAYERS above and nethack.sh)
* SUPPORT (how to get local support)(no default)
* RECOVER (how to recover a game at your site)(no
*default)
* SHELLERS (who can use !, syntax as WIZARDS)
* for the record file (see topten.c):
* WIZARDS (a space-separated list of usernames of users who
* can run the game in debug mode, aka wizard mode;
* a value of * allows anyone to debug;
* this does NOT default to compiled-in value)
* EXPLORERS (who can use explore mode, aka discover mode)
* SHELLERS (who can use ! to execute a shell subprocess)
* MAXPLAYERS (see MAX_NR_OF_PLAYERS below and nethack.sh)
* SUPPORT (how to get local support) [no default]
* RECOVER (how to recover a game at your site) [no default]
* For the record file (see topten.c):
* PERSMAX (max entries for one person)
* ENTRYMAX (max entries in the record file)
* POINTSMIN (min points to get an entry)
* PERS_IS_UID (0 or 1 - person is name or (numeric) userid)
* SEDUCE (0 or 1 - runtime disable/enable SEDUCE
*option)
*
* The following options select how the config space is stored:
* SYSCF_FILE in the named file
*
* Can force incubi/succubi behavior to be toned down to nymph-like:
* SEDUCE (0 or 1 - runtime disable/enable SEDUCE option)
* The following options pertain to crash reporting:
* GREPPATH (the path to the system grep(1) utility)
* GDBPATH (the path to the system gdb(1) program)
* Regular nethack options can also be specified in order to
* provide system-wide default values local to your system:
* OPTIONS (same as in users' .nethackrc or defaults.nh)
*
* In the future there may be other ways to supply SYSCF
* information (Windows registry, Apple resource forks, etc)
* but at present the only supported method is via a text file.
* If the program is built with SYSCF enabled, the file *must*
* exist and be readable, otherwise the game will complain and
* refuse to start.
* SYSCF_FILE: file containing the SYSCF options shown above;
* default is 'sysconf' in nethack's playground.
*/
#ifndef WIZARD_NAME /* allow for compile-time or Makefile changes */
#define WIZARD_NAME "wizard"
#define WIZARD_NAME "wizard" /* value is ignored if SYSCF is enabled */
#endif
#ifndef SYSCF
@@ -184,11 +199,20 @@
#define GREPPATH "/bin/grep"
#endif
/* note: "larger" is in comparison with 'record', the high-scores file
(whose name can be overridden via #define in global.h if desired) */
#define LOGFILE "logfile" /* larger file for debugging purposes */
#define XLOGFILE "xlogfile" /* even larger logfile */
#define NEWS "news" /* the file containing the latest hack news */
#define PANICLOG "paniclog" /* log of panic and impossible events */
/*
* PERSMAX, POINTSMIN, ENTRYMAX, PERS_IS_UID:
* These control the contents of 'record', the high-scores file.
* They used to be located in topten.c rather than config.h, and
* their values can be overridden at runtime (to increase ENTRYMAX, the
* maximum number of scores to keep, for example) if SYSCF is enabled.
*/
#ifndef PERSMAX
#define PERSMAX 3 /* entries per name/uid per char. allowed */
#endif
@@ -313,8 +337,8 @@
*/
#endif /* CHDIR */
/* If GENERIC_USERNAMES is defined, and the user name is found
* in that list, prompt for username instead.
/* If GENERIC_USERNAMES is defined, and the player's username is found
* in the list, prompt for character name instead of using username.
* A public server should probably disable this. */
#define GENERIC_USERNAMES "play player game games nethack nethacker"
@@ -341,12 +365,10 @@
#include "tradstdc.h"
/*
* type schar: small signed integers (8 bits suffice) (eg. TOS)
*
* type schar:
* small signed integers (8 bits suffice) (eg. TOS)
* typedef char schar;
*
* will do when you have signed characters; otherwise use
*
* typedef short int schar;
*/
#ifdef AZTEC
@@ -356,13 +378,10 @@ typedef signed char schar;
#endif
/*
* type uchar: small unsigned integers (8 bits suffice - but 7 bits do not)
*
* type uchar:
* small unsigned integers (8 bits suffice - but 7 bits do not)
* typedef unsigned char uchar;
*
* will be satisfactory if you have an "unsigned char" type;
* otherwise use
*
* will be satisfactory if you have an "unsigned char" type; otherwise use
* typedef unsigned short int uchar;
*/
#ifndef _AIX32 /* identical typedef in system file causes trouble */
@@ -400,7 +419,6 @@ typedef unsigned char uchar;
#endif
#endif
#if !defined(MAC)
#if !defined(NOCLIPPING)
#define CLIPPING /* allow smaller screens -- ERS */
@@ -409,7 +427,6 @@ typedef unsigned char uchar;
#define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */
/*
* Section 4: EXPERIMENTAL STUFF
*
@@ -418,14 +435,24 @@ typedef unsigned char uchar;
* bugs left here.
*/
/* #define STATUS_VIA_WINDOWPORT */ /* re-work of the status line updating process */
/* #define STATUS_VIA_WINDOWPORT */ /* re-work of the status line
updating process */
/* #define STATUS_HILITES */ /* support hilites of status fields */
/* #define WINCHAIN*/ /* stacked window systems */
/* #define SCORE_ON_BOTL */ /* show estimated score on status line */
#define FREE_ALL_MEMORY /* free all memory at exit */
/* #define WINCHAIN */ /* stacked window systems */
/* #define DEBUG_MIGRATING_MONS */ /* add a wizard-mode command to help debug
migrating monsters */
/* SCORE_ON_BOTL is neither experimental nor inadequately tested,
but doesn't seem to fit in any other section... */
/* #define SCORE_ON_BOTL */ /* enable the 'showscore' option to
show estimated score on status line */
/* FREE_ALL_MEMORY is neither experimental nor inadequately tested,
but it isn't necessary for successful operation of the program */
#define FREE_ALL_MEMORY /* free all memory at exit */
/* End of Section 4 */
#include "global.h" /* Define everything else according to choices above */