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

View File

@@ -1,17 +1,16 @@
/* 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. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* 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 #define CONFIG_H
/* /*
* Section 1: Operating and window systems selection. * Section 1: Operating and window systems selection.
* Select the version of the OS you are using. * Select the version of the OS you are using.
* For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h. * For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h.
* A "VMS" option is not needed since the VMS C-compilers * A "VMS" option is not needed since the VMS C-compilers
* provide it (no need to change sec#1, vmsconf.h handles it). * provide it (no need to change sec#1, vmsconf.h handles it).
*/ */
#define UNIX /* delete if no fork(), exec() available */ #define UNIX /* delete if no fork(), exec() available */
@@ -53,7 +52,7 @@
* Define the default window system. This should be one that is compiled * Define the default window system. This should be one that is compiled
* into your system (see defines above). Known window systems are: * into your system (see defines above). Known window systems are:
* *
* tty, X11, mac, amii, BeOS, Qt, Gem, Gnome * tty, X11, mac, amii, BeOS, Qt, Gem, Gnome
*/ */
/* MAC also means MAC windows */ /* MAC also means MAC windows */
@@ -136,40 +135,56 @@
#endif #endif
/* /*
* Section 2: Some global parameters and filenames. * 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.
* *
* If SYSCF is defined, the following configuration info is * LOGFILE, XLOGFILE, NEWS and PANICLOG refer to files in
* available in a global config space, with the compiled-in * the playground directory. Commenting out LOGFILE, XLOGFILE,
* entries as defaults: * NEWS or PANICLOG removes that feature from the game.
* 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):
* 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: * Building with debugging features enabled is now unconditional;
* SYSCF_FILE in the named file * 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.
* *
* The following options pertain to crash reporting: * SYSCF: (not supported by all ports)
* GREPPATH (the path to the system grep(1) utility) * If SYSCF is defined, the following configuration info is
* GDBPATH (the path to the system gdb(1) program) * available in a global config space, with the compiled-in
* entries as defaults:
* 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)
* 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 */ #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 #endif
#ifndef SYSCF #ifndef SYSCF
@@ -184,11 +199,20 @@
#define GREPPATH "/bin/grep" #define GREPPATH "/bin/grep"
#endif #endif
#define LOGFILE "logfile" /* larger file for debugging purposes */ /* 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 XLOGFILE "xlogfile" /* even larger logfile */
#define NEWS "news" /* the file containing the latest hack news */ #define NEWS "news" /* the file containing the latest hack news */
#define PANICLOG "paniclog" /* log of panic and impossible events */ #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 #ifndef PERSMAX
#define PERSMAX 3 /* entries per name/uid per char. allowed */ #define PERSMAX 3 /* entries per name/uid per char. allowed */
#endif #endif
@@ -207,20 +231,20 @@
#endif #endif
/* /*
* If COMPRESS is defined, it should contain the full path name of your * If COMPRESS is defined, it should contain the full path name of your
* 'compress' program. * 'compress' program.
* *
* If you define COMPRESS, you must also define COMPRESS_EXTENSION * If you define COMPRESS, you must also define COMPRESS_EXTENSION
* as the extension your compressor appends to filenames after * as the extension your compressor appends to filenames after
* compression. Currently, only UNIX fully implements * compression. Currently, only UNIX fully implements
* COMPRESS; other ports should be able to uncompress save files a * COMPRESS; other ports should be able to uncompress save files a
* la unixmain.c if so inclined. * la unixmain.c if so inclined.
* *
* Defining ZLIB_COMP builds in support for zlib compression. If you * Defining ZLIB_COMP builds in support for zlib compression. If you
* define ZLIB_COMP, you must link with a zlib library. Not all ports * define ZLIB_COMP, you must link with a zlib library. Not all ports
* support ZLIB_COMP. * support ZLIB_COMP.
* *
* COMPRESS and ZLIB_COMP are mutually exclusive. * COMPRESS and ZLIB_COMP are mutually exclusive.
* *
*/ */
@@ -234,52 +258,52 @@
#endif #endif
#ifndef COMPRESS #ifndef COMPRESS
/* # define ZLIB_COMP */ /* ZLIB for compression */ /* # define ZLIB_COMP */ /* ZLIB for compression */
#endif #endif
/* /*
* Internal Compression Options * Internal Compression Options
* *
* Internal compression options RLECOMP and ZEROCOMP alter the data * Internal compression options RLECOMP and ZEROCOMP alter the data
* that gets written to the save file by NetHack, in contrast * that gets written to the save file by NetHack, in contrast
* to COMPRESS or ZLIB_COMP which compress the entire file after * to COMPRESS or ZLIB_COMP which compress the entire file after
* the NetHack data is written out. * the NetHack data is written out.
* *
* Defining RLECOMP builds in support for internal run-length * Defining RLECOMP builds in support for internal run-length
* compression of level structures. If RLECOMP support is included * compression of level structures. If RLECOMP support is included
* it can be toggled on/off at runtime via the config file option * it can be toggled on/off at runtime via the config file option
* rlecomp. * rlecomp.
* *
* Defining ZEROCOMP builds in support for internal zero-comp * Defining ZEROCOMP builds in support for internal zero-comp
* compression of data. If ZEROCOMP support is included it can still * compression of data. If ZEROCOMP support is included it can still
* be toggled on/off at runtime via the config file option zerocomp. * be toggled on/off at runtime via the config file option zerocomp.
* *
* RLECOMP and ZEROCOMP support can be included even if * RLECOMP and ZEROCOMP support can be included even if
* COMPRESS or ZLIB_COMP support is included. One reason for doing * COMPRESS or ZLIB_COMP support is included. One reason for doing
* so would be to provide savefile read compatibility with a savefile * so would be to provide savefile read compatibility with a savefile
* where those options were in effect. With RLECOMP and/or ZEROCOMP * where those options were in effect. With RLECOMP and/or ZEROCOMP
* defined, NetHack can read an rlecomp or zerocomp savefile in, yet * defined, NetHack can read an rlecomp or zerocomp savefile in, yet
* re-save without them. * re-save without them.
* *
* Using any compression option will create smaller bones/level/save * Using any compression option will create smaller bones/level/save
* files at the cost of additional code and time. * files at the cost of additional code and time.
*/ */
/* # define INTERNAL_COMP */ /* defines both ZEROCOMP and RLECOMP */ /* # define INTERNAL_COMP */ /* defines both ZEROCOMP and RLECOMP */
/* # define ZEROCOMP */ /* Support ZEROCOMP compression */ /* # define ZEROCOMP */ /* Support ZEROCOMP compression */
/* # define RLECOMP */ /* Support RLECOMP compression */ /* # define RLECOMP */ /* Support RLECOMP compression */
/* /*
* Data librarian. Defining DLB places most of the support files into * Data librarian. Defining DLB places most of the support files into
* a tar-like file, thus making a neater installation. See *conf.h * a tar-like file, thus making a neater installation. See *conf.h
* for detailed configuration. * for detailed configuration.
*/ */
/* #define DLB */ /* not supported on all platforms */ /* #define DLB */ /* not supported on all platforms */
/* /*
* Defining INSURANCE slows down level changes, but allows games that * Defining INSURANCE slows down level changes, but allows games that
* died due to program or system crashes to be resumed from the point * died due to program or system crashes to be resumed from the point
* of the last level change, after running a utility program. * of the last level change, after running a utility program.
*/ */
#define INSURANCE /* allow crashed game recovery */ #define INSURANCE /* allow crashed game recovery */
@@ -299,7 +323,7 @@
/* /*
* Some system administrators are stupid enough to make Hack suid root * Some system administrators are stupid enough to make Hack suid root
* or suid daemon, where daemon has other powers besides that of reading or * or suid daemon, where daemon has other powers besides that of reading or
* writing Hack files. In such cases one should be careful with chdir's * writing Hack files. In such cases one should be careful with chdir's
* since the user might create files in a directory of his choice. * since the user might create files in a directory of his choice.
* Of course SECURE is meaningful only if HACKDIR is defined. * Of course SECURE is meaningful only if HACKDIR is defined.
*/ */
@@ -313,15 +337,15 @@
*/ */
#endif /* CHDIR */ #endif /* CHDIR */
/* If GENERIC_USERNAMES is defined, and the user name is found /* If GENERIC_USERNAMES is defined, and the player's username is found
* in that list, prompt for username instead. * in the list, prompt for character name instead of using username.
* A public server should probably disable this. */ * A public server should probably disable this. */
#define GENERIC_USERNAMES "play player game games nethack nethacker" #define GENERIC_USERNAMES "play player game games nethack nethacker"
/* /*
* Section 3: Definitions that may vary with system type. * Section 3: Definitions that may vary with system type.
* For example, both schar and uchar should be short ints on * For example, both schar and uchar should be short ints on
* the AT&T 3B2/3B5/etc. family. * the AT&T 3B2/3B5/etc. family.
*/ */
/* /*
@@ -341,13 +365,11 @@
#include "tradstdc.h" #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; * typedef char schar;
* * will do when you have signed characters; otherwise use
* will do when you have signed characters; otherwise use * typedef short int schar;
*
* typedef short int schar;
*/ */
#ifdef AZTEC #ifdef AZTEC
#define schar char #define schar char
@@ -356,14 +378,11 @@ typedef signed char schar;
#endif #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; * 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; * typedef unsigned short int uchar;
* otherwise use
*
* typedef unsigned short int uchar;
*/ */
#ifndef _AIX32 /* identical typedef in system file causes trouble */ #ifndef _AIX32 /* identical typedef in system file causes trouble */
typedef unsigned char uchar; typedef unsigned char uchar;
@@ -400,7 +419,6 @@ typedef unsigned char uchar;
#endif #endif
#endif #endif
#if !defined(MAC) #if !defined(MAC)
#if !defined(NOCLIPPING) #if !defined(NOCLIPPING)
#define CLIPPING /* allow smaller screens -- ERS */ #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 */ #define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */
/* /*
* Section 4: EXPERIMENTAL STUFF * Section 4: EXPERIMENTAL STUFF
* *
@@ -418,13 +435,23 @@ typedef unsigned char uchar;
* bugs left here. * 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
/* #define STATUS_HILITES */ /* support hilites of status fields */ updating process */
/* #define WINCHAIN*/ /* stacked window systems */ /* #define STATUS_HILITES */ /* support hilites of status fields */
/* #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 */ /* #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 */ /* End of Section 4 */