From ab73df996f4ae83650eacac2088de43706831f34 Mon Sep 17 00:00:00 2001 From: Bart House Date: Tue, 25 Dec 2018 09:40:30 -0800 Subject: [PATCH] Fix typo lockum -> locknum --- sys/unix/unixmain.c | 22 +++++++++++----------- sys/unix/unixunix.c | 10 +++++----- sys/vms/vmsmain.c | 18 +++++++++--------- sys/vms/vmsunix.c | 12 ++++++------ 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index f4a233885..90950ad28 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -241,7 +241,7 @@ char *argv[]; if (wizard) { /* use character name rather than lock letter for file names */ - g.lockum = 0; + g.locknum = 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 g.lockum == 0) - * or if there are too many active games (when g.lockum > 0). + * in progress for current character name (when g.locknum == 0) + * or if there are too many active games (when g.locknum > 0). * When proceeding, it creates an empty .0 file to * designate the current game. * getlock() constructs based on the character - * name (for !g.lockum) or on first available of alock, block, + * name (for !g.locknum) or on first available of alock, block, * clock, &c not currently in use in the playground directory - * (for g.lockum > 0). + * (for g.locknum > 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 (!g.lockum) { + if (!g.locknum) { 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) - g.lockum = atoi(argv[1]); + g.locknum = atoi(argv[1]); #endif #ifdef MAX_NR_OF_PLAYERS /* limit to compile-time limit */ - if (!g.lockum || g.lockum > MAX_NR_OF_PLAYERS) - g.lockum = MAX_NR_OF_PLAYERS; + if (!g.locknum || g.locknum > MAX_NR_OF_PLAYERS) + g.locknum = MAX_NR_OF_PLAYERS; #endif #ifdef SYSCF /* let syscf override compile-time limit */ - if (!g.lockum || (sysopt.maxplayers && g.lockum > sysopt.maxplayers)) - g.lockum = sysopt.maxplayers; + if (!g.locknum || (sysopt.maxplayers && g.locknum > sysopt.maxplayers)) + g.locknum = sysopt.maxplayers; #endif } diff --git a/sys/unix/unixunix.c b/sys/unix/unixunix.c index 9db7ba9f5..3fa83ae8a 100644 --- a/sys/unix/unixunix.c +++ b/sys/unix/unixunix.c @@ -119,15 +119,15 @@ getlock() /* default value of lock[] is "1lock" where '1' gets changed to 'a','b',&c below; override the default and use if we aren't restricting the number of simultaneous games */ - if (!g.lockum) + if (!g.locknum) Sprintf(lock, "%u%s", (unsigned) getuid(), g.plname); regularize(lock); set_levelfile_name(lock, 0); - if (g.lockum) { - if (g.lockum > 25) - g.lockum = 25; + if (g.locknum) { + if (g.locknum > 25) + g.locknum = 25; do { lock[0] = 'a' + i++; @@ -145,7 +145,7 @@ getlock() if (veryold(fd) && eraseoldlocks()) goto gotlock; (void) close(fd); - } while (i < g.lockum); + } while (i < g.locknum); unlock_file(HLOCK); error("Too many hacks running now."); diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index 8233d53f5..0764b1d7b 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -141,7 +141,7 @@ char *argv[]; if (wizard) { /* use character name rather than lock letter for file names */ - g.lockum = 0; + g.locknum = 0; } else { /* suppress interrupts while processing lock file */ (void) signal(SIGQUIT, SIG_IGN); @@ -149,14 +149,14 @@ char *argv[]; } /* * getlock() complains and quits if there is already a game - * in progress for current character name (when g.lockum == 0) - * or if there are too many active games (when g.lockum > 0). + * in progress for current character name (when g.locknum == 0) + * or if there are too many active games (when g.locknum > 0). * When proceeding, it creates an empty .0 file to * designate the current game. * getlock() constructs based on the character - * name (for !g.lockum) or on first available of alock, block, + * name (for !g.locknum) or on first available of alock, block, * clock, &c not currently in use in the playground directory - * (for g.lockum > 0). + * (for g.locknum > 0). */ getlock(); @@ -212,7 +212,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 (!g.lockum) { + if (!g.locknum) { delete_levelfile(0); /* remove empty lock file */ getlock(); } @@ -315,10 +315,10 @@ char *argv[]; } if (argc > 1) - g.lockum = atoi(argv[1]); + g.locknum = atoi(argv[1]); #ifdef MAX_NR_OF_PLAYERS - if (!g.lockum || g.lockum > MAX_NR_OF_PLAYERS) - g.lockum = MAX_NR_OF_PLAYERS; + if (!g.locknum || g.locknum > MAX_NR_OF_PLAYERS) + g.locknum = MAX_NR_OF_PLAYERS; #endif } diff --git a/sys/vms/vmsunix.c b/sys/vms/vmsunix.c index d5e63b969..fd0e10b6e 100644 --- a/sys/vms/vmsunix.c +++ b/sys/vms/vmsunix.c @@ -109,16 +109,16 @@ getlock() /* default value of lock[] is "1lock" where '1' gets changed to 'a','b',&c below; override the default and use if we aren't restricting the number of simultaneous games */ - if (!g.lockum) + if (!g.locknum) Sprintf(lock, "_%u%s", (unsigned) getuid(), plname); regularize(lock); set_levelfile_name(lock, 0); - if (g.lockum > 25) - g.lockum = 25; + if (g.locknum > 25) + g.locknum = 25; do { - if (g.lockum) + if (g.locknum) lock[0] = 'a' + i++; if ((fd = open(lock, 0, 0)) == -1) { @@ -132,10 +132,10 @@ getlock() if (veryold(fd)) /* if true, this closes fd and unlinks lock */ goto gotlock; (void) close(fd); - } while (i < g.lockum); + } while (i < g.locknum); unlock_file(HLOCK); - error(g.lockum ? "Too many hacks running now." + error(g.locknum ? "Too many hacks running now." : "There is a game in progress under your name."); gotlock: