removed all stupid register declarations

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1033 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-11-17 20:04:43 +00:00
parent 856df79afc
commit 239db0f710
37 changed files with 215 additions and 214 deletions

View File

@@ -562,7 +562,7 @@ static int
glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
glob_t *pglob) glob_t *pglob)
{ {
register struct dirent *dp; struct dirent *dp;
DIR *dirp; DIR *dirp;
int err; int err;
char buf[MaxPathLen]; char buf[MaxPathLen];
@@ -597,8 +597,8 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
else else
readdirfunc = (struct dirent *(*)(void *))readdir; readdirfunc = (struct dirent *(*)(void *))readdir;
while ((dp = (*readdirfunc)(dirp))) { while ((dp = (*readdirfunc)(dirp))) {
register u_char *sc; u_char *sc;
register Char *dc; Char *dc;
/* Initial DOT must be matched literally. */ /* Initial DOT must be matched literally. */
if (dp->d_name[0] == DOT && *pattern != DOT) if (dp->d_name[0] == DOT && *pattern != DOT)
@@ -640,8 +640,8 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
static int static int
globextend(const Char *path, glob_t *pglob) globextend(const Char *path, glob_t *pglob)
{ {
register char **pathv; char **pathv;
register int i; int i;
u_int newsize; u_int newsize;
char *copy; char *copy;
const Char *p; const Char *p;
@@ -726,8 +726,8 @@ match(Char *name, Char *pat, Char *patend)
void void
globfree(glob_t *pglob) globfree(glob_t *pglob)
{ {
register int i; int i;
register char **pp; char **pp;
if (pglob->gl_pathv != NULL) { if (pglob->gl_pathv != NULL) {
pp = pglob->gl_pathv + pglob->gl_offs; pp = pglob->gl_pathv + pglob->gl_offs;
@@ -805,7 +805,7 @@ g_strcat(Char *dst, const Char *src)
static void static void
g_Ctoc(const Char *str, char *buf) g_Ctoc(const Char *str, char *buf)
{ {
register char *dc; char *dc;
for (dc = buf; (*dc++ = *str++) != EOS;) for (dc = buf; (*dc++ = *str++) != EOS;)
continue; continue;
@@ -815,7 +815,7 @@ g_Ctoc(const Char *str, char *buf)
static void static void
qprintf(const Char *str, Char *s) qprintf(const Char *str, Char *s)
{ {
register Char *p; Char *p;
(void)printf("%s:\n", str); (void)printf("%s:\n", str);
for (p = s; *p; p++) for (p = s; *p; p++)

View File

@@ -985,7 +985,7 @@ char *
getline(char *s, int n) getline(char *s, int n)
{ {
int c; int c;
register char *cs; char *cs;
cs = s; cs = s;
/* tmpline may contain saved command from urgent mode interruption */ /* tmpline may contain saved command from urgent mode interruption */
@@ -1036,8 +1036,8 @@ getline(char *s, int n)
/* Don't syslog passwords */ /* Don't syslog passwords */
syslog(LOG_DEBUG, "command: %.5s ???", s); syslog(LOG_DEBUG, "command: %.5s ???", s);
} else { } else {
register char *cp; char *cp;
register int len; int len;
/* Don't syslog trailing CR-LF */ /* Don't syslog trailing CR-LF */
len = strlen(s); len = strlen(s);

View File

@@ -56,7 +56,7 @@ pop_dropinfo(POP *p)
char buffer[BUFSIZ]; /* Read buffer */ char buffer[BUFSIZ]; /* Read buffer */
MsgInfoList * mp; /* Pointer to message MsgInfoList * mp; /* Pointer to message
info list */ info list */
register int msg_num; /* Current message int msg_num; /* Current message
counter */ counter */
int nchar; /* Bytes written/read */ int nchar; /* Bytes written/read */
#ifdef UIDL #ifdef UIDL

View File

@@ -15,8 +15,8 @@ int
pop_list (POP *p) pop_list (POP *p)
{ {
MsgInfoList * mp; /* Pointer to message info list */ MsgInfoList * mp; /* Pointer to message info list */
register int i; int i;
register int msg_num; int msg_num;
/* Was a message number provided? */ /* Was a message number provided? */
if (p->parm_count > 0) { if (p->parm_count > 0) {

View File

@@ -14,9 +14,10 @@ RCSID("$Id$");
int int
pop_msg(POP *p, int stat, char *format, ...) pop_msg(POP *p, int stat, char *format, ...)
{ {
register char * mp; char *mp;
char message[MAXLINELEN]; char message[MAXLINELEN];
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);
/* Point to the message buffer */ /* Point to the message buffer */

View File

@@ -16,7 +16,7 @@ int
pop_parse(POP *p, char *buf) pop_parse(POP *p, char *buf)
{ {
char * mp; char * mp;
register int i; int i;
/* Loop through the POP command array */ /* Loop through the POP command array */
for (mp = buf, i = 0; ; i++) { for (mp = buf, i = 0; ; i++) {

View File

@@ -15,7 +15,7 @@ int
pop_rset (POP *p) pop_rset (POP *p)
{ {
MsgInfoList * mp; /* Pointer to the message info list */ MsgInfoList * mp; /* Pointer to the message info list */
register int i; int i;
/* Unmark all the messages */ /* Unmark all the messages */
for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++)

View File

@@ -46,8 +46,8 @@ int
pop_send(POP *p) pop_send(POP *p)
{ {
MsgInfoList * mp; /* Pointer to message info list */ MsgInfoList * mp; /* Pointer to message info list */
register int msg_num; int msg_num;
register int msg_lines; int msg_lines;
char buffer[MAXMSGLINELEN]; char buffer[MAXMSGLINELEN];
#ifdef RETURN_PATH_HANDLING #ifdef RETURN_PATH_HANDLING
char * return_path_adr; char * return_path_adr;

View File

@@ -48,8 +48,8 @@ int
pop_uidl (POP *p) pop_uidl (POP *p)
{ {
MsgInfoList * mp; /* Pointer to message info list */ MsgInfoList * mp; /* Pointer to message info list */
register int i; int i;
register int msg_num; int msg_num;
/* Was a message number provided? */ /* Was a message number provided? */
if (p->parm_count > 0) { if (p->parm_count > 0) {

View File

@@ -25,9 +25,9 @@ pop_updt (POP *p)
MsgInfoList * mp; /* Pointer to message MsgInfoList * mp; /* Pointer to message
info list */ info list */
register int msg_num; /* Current message int msg_num; /* Current message
counter */ counter */
register int status_written; /* Status header field int status_written; /* Status header field
written */ written */
int nchar; /* Bytes read/written */ int nchar; /* Bytes read/written */

View File

@@ -249,7 +249,7 @@ auth_disable_name(char *name)
int int
getauthmask(char *type, int *maskp) getauthmask(char *type, int *maskp)
{ {
register int x; int x;
if (!strcasecmp(type, AUTHTYPE_NAME(0))) { if (!strcasecmp(type, AUTHTYPE_NAME(0))) {
*maskp = -1; *maskp = -1;
@@ -545,8 +545,8 @@ auth_sendname(unsigned char *cp, int len)
{ {
static unsigned char str_request[256+6] static unsigned char str_request[256+6]
= { IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_NAME, }; = { IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_NAME, };
register unsigned char *e = str_request + 4; unsigned char *e = str_request + 4;
register unsigned char *ee = &str_request[sizeof(str_request)-2]; unsigned char *ee = &str_request[sizeof(str_request)-2];
while (--len >= 0) { while (--len >= 0) {
if ((*e++ = *cp++) == IAC) if ((*e++ = *cp++) == IAC)
@@ -628,7 +628,7 @@ auth_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
void void
auth_gen_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen) auth_gen_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
{ {
register unsigned char *cp; unsigned char *cp;
unsigned char tbuf[16]; unsigned char tbuf[16];
cnt -= 3; cnt -= 3;

View File

@@ -173,7 +173,7 @@ static int fb64_start(struct fb *fbp, int dir, int server)
{ {
int x; int x;
unsigned char *p; unsigned char *p;
register int state; int state;
switch (dir) { switch (dir) {
case DIR_DECRYPT: case DIR_DECRYPT:
@@ -263,7 +263,7 @@ int ofb64_is(unsigned char *data, int cnt)
int fb64_is(unsigned char *data, int cnt, struct fb *fbp) int fb64_is(unsigned char *data, int cnt, struct fb *fbp)
{ {
unsigned char *p; unsigned char *p;
register int state = fbp->state[DIR_DECRYPT-1]; int state = fbp->state[DIR_DECRYPT-1];
if (cnt-- < 1) if (cnt-- < 1)
goto failure; goto failure;
@@ -344,7 +344,7 @@ int ofb64_reply(unsigned char *data, int cnt)
int fb64_reply(unsigned char *data, int cnt, struct fb *fbp) int fb64_reply(unsigned char *data, int cnt, struct fb *fbp)
{ {
register int state = fbp->state[DIR_ENCRYPT-1]; int state = fbp->state[DIR_ENCRYPT-1];
if (cnt-- < 1) if (cnt-- < 1)
goto failure; goto failure;
@@ -437,7 +437,7 @@ int ofb64_keyid(int dir, unsigned char *kp, int *lenp)
int fb64_keyid(int dir, unsigned char *kp, int *lenp, struct fb *fbp) int fb64_keyid(int dir, unsigned char *kp, int *lenp, struct fb *fbp)
{ {
register int state = fbp->state[dir-1]; int state = fbp->state[dir-1];
if (*lenp != 1 || (*kp != '\0')) { if (*lenp != 1 || (*kp != '\0')) {
*lenp = 0; *lenp = 0;
@@ -456,7 +456,7 @@ void fb64_printsub(unsigned char *data, int cnt,
unsigned char *buf, int buflen, char *type) unsigned char *buf, int buflen, char *type)
{ {
char lbuf[32]; char lbuf[32];
register int i; int i;
char *cp; char *cp;
buf[buflen-1] = '\0'; /* make sure it's NULL terminated */ buf[buflen-1] = '\0'; /* make sure it's NULL terminated */
@@ -516,7 +516,7 @@ void fb64_stream_iv(des_cblock seed, struct stinfo *stp)
stp->str_index = sizeof(des_cblock); stp->str_index = sizeof(des_cblock);
} }
void fb64_stream_key(des_cblock key, register struct stinfo *stp) void fb64_stream_key(des_cblock key, struct stinfo *stp)
{ {
memcpy((void *)stp->str_ikey, (void *)key, sizeof(des_cblock)); memcpy((void *)stp->str_ikey, (void *)key, sizeof(des_cblock));
des_key_sched((des_cblock*)key, stp->str_sched); des_key_sched((des_cblock*)key, stp->str_sched);
@@ -550,8 +550,8 @@ void fb64_stream_key(des_cblock key, register struct stinfo *stp)
void cfb64_encrypt(unsigned char *s, int c) void cfb64_encrypt(unsigned char *s, int c)
{ {
register struct stinfo *stp = &fb[CFB].streams[DIR_ENCRYPT-1]; struct stinfo *stp = &fb[CFB].streams[DIR_ENCRYPT-1];
register int index; int index;
index = stp->str_index; index = stp->str_index;
while (c-- > 0) { while (c-- > 0) {
@@ -572,7 +572,7 @@ void cfb64_encrypt(unsigned char *s, int c)
int cfb64_decrypt(int data) int cfb64_decrypt(int data)
{ {
register struct stinfo *stp = &fb[CFB].streams[DIR_DECRYPT-1]; struct stinfo *stp = &fb[CFB].streams[DIR_DECRYPT-1];
int index; int index;
if (data == -1) { if (data == -1) {
@@ -622,8 +622,8 @@ int cfb64_decrypt(int data)
void ofb64_encrypt(unsigned char *s, int c) void ofb64_encrypt(unsigned char *s, int c)
{ {
register struct stinfo *stp = &fb[OFB].streams[DIR_ENCRYPT-1]; struct stinfo *stp = &fb[OFB].streams[DIR_ENCRYPT-1];
register int index; int index;
index = stp->str_index; index = stp->str_index;
while (c-- > 0) { while (c-- > 0) {
@@ -641,7 +641,7 @@ void ofb64_encrypt(unsigned char *s, int c)
int ofb64_decrypt(int data) int ofb64_decrypt(int data)
{ {
register struct stinfo *stp = &fb[OFB].streams[DIR_DECRYPT-1]; struct stinfo *stp = &fb[OFB].streams[DIR_DECRYPT-1];
int index; int index;
if (data == -1) { if (data == -1) {

View File

@@ -241,7 +241,7 @@ EncryptEnable(char *type, char *mode)
int int
EncryptDisable(char *type, char *mode) EncryptDisable(char *type, char *mode)
{ {
register Encryptions *ep; Encryptions *ep;
int ret = 0; int ret = 0;
if (isprefix(type, "help") || isprefix(type, "?")) { if (isprefix(type, "help") || isprefix(type, "?")) {
@@ -274,7 +274,7 @@ EncryptDisable(char *type, char *mode)
int int
EncryptType(char *type, char *mode) EncryptType(char *type, char *mode)
{ {
register Encryptions *ep; Encryptions *ep;
int ret = 0; int ret = 0;
if (isprefix(type, "help") || isprefix(type, "?")) { if (isprefix(type, "help") || isprefix(type, "?")) {
@@ -305,7 +305,7 @@ EncryptType(char *type, char *mode)
int int
EncryptStart(char *mode) EncryptStart(char *mode)
{ {
register int ret = 0; int ret = 0;
if (mode) { if (mode) {
if (isprefix(mode, "input")) if (isprefix(mode, "input"))
return(EncryptStartInput()); return(EncryptStartInput());
@@ -512,7 +512,7 @@ encrypt_not(void)
void void
encrypt_support(unsigned char *typelist, int cnt) encrypt_support(unsigned char *typelist, int cnt)
{ {
register int type, use_type = 0; int type, use_type = 0;
Encryptions *ep; Encryptions *ep;
/* /*
@@ -553,7 +553,7 @@ void
encrypt_is(unsigned char *data, int cnt) encrypt_is(unsigned char *data, int cnt)
{ {
Encryptions *ep; Encryptions *ep;
register int type, ret; int type, ret;
if (--cnt < 0) if (--cnt < 0)
return; return;
@@ -597,7 +597,7 @@ void
encrypt_reply(unsigned char *data, int cnt) encrypt_reply(unsigned char *data, int cnt)
{ {
Encryptions *ep; Encryptions *ep;
register int ret, type; int ret, type;
if (--cnt < 0) if (--cnt < 0)
return; return;
@@ -736,7 +736,7 @@ void encrypt_keyid(struct key_info *kp, unsigned char *keyid, int len)
{ {
Encryptions *ep; Encryptions *ep;
int dir = kp->dir; int dir = kp->dir;
register int ret = 0; int ret = 0;
if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (!(ep = (*kp->getcrypt)(*kp->modep))) {
if (len == 0) if (len == 0)
@@ -826,8 +826,8 @@ void
encrypt_start_output(int type) encrypt_start_output(int type)
{ {
Encryptions *ep; Encryptions *ep;
register unsigned char *p; unsigned char *p;
register int i; int i;
if (!(ep = findencryption(type))) { if (!(ep = findencryption(type))) {
if (encrypt_debug_mode) { if (encrypt_debug_mode) {
@@ -902,8 +902,8 @@ encrypt_send_end(void)
void void
encrypt_send_request_start(void) encrypt_send_request_start(void)
{ {
register unsigned char *p; unsigned char *p;
register int i; int i;
p = &str_start[3]; p = &str_start[3];
*p++ = ENCRYPT_REQSTART; *p++ = ENCRYPT_REQSTART;
@@ -972,7 +972,7 @@ void
encrypt_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen) encrypt_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
{ {
Encryptions *ep; Encryptions *ep;
register int type = data[1]; int type = data[1];
for (ep = encryptions; ep->type && ep->type != type; ep++) for (ep = encryptions; ep->type && ep->type != type; ep++)
; ;

View File

@@ -50,7 +50,7 @@ int
isprefix(char *s1, char *s2) isprefix(char *s1, char *s2)
{ {
char *os1; char *os1;
register char c1, c2; char c1, c2;
if (*s1 == '\0') if (*s1 == '\0')
return(-1); return(-1);
@@ -74,8 +74,8 @@ genget(char *name, char **table, int stlen)
/* name entry in table */ /* name entry in table */
{ {
register char **c, **found; char **c, **found;
register int n; int n;
if (name == 0) if (name == 0)
return 0; return 0;

View File

@@ -432,7 +432,7 @@ void
kerberos4_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen) kerberos4_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
{ {
char lbuf[32]; char lbuf[32];
register int i; int i;
buf[buflen-1] = '\0'; /* make sure its NULL terminated */ buf[buflen-1] = '\0'; /* make sure its NULL terminated */
buflen -= 1; buflen -= 1;
@@ -523,7 +523,7 @@ prkey(msg, key)
char *msg; char *msg;
unsigned char *key; unsigned char *key;
{ {
register int i; int i;
printf("%s:", msg); printf("%s:", msg);
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
printf(" %3d", key[i]); printf(" %3d", key[i]);

View File

@@ -574,7 +574,7 @@ kerberos5_printsub(data, cnt, buf, buflen)
int cnt, buflen; int cnt, buflen;
{ {
char lbuf[32]; char lbuf[32];
register int i; int i;
buf[buflen-1] = '\0'; /* make sure its NULL terminated */ buf[buflen-1] = '\0'; /* make sure its NULL terminated */
buflen -= 1; buflen -= 1;

View File

@@ -258,7 +258,7 @@ krb4encpwd_is(ap, data, cnt)
*/ */
if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) { if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) {
register int i; int i;
time(&now); time(&now);
sprintf(challenge, "%x", now); sprintf(challenge, "%x", now);
@@ -359,7 +359,7 @@ krb4encpwd_printsub(data, cnt, buf, buflen)
int cnt, buflen; int cnt, buflen;
{ {
char lbuf[32]; char lbuf[32];
register int i; int i;
buf[buflen-1] = '\0'; /* make sure its NULL terminated */ buf[buflen-1] = '\0'; /* make sure its NULL terminated */
buflen -= 1; buflen -= 1;
@@ -436,7 +436,7 @@ prkey(msg, key)
char *msg; char *msg;
unsigned char *key; unsigned char *key;
{ {
register int i; int i;
printf("%s:", msg); printf("%s:", msg);
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
printf(" %3d", key[i]); printf(" %3d", key[i]);

View File

@@ -17,7 +17,7 @@ parsetos(name, proto)
char *name; char *name;
char *proto; char *proto;
{ {
register char *c; char *c;
int tos; int tos;
struct tosent *tosp; struct tosent *tosp;

View File

@@ -257,7 +257,7 @@ rsaencpwd_is(ap, data, cnt)
* the challenge, and verify it when the response comes back. * the challenge, and verify it when the response comes back.
*/ */
if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_ONE_WAY) { if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_ONE_WAY) {
register int i; int i;
time(&now); time(&now);
@@ -412,7 +412,7 @@ rsaencpwd_printsub(data, cnt, buf, buflen)
int cnt, buflen; int cnt, buflen;
{ {
char lbuf[32]; char lbuf[32];
register int i; int i;
buf[buflen-1] = '\0'; /* make sure its NULL terminated */ buf[buflen-1] = '\0'; /* make sure its NULL terminated */
buflen -= 1; buflen -= 1;
@@ -485,7 +485,7 @@ prkey(msg, key)
char *msg; char *msg;
unsigned char *key; unsigned char *key;
{ {
register int i; int i;
printf("%s:", msg); printf("%s:", msg);
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
printf(" %3d", key[i]); printf(" %3d", key[i]);

View File

@@ -530,7 +530,7 @@ spx_printsub(data, cnt, buf, buflen)
int cnt, buflen; int cnt, buflen;
{ {
char lbuf[32]; char lbuf[32];
register int i; int i;
buf[buflen-1] = '\0'; /* make sure its NULL terminated */ buf[buflen-1] = '\0'; /* make sure its NULL terminated */
buflen -= 1; buflen -= 1;
@@ -579,7 +579,7 @@ prkey(msg, key)
char *msg; char *msg;
unsigned char *key; unsigned char *key;
{ {
register int i; int i;
printf("%s:", msg); printf("%s:", msg);
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
printf(" %3d", key[i]); printf(" %3d", key[i]);

View File

@@ -110,8 +110,8 @@ static char *margv[20];
static void static void
makeargv() makeargv()
{ {
register char *cp, *cp2, c; char *cp, *cp2, c;
register char **argp = margv; char **argp = margv;
margc = 0; margc = 0;
cp = line; cp = line;
@@ -122,7 +122,7 @@ makeargv()
cp++; cp++;
} }
while (c = *cp) { while (c = *cp) {
register int inquote = 0; int inquote = 0;
while (isspace(c)) while (isspace(c))
c = *++cp; c = *++cp;
if (c == '\0') if (c == '\0')
@@ -166,7 +166,7 @@ makeargv()
static char special(char *s) static char special(char *s)
{ {
register char c; char c;
char b; char b;
switch (*s) { switch (*s) {
@@ -191,7 +191,7 @@ static char special(char *s)
*/ */
static char * static char *
control(c) control(c)
register cc_t c; cc_t c;
{ {
static char buf[5]; static char buf[5];
/* /*
@@ -201,7 +201,7 @@ control(c)
* was to assign "c" to an unsigned int variable... * was to assign "c" to an unsigned int variable...
* Arggg.... * Arggg....
*/ */
register unsigned int uic = (unsigned int)c; unsigned int uic = (unsigned int)c;
if (uic == 0x7f) if (uic == 0x7f)
return ("^?"); return ("^?");
@@ -404,10 +404,10 @@ send_tncmd(func, cmd, name)
{ {
char **cpp; char **cpp;
extern char *telopts[]; extern char *telopts[];
register int val = 0; int val = 0;
if (isprefix(name, "help") || isprefix(name, "?")) { if (isprefix(name, "help") || isprefix(name, "?")) {
register int col, len; int col, len;
printf("Usage: send %s <value|option>\n", cmd); printf("Usage: send %s <value|option>\n", cmd);
printf("\"value\" must be from 0 to 255\n"); printf("\"value\" must be from 0 to 255\n");
@@ -435,7 +435,7 @@ send_tncmd(func, cmd, name)
if (cpp) { if (cpp) {
val = cpp - telopts; val = cpp - telopts;
} else { } else {
register char *cp = name; char *cp = name;
while (*cp >= '0' && *cp <= '9') { while (*cp >= '0' && *cp <= '9') {
val *= 10; val *= 10;
@@ -997,7 +997,7 @@ unsetcmd(argc, argv)
{ {
struct setlist *ct; struct setlist *ct;
struct togglelist *c; struct togglelist *c;
register char *name; char *name;
if (argc < 2) { if (argc < 2) {
fprintf(stderr, fprintf(stderr,
@@ -1295,7 +1295,7 @@ setescape(argc, argv)
int argc; int argc;
char *argv[]; char *argv[];
{ {
register char *arg; char *arg;
char buf[50]; char buf[50];
printf( printf(
@@ -1376,7 +1376,7 @@ shell(int argc, char **argv)
/* /*
* Fire up the shell in the child. * Fire up the shell in the child.
*/ */
register char *shellp, *shellname; char *shellp, *shellname;
shellp = getenv("SHELL"); shellp = getenv("SHELL");
if (shellp == NULL) if (shellp == NULL)
@@ -1624,7 +1624,7 @@ struct env_lst envlisthead;
env_find(var) env_find(var)
unsigned char *var; unsigned char *var;
{ {
register struct env_lst *ep; struct env_lst *ep;
for (ep = envlisthead.next; ep; ep = ep->next) { for (ep = envlisthead.next; ep; ep = ep->next) {
if (strcmp((char *)ep->var, (char *)var) == 0) if (strcmp((char *)ep->var, (char *)var) == 0)
@@ -1641,8 +1641,8 @@ env_find(var)
env_init() env_init()
{ {
extern char **environ; extern char **environ;
register char **epp, *cp; char **epp, *cp;
register struct env_lst *ep; struct env_lst *ep;
for (epp = environ; *epp; epp++) { for (epp = environ; *epp; epp++) {
if (cp = strchr(*epp, '=')) { if (cp = strchr(*epp, '=')) {
@@ -1697,7 +1697,7 @@ env_init()
env_define(var, value) env_define(var, value)
unsigned char *var, *value; unsigned char *var, *value;
{ {
register struct env_lst *ep; struct env_lst *ep;
if (ep = env_find(var)) { if (ep = env_find(var)) {
if (ep->var) if (ep->var)
@@ -1723,7 +1723,7 @@ env_define(var, value)
env_undefine(var) env_undefine(var)
unsigned char *var; unsigned char *var;
{ {
register struct env_lst *ep; struct env_lst *ep;
if (ep = env_find(var)) { if (ep = env_find(var)) {
ep->prev->next = ep->next; ep->prev->next = ep->next;
@@ -1741,7 +1741,7 @@ env_undefine(var)
env_export(var) env_export(var)
unsigned char *var; unsigned char *var;
{ {
register struct env_lst *ep; struct env_lst *ep;
if (ep = env_find(var)) if (ep = env_find(var))
ep->export = 1; ep->export = 1;
@@ -1751,7 +1751,7 @@ env_export(var)
env_unexport(var) env_unexport(var)
unsigned char *var; unsigned char *var;
{ {
register struct env_lst *ep; struct env_lst *ep;
if (ep = env_find(var)) if (ep = env_find(var))
ep->export = 0; ep->export = 0;
@@ -1761,7 +1761,7 @@ env_unexport(var)
env_send(var) env_send(var)
unsigned char *var; unsigned char *var;
{ {
register struct env_lst *ep; struct env_lst *ep;
if (my_state_is_wont(TELOPT_NEW_ENVIRON) if (my_state_is_wont(TELOPT_NEW_ENVIRON)
#ifdef OLD_ENVIRON #ifdef OLD_ENVIRON
@@ -1787,7 +1787,7 @@ env_send(var)
void void
env_list() env_list()
{ {
register struct env_lst *ep; struct env_lst *ep;
for (ep = envlisthead.next; ep; ep = ep->next) { for (ep = envlisthead.next; ep; ep = ep->next) {
printf("%c %-20s %s\n", ep->export ? '*' : ' ', printf("%c %-20s %s\n", ep->export ? '*' : ' ',
@@ -1818,7 +1818,7 @@ env_default(init, welldefined)
env_getvalue(var) env_getvalue(var)
unsigned char *var; unsigned char *var;
{ {
register struct env_lst *ep; struct env_lst *ep;
if (ep = env_find(var)) if (ep = env_find(var))
return(ep->value); return(ep->value);
@@ -2081,7 +2081,7 @@ static Command *getcmd(char *name);
static void cmdrc(char *m1, char *m2) static void cmdrc(char *m1, char *m2)
{ {
register Command *c; Command *c;
FILE *rcfile; FILE *rcfile;
int gotmachine = 0; int gotmachine = 0;
int l1 = strlen(m1); int l1 = strlen(m1);
@@ -2160,7 +2160,7 @@ static void cmdrc(char *m1, char *m2)
int tn(int argc, char **argv) int tn(int argc, char **argv)
{ {
register struct hostent *host = 0; struct hostent *host = 0;
struct sockaddr_in sin; struct sockaddr_in sin;
struct servent *sp = 0; struct servent *sp = 0;
unsigned long temp; unsigned long temp;
@@ -2487,7 +2487,7 @@ command(top, tbuf, cnt)
char *tbuf; char *tbuf;
int cnt; int cnt;
{ {
register Command *c; Command *c;
setcommandmode(); setcommandmode();
if (!top) { if (!top) {
@@ -2500,7 +2500,7 @@ command(top, tbuf, cnt)
if (rlogin == _POSIX_VDISABLE) if (rlogin == _POSIX_VDISABLE)
printf("%s> ", prompt); printf("%s> ", prompt);
if (tbuf) { if (tbuf) {
register char *cp; char *cp;
cp = line; cp = line;
while (cnt > 0 && (*cp++ = *tbuf++) != '\n') while (cnt > 0 && (*cp++ = *tbuf++) != '\n')
cnt--; cnt--;
@@ -2559,7 +2559,7 @@ command(top, tbuf, cnt)
*/ */
static int help(int argc, char **argv) static int help(int argc, char **argv)
{ {
register Command *c; Command *c;
if (argc == 1) { if (argc == 1) {
printf("Commands may be abbreviated. Commands are:\n\n"); printf("Commands may be abbreviated. Commands are:\n\n");
@@ -2571,7 +2571,7 @@ static int help(int argc, char **argv)
return 0; return 0;
} }
while (--argc > 0) { while (--argc > 0) {
register char *arg; char *arg;
arg = *++argv; arg = *++argv;
c = getcmd(arg); c = getcmd(arg);
if (Ambiguous(c)) if (Ambiguous(c))
@@ -2637,10 +2637,10 @@ sourceroute(arg, cpp, lenp)
static IOPTN ipopt; static IOPTN ipopt;
#endif #endif
char *cp, *cp2, *lsrp, *lsrep; char *cp, *cp2, *lsrp, *lsrep;
register int tmp; int tmp;
struct in_addr sin_addr; struct in_addr sin_addr;
register struct hostent *host = 0; struct hostent *host = 0;
register char c; char c;
/* /*
* Verify the arguments, and make sure we have * Verify the arguments, and make sure we have

View File

@@ -132,7 +132,7 @@ setneturg()
int int
netflush() netflush()
{ {
register int n, n1; int n, n1;
#if defined(ENCRYPTION) #if defined(ENCRYPTION)
if (encrypt_output) if (encrypt_output)

View File

@@ -615,9 +615,9 @@ TerminalSpeeds(ispeed, ospeed)
long *ospeed; long *ospeed;
{ {
#ifdef DECODE_BAUD #ifdef DECODE_BAUD
register struct termspeeds *tp; struct termspeeds *tp;
#endif /* DECODE_BAUD */ #endif /* DECODE_BAUD */
register long in, out; long in, out;
out = cfgetospeed(&old_tc); out = cfgetospeed(&old_tc);
in = cfgetispeed(&old_tc); in = cfgetispeed(&old_tc);
@@ -797,7 +797,7 @@ sys_telnet_init()
process_rings(netin, netout, netex, ttyin, ttyout, poll) process_rings(netin, netout, netex, ttyin, ttyout, poll)
int poll; /* If 0, then block until something to do */ int poll; /* If 0, then block until something to do */
{ {
register int c; int c;
/* One wants to be a bit careful about setting returnValue /* One wants to be a bit careful about setting returnValue
* to one, since a one implies we did some useful work, * to one, since a one implies we did some useful work,
* and therefore probably won't be called to block next * and therefore probably won't be called to block next

View File

@@ -114,7 +114,7 @@ init_terminal()
ttyflush(drop) ttyflush(drop)
int drop; int drop;
{ {
register int n, n0, n1; int n, n0, n1;
n0 = ring_full_count(&ttyoring); n0 = ring_full_count(&ttyoring);
if ((n1 = n = ring_full_consecutive(&ttyoring)) > 0) { if ((n1 = n = ring_full_consecutive(&ttyoring)) > 0) {
@@ -204,7 +204,7 @@ setconnmode(force)
#ifdef ENCRYPTION #ifdef ENCRYPTION
static int enc_passwd = 0; static int enc_passwd = 0;
#endif #endif
register int newmode; int newmode;
newmode = getconnmode()|(force?MODE_FORCE:0); newmode = getconnmode()|(force?MODE_FORCE:0);

View File

@@ -72,7 +72,7 @@ int prettydump;
void void
upcase(char *argument) upcase(char *argument)
{ {
register int c; int c;
while ((c = *argument) != 0) { while ((c = *argument) != 0) {
if (islower(c)) { if (islower(c)) {
@@ -187,7 +187,7 @@ printoption(char *direction, int cmd, int option)
else else
fprintf(NetTrace, "%s IAC %d", direction, option); fprintf(NetTrace, "%s IAC %d", direction, option);
} else { } else {
register char *fmt; char *fmt;
fmt = (cmd == WILL) ? "WILL" : (cmd == WONT) ? "WONT" : fmt = (cmd == WILL) ? "WILL" : (cmd == WONT) ? "WONT" :
(cmd == DO) ? "DO" : (cmd == DONT) ? "DONT" : 0; (cmd == DO) ? "DO" : (cmd == DONT) ? "DONT" : 0;
if (fmt) { if (fmt) {
@@ -213,7 +213,7 @@ printoption(char *direction, int cmd, int option)
void void
optionstatus(void) optionstatus(void)
{ {
register int i; int i;
extern char will_wont_resp[], do_dont_resp[]; extern char will_wont_resp[], do_dont_resp[];
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
@@ -290,7 +290,7 @@ optionstatus(void)
void void
printsub(char direction, unsigned char *pointer, int length) printsub(char direction, unsigned char *pointer, int length)
{ {
register int i; int i;
char buf[512]; char buf[512];
extern int want_status_response; extern int want_status_response;
@@ -300,7 +300,7 @@ printsub(char direction, unsigned char *pointer, int length)
fprintf(NetTrace, "%s IAC SB ", fprintf(NetTrace, "%s IAC SB ",
(direction == '<')? "RCVD":"SENT"); (direction == '<')? "RCVD":"SENT");
if (length >= 3) { if (length >= 3) {
register int j; int j;
i = pointer[length-2]; i = pointer[length-2];
j = pointer[length-1]; j = pointer[length-1];
@@ -651,8 +651,8 @@ printsub(char direction, unsigned char *pointer, int length)
break; break;
case TELOPT_STATUS: { case TELOPT_STATUS: {
register char *cp; char *cp;
register int j, k; int j, k;
fprintf(NetTrace, "STATUS"); fprintf(NetTrace, "STATUS");
@@ -765,7 +765,7 @@ printsub(char direction, unsigned char *pointer, int length)
fprintf(NetTrace, "INFO "); fprintf(NetTrace, "INFO ");
env_common: env_common:
{ {
register int noquote = 2; int noquote = 2;
for (i = 2; i < length; i++ ) { for (i = 2; i < length; i++ ) {
switch (pointer[i]) { switch (pointer[i]) {
case NEW_ENV_VALUE: case NEW_ENV_VALUE:

View File

@@ -58,7 +58,7 @@ static unsigned char slcbuf[NSLC*6]; /* buffer for slc negotiation */
void void
send_slc() send_slc()
{ {
register int i; int i;
/* /*
* Send out list of triplets of special characters * Send out list of triplets of special characters
@@ -82,7 +82,7 @@ send_slc()
void void
default_slc() default_slc()
{ {
register int i; int i;
for (i = 1; i <= NSLC; i++) { for (i = 1; i <= NSLC; i++) {
slctab[i].current.val = slctab[i].defset.val; slctab[i].current.val = slctab[i].defset.val;
@@ -107,7 +107,7 @@ default_slc()
void void
get_slc_defaults(void) get_slc_defaults(void)
{ {
register int i; int i;
init_termbuf(); init_termbuf();
@@ -128,8 +128,8 @@ get_slc_defaults(void)
*/ */
void void
add_slc(func, flag, val) add_slc(func, flag, val)
register char func, flag; char func, flag;
register cc_t val; cc_t val;
{ {
if ((*slcptr++ = (unsigned char)func) == 0xff) if ((*slcptr++ = (unsigned char)func) == 0xff)
@@ -153,7 +153,7 @@ add_slc(func, flag, val)
*/ */
void void
start_slc(getit) start_slc(getit)
register int getit; int getit;
{ {
slcchange = 0; slcchange = 0;
@@ -172,9 +172,9 @@ start_slc(getit)
*/ */
int int
end_slc(bufp) end_slc(bufp)
register unsigned char **bufp; unsigned char **bufp;
{ {
register int len; int len;
void netflush(); void netflush();
/* /*
@@ -219,10 +219,10 @@ end_slc(bufp)
*/ */
void void
process_slc(func, flag, val) process_slc(func, flag, val)
register unsigned char func, flag; unsigned char func, flag;
register cc_t val; cc_t val;
{ {
register int hislevel, mylevel, ack; int hislevel, mylevel, ack;
/* /*
* Ensure that we know something about this function * Ensure that we know something about this function
@@ -285,10 +285,10 @@ process_slc(func, flag, val)
*/ */
void void
change_slc(func, flag, val) change_slc(func, flag, val)
register char func, flag; char func, flag;
register cc_t val; cc_t val;
{ {
register int hislevel, mylevel; int hislevel, mylevel;
hislevel = flag & SLC_LEVELBITS; hislevel = flag & SLC_LEVELBITS;
mylevel = slctab[func].defset.flag & SLC_LEVELBITS; mylevel = slctab[func].defset.flag & SLC_LEVELBITS;
@@ -396,7 +396,7 @@ cc_t oldeofc = '\004';
void void
check_slc() check_slc()
{ {
register int i; int i;
for (i = 1; i <= NSLC; i++) { for (i = 1; i <= NSLC; i++) {
#if VEOF == VMIN #if VEOF == VMIN
@@ -438,12 +438,12 @@ check_slc()
*/ */
void void
do_opt_slc(ptr, len) do_opt_slc(ptr, len)
register unsigned char *ptr; unsigned char *ptr;
register int len; int len;
{ {
register unsigned char func, flag; unsigned char func, flag;
cc_t val; cc_t val;
register unsigned char *end = ptr + len; unsigned char *end = ptr + len;
if (terminit()) { /* go ahead */ if (terminit()) { /* go ahead */
while (ptr < end) { while (ptr < end) {

View File

@@ -87,7 +87,7 @@ unsigned char *subsave;
void void
telrcv(void) telrcv(void)
{ {
register int c; int c;
static int state = TS_DATA; static int state = TS_DATA;
while (ncc > 0) { while (ncc > 0) {
@@ -1073,14 +1073,14 @@ int env_ovalue = -1;
void void
suboption(void) suboption(void)
{ {
register int subchar; int subchar;
DIAG(TD_OPTIONS, {netflush(); printsub('<', subpointer, SB_LEN()+2);}); DIAG(TD_OPTIONS, {netflush(); printsub('<', subpointer, SB_LEN()+2);});
subchar = SB_GET(); subchar = SB_GET();
switch (subchar) { switch (subchar) {
case TELOPT_TSPEED: { case TELOPT_TSPEED: {
register int xspeed, rspeed; int xspeed, rspeed;
if (his_state_is_wont(TELOPT_TSPEED)) /* Ignore if option disabled */ if (his_state_is_wont(TELOPT_TSPEED)) /* Ignore if option disabled */
break; break;
@@ -1118,7 +1118,7 @@ suboption(void)
while ((terminaltype < (terminalname + sizeof terminalname-1)) && while ((terminaltype < (terminalname + sizeof terminalname-1)) &&
!SB_EOF()) { !SB_EOF()) {
register int c; int c;
c = SB_GET(); c = SB_GET();
if (isupper(c)) { if (isupper(c)) {
@@ -1132,7 +1132,7 @@ suboption(void)
} /* end of case TELOPT_TTYPE */ } /* end of case TELOPT_TTYPE */
case TELOPT_NAWS: { case TELOPT_NAWS: {
register int xwinsize, ywinsize; int xwinsize, ywinsize;
if (his_state_is_wont(TELOPT_NAWS)) /* Ignore if option disabled */ if (his_state_is_wont(TELOPT_NAWS)) /* Ignore if option disabled */
break; break;
@@ -1157,7 +1157,7 @@ suboption(void)
#ifdef LINEMODE #ifdef LINEMODE
case TELOPT_LINEMODE: { case TELOPT_LINEMODE: {
register int request; int request;
if (his_state_is_wont(TELOPT_LINEMODE)) /* Ignore if option disabled */ if (his_state_is_wont(TELOPT_LINEMODE)) /* Ignore if option disabled */
break; break;
@@ -1237,8 +1237,8 @@ suboption(void)
case TELOPT_NEW_ENVIRON: case TELOPT_NEW_ENVIRON:
#endif #endif
case TELOPT_OLD_ENVIRON: { case TELOPT_OLD_ENVIRON: {
register int c; int c;
register char *cp, *varp, *valp; char *cp, *varp, *valp;
if (SB_EOF()) if (SB_EOF())
return; return;
@@ -1269,7 +1269,7 @@ suboption(void)
* reversed. * reversed.
*/ */
if (env_ovar < 0) { if (env_ovar < 0) {
register int last = -1; /* invalid value */ int last = -1; /* invalid value */
int empty = 0; int empty = 0;
int got_var = 0, got_value = 0, got_uservar = 0; int got_var = 0, got_value = 0, got_uservar = 0;
@@ -1503,8 +1503,8 @@ doclientstat(void)
send_status(void) send_status(void)
{ {
unsigned char statusbuf[256]; unsigned char statusbuf[256];
register unsigned char *ncp; unsigned char *ncp;
register unsigned char i; unsigned char i;
ncp = statusbuf; ncp = statusbuf;

View File

@@ -827,7 +827,7 @@ struct termspeeds {
tty_tspeed(int val) tty_tspeed(int val)
{ {
#ifdef DECODE_BAUD #ifdef DECODE_BAUD
register struct termspeeds *tp; struct termspeeds *tp;
for (tp = termspeeds; (tp->speed != -1) && (val > tp->speed); tp++) for (tp = termspeeds; (tp->speed != -1) && (val > tp->speed); tp++)
; ;
@@ -843,7 +843,7 @@ tty_tspeed(int val)
tty_rspeed(int val) tty_rspeed(int val)
{ {
#ifdef DECODE_BAUD #ifdef DECODE_BAUD
register struct termspeeds *tp; struct termspeeds *tp;
for (tp = termspeeds; (tp->speed != -1) && (val > tp->speed); tp++) for (tp = termspeeds; (tp->speed != -1) && (val > tp->speed); tp++)
; ;
@@ -932,7 +932,7 @@ static void maybe_push_modules(int fd, char **modules)
*/ */
void getptyslave(void) void getptyslave(void)
{ {
register int t = -1; int t = -1;
# ifdef LINEMODE # ifdef LINEMODE
int waslm; int waslm;
@@ -1093,7 +1093,7 @@ void getptyslave(void)
int cleanopen(char *line) int cleanopen(char *line)
{ {
register int t; int t;
#ifdef STREAMSPTY #ifdef STREAMSPTY
if (!really_stream) if (!really_stream)
@@ -1133,7 +1133,7 @@ int cleanopen(char *line)
# endif # endif
# if defined(CRAY) && defined(TCVHUP) # if defined(CRAY) && defined(TCVHUP)
{ {
register int i; int i;
(void) signal(SIGHUP, SIG_IGN); (void) signal(SIGHUP, SIG_IGN);
(void) ioctl(t, TCVHUP, (char *)0); (void) ioctl(t, TCVHUP, (char *)0);
(void) signal(SIGHUP, SIG_DFL); (void) signal(SIGHUP, SIG_DFL);
@@ -1219,7 +1219,7 @@ int login_tty(int t)
void void
startslave(char *host, int autologin, char *autoname) startslave(char *host, int autologin, char *autoname)
{ {
register int i; int i;
char name[256]; char name[256];
#if defined(AUTHENTICATION) #if defined(AUTHENTICATION)
@@ -1254,7 +1254,7 @@ startslave(char *host, int autologin, char *autoname)
* signal to child to tell when done. Child waits for signal * signal to child to tell when done. Child waits for signal
* before doing anything important. * before doing anything important.
*/ */
register int pid = i; int pid = i;
void sigjob P((int)); void sigjob P((int));
setpgrp(); setpgrp();
@@ -1354,14 +1354,14 @@ int addarg(struct arg_val*, char*);
void start_login(char *host, int autologin, char *name) void start_login(char *host, int autologin, char *name)
{ {
register char *cp; char *cp;
struct arg_val argv; struct arg_val argv;
extern char *getenv(const char *); extern char *getenv(const char *);
#ifdef HAVE_UTMPX #ifdef HAVE_UTMPX
char id_buf[3]; char id_buf[3];
int ptynum; int ptynum;
register int pid = getpid(); int pid = getpid();
struct utmpx utmpx; struct utmpx utmpx;
#endif #endif
@@ -1465,7 +1465,7 @@ void start_login(char *host, int autologin, char *name)
*/ */
if (ourpty > 2) { if (ourpty > 2) {
register char *cp; char *cp;
char speed[128]; char speed[128];
int isecho, israw, xpty, len; int isecho, israw, xpty, len;
extern int def_rspeed; extern int def_rspeed;
@@ -1538,7 +1538,7 @@ void start_login(char *host, int autologin, char *name)
addarg(&argv, getenv("USER")); addarg(&argv, getenv("USER"));
#if defined(LOGIN_ARGS) && defined(NO_LOGIN_P) #if defined(LOGIN_ARGS) && defined(NO_LOGIN_P)
{ {
register char **cpp; char **cpp;
for (cpp = environ; *cpp; cpp++) { for (cpp = environ; *cpp; cpp++) {
addarg(&argv, *cpp); addarg(&argv, *cpp);
} }
@@ -1653,7 +1653,7 @@ static
void void
rmut(void) rmut(void)
{ {
register f; f;
int found = 0; int found = 0;
struct utmp *u, *utmp; struct utmp *u, *utmp;
int nutmp; int nutmp;
@@ -1760,7 +1760,7 @@ cleanup(int sig)
{ {
# ifdef CRAY # ifdef CRAY
static int incleanup = 0; static int incleanup = 0;
register int t; int t;
int child_status; /* status of child process as returned by waitpid */ int child_status; /* status of child process as returned by waitpid */
int flags = WNOHANG|WUNTRACED; int flags = WNOHANG|WUNTRACED;
@@ -1904,8 +1904,8 @@ static int gotsigjob = 0;
sigjob(sig) sigjob(sig)
int sig; int sig;
{ {
register int jid; int jid;
register struct jobtemp *jp; struct jobtemp *jp;
while ((jid = waitjob(NULL)) != -1) { while ((jid = waitjob(NULL)) != -1) {
if (jid == 0) { if (jid == 0) {
@@ -1948,11 +1948,11 @@ jid_getutid(jid)
*/ */
int int
cleantmp(wtp) cleantmp(wtp)
register struct utmp *wtp; struct utmp *wtp;
{ {
struct utmp *utp; struct utmp *utp;
static int first = 1; static int first = 1;
register int mask, omask, ret; int mask, omask, ret;
extern struct utmp *getutid P((const struct utmp *_Id)); extern struct utmp *getutid P((const struct utmp *_Id));
@@ -1989,9 +1989,9 @@ cleantmp(wtp)
int int
jobend(jid, path, user) jobend(jid, path, user)
register int jid; int jid;
register char *path; char *path;
register char *user; char *user;
{ {
static int saved_jid = 0; static int saved_jid = 0;
static int pty_saved_jid = 0; static int pty_saved_jid = 0;
@@ -2051,9 +2051,9 @@ jobend(jid, path, user)
* Fork a child process to clean up the TMPDIR * Fork a child process to clean up the TMPDIR
*/ */
cleantmpdir(jid, tpath, user) cleantmpdir(jid, tpath, user)
register int jid; int jid;
register char *tpath; char *tpath;
register char *user; char *user;
{ {
switch(fork()) { switch(fork()) {
case -1: case -1:

View File

@@ -176,7 +176,7 @@ int main(int argc, char **argv)
{ {
struct sockaddr_in from; struct sockaddr_in from;
int on = 1, fromlen; int on = 1, fromlen;
register int ch; int ch;
#if defined(IPPROTO_IP) && defined(IP_TOS) #if defined(IPPROTO_IP) && defined(IP_TOS)
int tos = -1; int tos = -1;
#endif #endif
@@ -999,7 +999,7 @@ telnet(f, p)
#ifdef TIOCNOTTY #ifdef TIOCNOTTY
{ {
register int t; int t;
t = open(_PATH_TTY, O_RDWR); t = open(_PATH_TTY, O_RDWR);
if (t >= 0) { if (t >= 0) {
(void) ioctl(t, TIOCNOTTY, (char *)0); (void) ioctl(t, TIOCNOTTY, (char *)0);
@@ -1058,7 +1058,7 @@ telnet(f, p)
nfd = ((f > p) ? f : p) + 1; nfd = ((f > p) ? f : p) + 1;
for (;;) { for (;;) {
fd_set ibits, obits, xbits; fd_set ibits, obits, xbits;
register int c; int c;
if (ncc < 0 && pcc < 0) if (ncc < 0 && pcc < 0)
break; break;

View File

@@ -380,7 +380,7 @@ flowstat()
*/ */
void void
clientstat(code, parm1, parm2) clientstat(code, parm1, parm2)
register int code, parm1, parm2; int code, parm1, parm2;
{ {
void netflush(); void netflush();
@@ -457,7 +457,7 @@ clientstat(code, parm1, parm2)
case LM_MODE: case LM_MODE:
{ {
register int ack, changed; int ack, changed;
/* /*
* Client has sent along a mode mask. If it agrees with * Client has sent along a mode mask. If it agrees with

View File

@@ -159,7 +159,7 @@ nextitem(char *current)
return current+3; return current+3;
case SB: /* loop forever looking for the SE */ case SB: /* loop forever looking for the SE */
{ {
register char *look = current+2; char *look = current+2;
for (;;) { for (;;) {
if ((*look++&0xff) == IAC) { if ((*look++&0xff) == IAC) {
@@ -194,7 +194,7 @@ nextitem(char *current)
void void
netclear(void) netclear(void)
{ {
register char *thisitem, *next; char *thisitem, *next;
char *good; char *good;
#define wewant(p) ((nfrontp > p) && ((*p&0xff) == IAC) && \ #define wewant(p) ((nfrontp > p) && ((*p&0xff) == IAC) && \
((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL)) ((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL))
@@ -323,7 +323,7 @@ netflush(void)
* len - How many bytes to write * len - How many bytes to write
*/ */
void void
writenet(register unsigned char *ptr, register int len) writenet(unsigned char *ptr, int len)
{ {
/* flush buffer if no room for new data) */ /* flush buffer if no room for new data) */
if ((&netobuf[BUFSIZ] - nfrontp) < len) { if ((&netobuf[BUFSIZ] - nfrontp) < len) {
@@ -375,7 +375,7 @@ char editedhost[32];
void edithost(char *pat, char *host) void edithost(char *pat, char *host)
{ {
register char *res = editedhost; char *res = editedhost;
if (!pat) if (!pat)
pat = ""; pat = "";
@@ -413,7 +413,7 @@ void edithost(char *pat, char *host)
static char *putlocation; static char *putlocation;
void void
putstr(register char *s) putstr(char *s)
{ {
while (*s) while (*s)
@@ -517,7 +517,7 @@ void putf(char *cp, char *where)
* Print telnet options and commands in plain text, if possible. * Print telnet options and commands in plain text, if possible.
*/ */
void void
printoption(register char *fmt, register int option) printoption(char *fmt, int option)
{ {
if (TELOPT_OK(option)) if (TELOPT_OK(option))
sprintf(nfrontp, "%s %s\r\n", fmt, TELOPT(option)); sprintf(nfrontp, "%s %s\r\n", fmt, TELOPT(option));
@@ -535,7 +535,7 @@ printsub(int direction, unsigned char *pointer, int length)
/* where suboption data sits */ /* where suboption data sits */
/* length of suboption data */ /* length of suboption data */
{ {
register int i; int i;
char buf[512]; char buf[512];
if (!(diagnostic & TD_OPTIONS)) if (!(diagnostic & TD_OPTIONS))
@@ -546,7 +546,7 @@ printsub(int direction, unsigned char *pointer, int length)
direction == '<' ? "recv" : "send"); direction == '<' ? "recv" : "send");
nfrontp += strlen(nfrontp); nfrontp += strlen(nfrontp);
if (length >= 3) { if (length >= 3) {
register int j; int j;
i = pointer[length-2]; i = pointer[length-2];
j = pointer[length-1]; j = pointer[length-1];
@@ -811,8 +811,8 @@ printsub(int direction, unsigned char *pointer, int length)
break; break;
case TELOPT_STATUS: { case TELOPT_STATUS: {
register char *cp; char *cp;
register int j, k; int j, k;
sprintf(nfrontp, "STATUS"); sprintf(nfrontp, "STATUS");
nfrontp += strlen(nfrontp); nfrontp += strlen(nfrontp);
@@ -927,7 +927,7 @@ printsub(int direction, unsigned char *pointer, int length)
env_common: env_common:
nfrontp += strlen(nfrontp); nfrontp += strlen(nfrontp);
{ {
register int noquote = 2; int noquote = 2;
for (i = 2; i < length; i++ ) { for (i = 2; i < length; i++ ) {
switch (pointer[i]) { switch (pointer[i]) {
case NEW_ENV_VAR: case NEW_ENV_VAR:
@@ -1167,9 +1167,9 @@ printsub(int direction, unsigned char *pointer, int length)
* Dump a data buffer in hex and ascii to the output data stream. * Dump a data buffer in hex and ascii to the output data stream.
*/ */
void void
printdata(register char *tag, register char *ptr, register int cnt) printdata(char *tag, char *ptr, int cnt)
{ {
register int i; int i;
char xbuf[30]; char xbuf[30];
while (cnt) { while (cnt) {

View File

@@ -92,7 +92,7 @@ static void *findMain(void);
void *dlopen(const char *path, int mode) void *dlopen(const char *path, int mode)
{ {
register ModulePtr mp; ModulePtr mp;
static void *mainModule; static void *mainModule;
/* /*
@@ -170,7 +170,7 @@ void *dlopen(const char *path, int mode)
* loaded modules. * loaded modules.
*/ */
if (mode & RTLD_GLOBAL) { if (mode & RTLD_GLOBAL) {
register ModulePtr mp1; ModulePtr mp1;
for (mp1 = mp->next; mp1; mp1 = mp1->next) for (mp1 = mp->next; mp1; mp1 = mp1->next)
if (loadbind(0, mp1->entry, mp->entry) == -1) { if (loadbind(0, mp1->entry, mp->entry) == -1) {
dlclose(mp); dlclose(mp);
@@ -223,7 +223,7 @@ void *dlopen(const char *path, int mode)
*/ */
static void caterr(char *s) static void caterr(char *s)
{ {
register char *p = s; char *p = s;
while (*p >= '0' && *p <= '9') while (*p >= '0' && *p <= '9')
p++; p++;
@@ -258,9 +258,9 @@ static void caterr(char *s)
void *dlsym(void *handle, const char *symbol) void *dlsym(void *handle, const char *symbol)
{ {
register ModulePtr mp = (ModulePtr)handle; ModulePtr mp = (ModulePtr)handle;
register ExportPtr ep; ExportPtr ep;
register int i; int i;
/* /*
* Could speed up the search, but I assume that one assigns * Could speed up the search, but I assume that one assigns
@@ -286,9 +286,9 @@ char *dlerror(void)
int dlclose(void *handle) int dlclose(void *handle)
{ {
register ModulePtr mp = (ModulePtr)handle; ModulePtr mp = (ModulePtr)handle;
int result; int result;
register ModulePtr mp1; ModulePtr mp1;
if (--mp->refCnt > 0) if (--mp->refCnt > 0)
return 0; return 0;
@@ -314,8 +314,8 @@ int dlclose(void *handle)
strcpy(errbuf, strerror(errno)); strcpy(errbuf, strerror(errno));
} }
if (mp->exports) { if (mp->exports) {
register ExportPtr ep; ExportPtr ep;
register int i; int i;
for (ep = mp->exports, i = mp->nExports; i; i--, ep++) for (ep = mp->exports, i = mp->nExports; i; i--, ep++)
if (ep->name) if (ep->name)
free(ep->name); free(ep->name);

View File

@@ -62,7 +62,7 @@ getopt(nargc, nargv, ostr)
const char *ostr; const char *ostr;
{ {
static char *place = EMSG; /* option letter processing */ static char *place = EMSG; /* option letter processing */
register char *oli; /* option letter list index */ char *oli; /* option letter list index */
char *p; char *p;
if (optreset || !*place) { /* update scanning pointer */ if (optreset || !*place) { /* update scanning pointer */

View File

@@ -111,8 +111,8 @@ setusershell()
static char ** static char **
initshells() initshells()
{ {
register char **sp, *cp; char **sp, *cp;
register FILE *fp; FILE *fp;
struct stat statb; struct stat statb;
if (shells != NULL) if (shells != NULL)

View File

@@ -562,7 +562,7 @@ static int
glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
glob_t *pglob) glob_t *pglob)
{ {
register struct dirent *dp; struct dirent *dp;
DIR *dirp; DIR *dirp;
int err; int err;
char buf[MaxPathLen]; char buf[MaxPathLen];
@@ -597,8 +597,8 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
else else
readdirfunc = (struct dirent *(*)(void *))readdir; readdirfunc = (struct dirent *(*)(void *))readdir;
while ((dp = (*readdirfunc)(dirp))) { while ((dp = (*readdirfunc)(dirp))) {
register u_char *sc; u_char *sc;
register Char *dc; Char *dc;
/* Initial DOT must be matched literally. */ /* Initial DOT must be matched literally. */
if (dp->d_name[0] == DOT && *pattern != DOT) if (dp->d_name[0] == DOT && *pattern != DOT)
@@ -640,8 +640,8 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
static int static int
globextend(const Char *path, glob_t *pglob) globextend(const Char *path, glob_t *pglob)
{ {
register char **pathv; char **pathv;
register int i; int i;
u_int newsize; u_int newsize;
char *copy; char *copy;
const Char *p; const Char *p;
@@ -726,8 +726,8 @@ match(Char *name, Char *pat, Char *patend)
void void
globfree(glob_t *pglob) globfree(glob_t *pglob)
{ {
register int i; int i;
register char **pp; char **pp;
if (pglob->gl_pathv != NULL) { if (pglob->gl_pathv != NULL) {
pp = pglob->gl_pathv + pglob->gl_offs; pp = pglob->gl_pathv + pglob->gl_offs;
@@ -805,7 +805,7 @@ g_strcat(Char *dst, const Char *src)
static void static void
g_Ctoc(const Char *str, char *buf) g_Ctoc(const Char *str, char *buf)
{ {
register char *dc; char *dc;
for (dc = buf; (*dc++ = *str++) != EOS;) for (dc = buf; (*dc++ = *str++) != EOS;)
continue; continue;
@@ -815,7 +815,7 @@ g_Ctoc(const Char *str, char *buf)
static void static void
qprintf(const Char *str, Char *s) qprintf(const Char *str, Char *s)
{ {
register Char *p; Char *p;
(void)printf("%s:\n", str); (void)printf("%s:\n", str);
for (p = s; *p; p++) for (p = s; *p; p++)

View File

@@ -47,9 +47,9 @@ static
int int
__icheckhost(u_int32_t raddr, const char *lhost) __icheckhost(u_int32_t raddr, const char *lhost)
{ {
register struct hostent *hp; struct hostent *hp;
register u_long laddr; u_long laddr;
register char **pp; char **pp;
/* Try for raw ip address first. */ /* Try for raw ip address first. */
if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1) if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1)
@@ -84,7 +84,7 @@ static
int int
__ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser) __ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser)
{ {
register char *user, *p; char *user, *p;
int ch; int ch;
char buf[MaxHostNameLen + 128]; /* host + login */ char buf[MaxHostNameLen + 128]; /* host + login */
char hname[MaxHostNameLen]; char hname[MaxHostNameLen];
@@ -210,7 +210,7 @@ __ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser)
int int
iruserok(u_int32_t raddr, int superuser, const char *ruser, const char *luser) iruserok(u_int32_t raddr, int superuser, const char *ruser, const char *luser)
{ {
register char *cp; char *cp;
struct stat sbuf; struct stat sbuf;
struct passwd *pwd; struct passwd *pwd;
FILE *hostf; FILE *hostf;

View File

@@ -264,8 +264,8 @@ static int
_secs(const struct tm *t) _secs(const struct tm *t)
{ {
static char buf[15]; static char buf[15];
register time_t s; time_t s;
register char *p; char *p;
struct tm tmp; struct tm tmp;
/* Make a copy, mktime(3) modifies the tm struct. */ /* Make a copy, mktime(3) modifies the tm struct. */
@@ -281,7 +281,7 @@ static int
_conv(int n, int digits, int pad) _conv(int n, int digits, int pad)
{ {
static char buf[10]; static char buf[10];
register char *p; char *p;
for (p = buf + sizeof(buf) - 2; n > 0 && p > buf; n /= 10, --digits) for (p = buf + sizeof(buf) - 2; n > 0 && p > buf; n /= 10, --digits)
*p-- = n % 10 + '0'; *p-- = n % 10 + '0';
@@ -292,7 +292,7 @@ _conv(int n, int digits, int pad)
static int static int
_add(str) _add(str)
register char *str; char *str;
{ {
for (;; ++pt, --gsize) { for (;; ++pt, --gsize) {
if (!gsize) if (!gsize)