remove register from variable declarations
This commit is contained in:
@@ -67,7 +67,7 @@ nhmain(int argc, char *argv[])
|
||||
#endif /* __EMSCRIPTEN__ */
|
||||
{
|
||||
#ifdef CHDIR
|
||||
register char *dir;
|
||||
char *dir;
|
||||
#endif
|
||||
NHFILE *nhfp;
|
||||
boolean exact_username;
|
||||
@@ -535,7 +535,7 @@ whoami(void)
|
||||
* somebody else's name.
|
||||
*/
|
||||
if (!*gp.plname) {
|
||||
register const char *s;
|
||||
const char *s;
|
||||
|
||||
s = nh_getenv("USER");
|
||||
if (!s || !*s)
|
||||
|
||||
@@ -88,7 +88,7 @@ boolean
|
||||
pcmain(int argc, char *argv[])
|
||||
{
|
||||
NHFILE *nhfp;
|
||||
register char *dir;
|
||||
char *dir;
|
||||
#if defined(MSDOS)
|
||||
char *envp = NULL;
|
||||
char *sptr = NULL;
|
||||
|
||||
@@ -39,7 +39,7 @@ static int eraseoldlocks(void);
|
||||
static int
|
||||
eraseoldlocks(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
/* cannot use maxledgerno() here, because we need to find a lock name
|
||||
* before starting everything (including the dungeon initialization
|
||||
@@ -63,7 +63,7 @@ eraseoldlocks(void)
|
||||
void
|
||||
getlock(void)
|
||||
{
|
||||
register int fd, c, ci, ct;
|
||||
int fd, c, ci, ct;
|
||||
int fcmask = FCMASK;
|
||||
char tbuf[BUFSZ];
|
||||
const char *fq_lock;
|
||||
@@ -201,13 +201,13 @@ gotlock:
|
||||
#endif /* PC_LOCKING */
|
||||
|
||||
void
|
||||
regularize(register char *s)
|
||||
regularize(char *s)
|
||||
/*
|
||||
* normalize file name - we don't like .'s, /'s, spaces, and
|
||||
* lots of other things
|
||||
*/
|
||||
{
|
||||
register char *lp;
|
||||
char *lp;
|
||||
|
||||
for (lp = s; *lp; lp++)
|
||||
if (*lp <= ' ' || *lp == '"' || (*lp >= '*' && *lp <= ',')
|
||||
|
||||
@@ -489,8 +489,8 @@ tputs(const char *string, /* characters to output */
|
||||
int (*output_func)(int)) /* actual output routine;
|
||||
* return value ignored */
|
||||
{
|
||||
register int c, num = 0;
|
||||
register const char *p = string;
|
||||
int c, num = 0;
|
||||
const char *p = string;
|
||||
|
||||
if (!p || !*p)
|
||||
return;
|
||||
|
||||
@@ -254,7 +254,7 @@ outdec(char *p, FILE *f, int n)
|
||||
|
||||
char *
|
||||
index(sp, c)
|
||||
register char *sp, c;
|
||||
char *sp, c;
|
||||
{
|
||||
do {
|
||||
if (*sp == c)
|
||||
|
||||
@@ -79,7 +79,7 @@ veryold(int fd)
|
||||
static int
|
||||
eraseoldlocks(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
#if defined(HANGUPHANDLING)
|
||||
gp.program_state.preserve_locks = 0; /* not required but shows intent */
|
||||
@@ -256,7 +256,7 @@ getlock(void)
|
||||
void
|
||||
regularize(char *s)
|
||||
{
|
||||
register char *lp;
|
||||
char *lp;
|
||||
|
||||
while ((lp = strchr(s, '.')) != 0 || (lp = strchr(s, '/')) != 0
|
||||
|| (lp = strchr(s, ' ')) != 0)
|
||||
@@ -329,7 +329,7 @@ dosh(void)
|
||||
int
|
||||
child(int wt)
|
||||
{
|
||||
register int f;
|
||||
int f;
|
||||
|
||||
suspend_nhwindows((char *) 0); /* also calls end_screen() */
|
||||
#ifdef _M_UNIX
|
||||
|
||||
@@ -249,7 +249,7 @@ same_dir(const char *d1, const char *d2)
|
||||
int
|
||||
c__translate(int code)
|
||||
{
|
||||
register int trans;
|
||||
int trans;
|
||||
|
||||
/* clang-format off */
|
||||
/* *INDENT-OFF* */
|
||||
@@ -309,7 +309,7 @@ vms_basename(const char *name, boolean keep_suffix)
|
||||
{
|
||||
unsigned len;
|
||||
char *base, *base_p, *xtra_p;
|
||||
register const char *name_p;
|
||||
const char *name_p;
|
||||
|
||||
/* skip directory/path */
|
||||
if ((name_p = strrchr(name, ']')) != 0)
|
||||
|
||||
@@ -125,7 +125,7 @@ parse_brdcst(char *buf) /* called by parse_next_broadcast() */
|
||||
char *txt;
|
||||
const char *nam, *cmd;
|
||||
#ifdef SHELL /* only parse if spawned commands are enabled */
|
||||
register char *p, *q;
|
||||
char *p, *q;
|
||||
boolean is_jnet_send;
|
||||
char user[127 + 1], node[127 + 1], sentinel;
|
||||
|
||||
@@ -305,10 +305,10 @@ parse_brdcst(char *buf) /* called by parse_next_broadcast() */
|
||||
|
||||
/* filter out non-printable characters and redundant noise
|
||||
*/
|
||||
static void filter_brdcst(register char *buf) /* called by parse_next_broadcast() */
|
||||
static void filter_brdcst(char *buf) /* called by parse_next_broadcast() */
|
||||
/* in: original text; out: filtered text */
|
||||
{
|
||||
register char c, *p, *buf_p;
|
||||
char c, *p, *buf_p;
|
||||
|
||||
/* filter the text; restrict consecutive spaces or dots to just two */
|
||||
for (p = buf_p = buf; *buf_p; buf_p++) {
|
||||
|
||||
@@ -40,7 +40,7 @@ main(int argc, char *argv[])
|
||||
{
|
||||
NHFILE *nhfp;
|
||||
#ifdef CHDIR
|
||||
register char *dir;
|
||||
char *dir;
|
||||
#endif
|
||||
boolean resuming = FALSE; /* assume new game */
|
||||
|
||||
@@ -388,7 +388,7 @@ whoami(void)
|
||||
* Note that we trust the user here; it is possible to play under
|
||||
* somebody else's name.
|
||||
*/
|
||||
register char *s;
|
||||
char *s;
|
||||
|
||||
if (!*gp.plname && (s = nh_getenv("USER")))
|
||||
(void) lcase(strncpy(gp.plname, s, sizeof(gp.plname) - 1));
|
||||
|
||||
@@ -293,7 +293,7 @@ static const char *arrow_or_PF = "ABCDPQRS", /* suffix char */
|
||||
/* Ultimate return value is (index into smg_keypad_codes[] + 256). */
|
||||
|
||||
static short
|
||||
parse_function_key(register int c)
|
||||
parse_function_key(int c)
|
||||
{
|
||||
struct _rd_iosb iosb;
|
||||
unsigned long sts;
|
||||
@@ -319,8 +319,8 @@ parse_function_key(register int c)
|
||||
} else
|
||||
sts = SS$_NORMAL;
|
||||
if (vms_ok(sts) || sts == SS$_TIMEOUT) {
|
||||
register int cnt = iosb.trm_offset + iosb.trm_siz + inc;
|
||||
register char *p = seq_buf;
|
||||
int cnt = iosb.trm_offset + iosb.trm_siz + inc;
|
||||
char *p = seq_buf;
|
||||
|
||||
if (c == ESC) /* check for 7-bit vt100/ANSI, or vt52 */
|
||||
if (*p == '[' || *p == 'O')
|
||||
@@ -328,7 +328,7 @@ parse_function_key(register int c)
|
||||
else if (strchr(arrow_or_PF, *p))
|
||||
c = SS3; /*CSI*/
|
||||
if (cnt > 0 && (c == SS3 || (c == CSI && strchr(arrow_or_PF, *p)))) {
|
||||
register char *q = strchr(smg_keypad_codes, *p);
|
||||
char *q = strchr(smg_keypad_codes, *p);
|
||||
|
||||
if (q)
|
||||
result = 256 + (q - smg_keypad_codes);
|
||||
|
||||
@@ -57,7 +57,7 @@ static void hack_resume(boolean);
|
||||
static int
|
||||
veryold(int fd)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
time_t date;
|
||||
struct stat buf;
|
||||
|
||||
@@ -99,7 +99,7 @@ veryold(int fd)
|
||||
void
|
||||
getlock(void)
|
||||
{
|
||||
register int i = 0, fd;
|
||||
int i = 0, fd;
|
||||
|
||||
/* idea from rpick%ucqais@uccba.uc.edu
|
||||
* prevent automated rerolling of characters
|
||||
@@ -165,9 +165,9 @@ getlock(void)
|
||||
}
|
||||
|
||||
/* normalize file name */
|
||||
void regularize(register char *s)
|
||||
void regularize(char *s)
|
||||
{
|
||||
register char *lp;
|
||||
char *lp;
|
||||
|
||||
for (lp = s; *lp; lp++) /* note: '-' becomes '_' */
|
||||
if (!(isalpha(*lp) || isdigit(*lp) || *lp == '$'))
|
||||
@@ -308,7 +308,7 @@ verify_term(void)
|
||||
|
||||
if (devtype && vms_ok(smg$init_term_table_by_type(&devtype, &termtab,
|
||||
&smgdsc))) {
|
||||
register char *p = &smgdevtyp[smgdsc.dsc$w_length];
|
||||
char *p = &smgdevtyp[smgdsc.dsc$w_length];
|
||||
/* strip trailing blanks */
|
||||
while (p > smgdevtyp && *--p == ' ')
|
||||
*p = '\0';
|
||||
|
||||
@@ -1250,7 +1250,7 @@ windows_getlin(const char* prompt UNUSED, char* outbuf)
|
||||
static int
|
||||
eraseoldlocks(void)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
/* cannot use maxledgerno() here, because we need to find a lock name
|
||||
* before starting everything (including the dungeon initialization
|
||||
@@ -1454,7 +1454,7 @@ file_newer(const char* a_path, const char* b_path)
|
||||
int
|
||||
tty_self_recover_prompt(void)
|
||||
{
|
||||
register int c, ci, ct, pl, retval = 0;
|
||||
int c, ci, ct, pl, retval = 0;
|
||||
/* for saving/replacing functions, if needed */
|
||||
struct window_procs saved_procs = {0};
|
||||
|
||||
@@ -1522,7 +1522,7 @@ tty_self_recover_prompt(void)
|
||||
int
|
||||
other_self_recover_prompt(void)
|
||||
{
|
||||
register int c, ci, ct, pl, retval = 0;
|
||||
int c, ci, ct, pl, retval = 0;
|
||||
boolean ismswin = WINDOWPORT(mswin),
|
||||
iscurses = WINDOWPORT(curses);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user