UNIX, VMS, DEF_PAGER, MICRO and MFLOPPY globals moved to g.
This commit is contained in:
@@ -209,9 +209,9 @@ char *argv[];
|
||||
#endif
|
||||
|
||||
#ifdef DEF_PAGER
|
||||
if (!(catmore = nh_getenv("HACKPAGER"))
|
||||
&& !(catmore = nh_getenv("PAGER")))
|
||||
catmore = DEF_PAGER;
|
||||
if (!(g.catmore = nh_getenv("HACKPAGER"))
|
||||
&& !(g.catmore = nh_getenv("PAGER")))
|
||||
g.catmore = DEF_PAGER;
|
||||
#endif
|
||||
#ifdef MAIL
|
||||
getmailstatus();
|
||||
@@ -241,7 +241,7 @@ char *argv[];
|
||||
|
||||
if (wizard) {
|
||||
/* use character name rather than lock letter for file names */
|
||||
locknum = 0;
|
||||
g.lockum = 0;
|
||||
} else {
|
||||
/* suppress interrupts while processing lock file */
|
||||
(void) signal(SIGQUIT, SIG_IGN);
|
||||
@@ -266,14 +266,14 @@ attempt_restore:
|
||||
|
||||
/*
|
||||
* getlock() complains and quits if there is already a game
|
||||
* in progress for current character name (when locknum == 0)
|
||||
* or if there are too many active games (when locknum > 0).
|
||||
* in progress for current character name (when g.lockum == 0)
|
||||
* or if there are too many active games (when g.lockum > 0).
|
||||
* When proceeding, it creates an empty <lockname>.0 file to
|
||||
* designate the current game.
|
||||
* getlock() constructs <lockname> based on the character
|
||||
* name (for !locknum) or on first available of alock, block,
|
||||
* name (for !g.lockum) or on first available of alock, block,
|
||||
* clock, &c not currently in use in the playground directory
|
||||
* (for locknum > 0).
|
||||
* (for g.lockum > 0).
|
||||
*/
|
||||
if (*g.plname) {
|
||||
getlock();
|
||||
@@ -327,7 +327,7 @@ attempt_restore:
|
||||
if locking alphabetically, the existing lock file
|
||||
can still be used; otherwise, discard current one
|
||||
and create another for the new character name */
|
||||
if (!locknum) {
|
||||
if (!g.lockum) {
|
||||
delete_levelfile(0); /* remove empty lock file */
|
||||
getlock();
|
||||
}
|
||||
@@ -452,17 +452,17 @@ char *argv[];
|
||||
#else
|
||||
/* XXX This is deprecated in favor of SYSCF with MAXPLAYERS */
|
||||
if (argc > 1)
|
||||
locknum = atoi(argv[1]);
|
||||
g.lockum = atoi(argv[1]);
|
||||
#endif
|
||||
#ifdef MAX_NR_OF_PLAYERS
|
||||
/* limit to compile-time limit */
|
||||
if (!locknum || locknum > MAX_NR_OF_PLAYERS)
|
||||
locknum = MAX_NR_OF_PLAYERS;
|
||||
if (!g.lockum || g.lockum > MAX_NR_OF_PLAYERS)
|
||||
g.lockum = MAX_NR_OF_PLAYERS;
|
||||
#endif
|
||||
#ifdef SYSCF
|
||||
/* let syscf override compile-time limit */
|
||||
if (!locknum || (sysopt.maxplayers && locknum > sysopt.maxplayers))
|
||||
locknum = sysopt.maxplayers;
|
||||
if (!g.lockum || (sysopt.maxplayers && g.lockum > sysopt.maxplayers))
|
||||
g.lockum = sysopt.maxplayers;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user