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:
13
src/sys.c
13
src/sys.c
@@ -16,5 +16,18 @@ sys_early_init(){
|
||||
sysopt.wizards = NULL;
|
||||
sysopt.shellers = NULL;
|
||||
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
|
||||
|
||||
/* record file */
|
||||
sysopt.persmax = PERSMAX;
|
||||
sysopt.entrymax = ENTRYMAX;
|
||||
sysopt.pointsmin = POINTSMIN;
|
||||
sysopt.pers_is_uid = PERS_IS_UID;
|
||||
|
||||
/* sanity checks */
|
||||
if(PERSMAX<1) sysopt.persmax = 1;
|
||||
if(ENTRYMAX<10) sysopt.entrymax = 10;
|
||||
if(POINTSMIN<1) sysopt.pointsmin = 1;
|
||||
if(PERS_IS_UID != 0 && PERS_IS_UID != 1)
|
||||
die("config error: PERS_IS_UID must be either 0 or 1");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user