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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -173,7 +173,7 @@ static int fb64_start(struct fb *fbp, int dir, int server)
{
int x;
unsigned char *p;
register int state;
int state;
switch (dir) {
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)
{
unsigned char *p;
register int state = fbp->state[DIR_DECRYPT-1];
int state = fbp->state[DIR_DECRYPT-1];
if (cnt-- < 1)
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)
{
register int state = fbp->state[DIR_ENCRYPT-1];
int state = fbp->state[DIR_ENCRYPT-1];
if (cnt-- < 1)
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)
{
register int state = fbp->state[dir-1];
int state = fbp->state[dir-1];
if (*lenp != 1 || (*kp != '\0')) {
*lenp = 0;
@@ -456,7 +456,7 @@ void fb64_printsub(unsigned char *data, int cnt,
unsigned char *buf, int buflen, char *type)
{
char lbuf[32];
register int i;
int i;
char *cp;
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);
}
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));
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)
{
register struct stinfo *stp = &fb[CFB].streams[DIR_ENCRYPT-1];
register int index;
struct stinfo *stp = &fb[CFB].streams[DIR_ENCRYPT-1];
int index;
index = stp->str_index;
while (c-- > 0) {
@@ -572,7 +572,7 @@ void cfb64_encrypt(unsigned char *s, int c)
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;
if (data == -1) {
@@ -622,8 +622,8 @@ int cfb64_decrypt(int data)
void ofb64_encrypt(unsigned char *s, int c)
{
register struct stinfo *stp = &fb[OFB].streams[DIR_ENCRYPT-1];
register int index;
struct stinfo *stp = &fb[OFB].streams[DIR_ENCRYPT-1];
int index;
index = stp->str_index;
while (c-- > 0) {
@@ -641,7 +641,7 @@ void ofb64_encrypt(unsigned char *s, int c)
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;
if (data == -1) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -615,9 +615,9 @@ TerminalSpeeds(ispeed, ospeed)
long *ospeed;
{
#ifdef DECODE_BAUD
register struct termspeeds *tp;
struct termspeeds *tp;
#endif /* DECODE_BAUD */
register long in, out;
long in, out;
out = cfgetospeed(&old_tc);
in = cfgetispeed(&old_tc);
@@ -797,7 +797,7 @@ sys_telnet_init()
process_rings(netin, netout, netex, ttyin, ttyout, poll)
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
* to one, since a one implies we did some useful work,
* and therefore probably won't be called to block next

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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