Add recordfile control to SYSCF.
Add sys/unix/sysconf, a sample sysconf file. Move defines from topten.c to config.h so they can be seen globally. Add persmax, pers_is_uid, entrymax, and pointsmin to struct sysopt, use in topten.c, populate in files.c Warning cleanup in files.c. BUGFIX: don't crash in unixmain.c if WIZARDS left unspecified. hints/macosx10.5: don't hardcode "keni"; install sample sysconf; install sample ~/nethackrc makedefs: add "system configuration" to compiled-with options list. BUGFIX: if a game doesn't meet the criteria for making the record file it's shown to the user as having zero points because t1->points is set to zero to indicate that it doesn't get written back; display u.urexp instead.
This commit is contained in:
@@ -155,6 +155,11 @@
|
||||
* 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)
|
||||
*
|
||||
* The following options select how the config space is stored:
|
||||
* SYSCF_FILE in the named file
|
||||
@@ -175,6 +180,27 @@
|
||||
#define NEWS "news" /* the file containing the latest hack news */
|
||||
#define PANICLOG "paniclog" /* log of panic and impossible events */
|
||||
|
||||
#ifndef PERSMAX
|
||||
# define PERSMAX 3 /* entries per name/uid per char. allowed */
|
||||
#endif
|
||||
#ifndef POINTSMIN
|
||||
# define POINTSMIN 1 /* must be > 0 */
|
||||
#endif
|
||||
#ifndef ENTRYMAX
|
||||
# define ENTRYMAX 100 /* must be >= 10 */
|
||||
#endif
|
||||
#ifndef PERS_IS_UID
|
||||
# define PERS_IS_UID 1 /* delete for PERSMAX per name; now per uid */
|
||||
#endif
|
||||
#ifndef PERS_IS_UID
|
||||
# if !defined(MICRO) && !defined(MAC) && !defined(WIN32)
|
||||
# define PERS_IS_UID 1 /* delete for PERSMAX per name; now per uid */
|
||||
# else
|
||||
# define PERS_IS_UID 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* If COMPRESS is defined, it should contain the full path name of your
|
||||
* 'compress' program.
|
||||
|
||||
@@ -15,6 +15,11 @@ struct sysopt {
|
||||
char *wizards;
|
||||
char *shellers; /* like wizards, for ! command (-DSHELL) */
|
||||
int maxplayers;
|
||||
/* record file */
|
||||
int persmax;
|
||||
int pers_is_uid;
|
||||
int entrymax;
|
||||
int pointsmin;
|
||||
};
|
||||
E struct sysopt sysopt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user