Remove 'register' keyword.
This commit is contained in:
parent
454845084c
commit
084b4588f2
@ -73,7 +73,7 @@ ip_checksum(addr, count)
|
||||
/* Compute Internet Checksum for "count" bytes
|
||||
* beginning at location "addr".
|
||||
*/
|
||||
register long sum = 0;
|
||||
long sum = 0;
|
||||
|
||||
while( count > 1 ) {
|
||||
/* This is the inner loop */
|
||||
|
@ -34,6 +34,8 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)insque.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* insque -- vax insque instruction
|
||||
@ -48,7 +50,7 @@ struct vaxque { /* queue format expected by VAX queue instructions */
|
||||
|
||||
void
|
||||
insque(e, prev)
|
||||
register struct vaxque *e, *prev;
|
||||
struct vaxque *e, *prev;
|
||||
{
|
||||
e->vq_prev = prev;
|
||||
e->vq_next = prev->vq_next;
|
||||
|
@ -37,6 +37,8 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)lsearch.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
@ -68,7 +70,7 @@ linear_base(key, base, nelp, width, compar, add_flag)
|
||||
u_int *nelp, width;
|
||||
int (*compar)(), add_flag;
|
||||
{
|
||||
register char *element, *end;
|
||||
char *element, *end;
|
||||
|
||||
end = base + *nelp * width;
|
||||
for (element = base; element < end; element += width)
|
||||
|
@ -34,6 +34,8 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)remque.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* remque -- vax remque instruction
|
||||
@ -48,7 +50,7 @@ struct vaxque { /* queue format expected by VAX queue instructions */
|
||||
|
||||
void
|
||||
remque(e)
|
||||
register struct vaxque *e;
|
||||
struct vaxque *e;
|
||||
{
|
||||
e->vq_prev->vq_next = e->vq_next;
|
||||
e->vq_next->vq_prev = e->vq_prev;
|
||||
|
@ -34,6 +34,8 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)cuserid.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
@ -44,7 +46,7 @@ char *
|
||||
cuserid(s)
|
||||
char *s;
|
||||
{
|
||||
register struct passwd *pwd;
|
||||
struct passwd *pwd;
|
||||
|
||||
if ((pwd = getpwuid(geteuid())) == NULL) {
|
||||
if (s)
|
||||
|
@ -32,6 +32,10 @@
|
||||
* precedence is structured in regular expressions. Serious changes in
|
||||
* regular-expression syntax might require a total rethink.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <limits.h>
|
||||
#include <regexp.h>
|
||||
#include <stdio.h>
|
||||
@ -205,10 +209,10 @@ regexp *
|
||||
regcomp(exp)
|
||||
const char *exp;
|
||||
{
|
||||
register regexp *r;
|
||||
register char *scan;
|
||||
register char *longest;
|
||||
register int len;
|
||||
regexp *r;
|
||||
char *scan;
|
||||
char *longest;
|
||||
int len;
|
||||
int flags;
|
||||
|
||||
if (exp == NULL)
|
||||
@ -296,10 +300,10 @@ reg(paren, flagp)
|
||||
int paren; /* Parenthesized? */
|
||||
int *flagp;
|
||||
{
|
||||
register char *ret;
|
||||
register char *br;
|
||||
register char *ender;
|
||||
register int parno;
|
||||
char *ret;
|
||||
char *br;
|
||||
char *ender;
|
||||
int parno;
|
||||
int flags;
|
||||
|
||||
*flagp = HASWIDTH; /* Tentatively. */
|
||||
@ -367,9 +371,9 @@ static char *
|
||||
regbranch(flagp)
|
||||
int *flagp;
|
||||
{
|
||||
register char *ret;
|
||||
register char *chain;
|
||||
register char *latest;
|
||||
char *ret;
|
||||
char *chain;
|
||||
char *latest;
|
||||
int flags;
|
||||
|
||||
*flagp = WORST; /* Tentatively. */
|
||||
@ -407,9 +411,9 @@ static char *
|
||||
regpiece(flagp)
|
||||
int *flagp;
|
||||
{
|
||||
register char *ret;
|
||||
register char op;
|
||||
register char *next;
|
||||
char *ret;
|
||||
char op;
|
||||
char *next;
|
||||
int flags;
|
||||
|
||||
ret = regatom(&flags);
|
||||
@ -471,7 +475,7 @@ static char *
|
||||
regatom(flagp)
|
||||
int *flagp;
|
||||
{
|
||||
register char *ret;
|
||||
char *ret;
|
||||
int flags;
|
||||
|
||||
*flagp = WORST; /* Tentatively. */
|
||||
@ -489,8 +493,8 @@ int *flagp;
|
||||
*flagp |= HASWIDTH|SIMPLE;
|
||||
break;
|
||||
case '[': {
|
||||
register int class;
|
||||
register int classend;
|
||||
int class;
|
||||
int classend;
|
||||
int i;
|
||||
|
||||
if (*regparse == '^') { /* Complement of range. */
|
||||
@ -597,7 +601,7 @@ int *flagp;
|
||||
*/
|
||||
{
|
||||
char *regprev;
|
||||
register char ch;
|
||||
char ch;
|
||||
|
||||
regparse--; /* Look at cur char */
|
||||
ret = regnode(EXACTLY);
|
||||
@ -661,8 +665,8 @@ static char * /* Location. */
|
||||
regnode(op)
|
||||
char op;
|
||||
{
|
||||
register char *ret;
|
||||
register char *ptr;
|
||||
char *ret;
|
||||
char *ptr;
|
||||
|
||||
ret = regcode;
|
||||
if (ret == ®dummy) {
|
||||
@ -702,9 +706,9 @@ reginsert(op, opnd)
|
||||
char op;
|
||||
char *opnd;
|
||||
{
|
||||
register char *src;
|
||||
register char *dst;
|
||||
register char *place;
|
||||
char *src;
|
||||
char *dst;
|
||||
char *place;
|
||||
|
||||
if (regcode == ®dummy) {
|
||||
regsize += 3;
|
||||
@ -731,9 +735,9 @@ regtail(p, val)
|
||||
char *p;
|
||||
char *val;
|
||||
{
|
||||
register char *scan;
|
||||
register char *temp;
|
||||
register int offset;
|
||||
char *scan;
|
||||
char *temp;
|
||||
int offset;
|
||||
|
||||
if (p == ®dummy)
|
||||
return;
|
||||
@ -799,10 +803,10 @@ STATIC char *regprop();
|
||||
*/
|
||||
int
|
||||
regexec(prog, string)
|
||||
register const regexp *prog;
|
||||
register const char *string;
|
||||
const regexp *prog;
|
||||
const char *string;
|
||||
{
|
||||
register char *s;
|
||||
char *s;
|
||||
extern char *strchr();
|
||||
|
||||
/* Be paranoid... */
|
||||
@ -864,9 +868,9 @@ regtry(prog, string)
|
||||
regexp *prog;
|
||||
char *string;
|
||||
{
|
||||
register int i;
|
||||
register char **sp;
|
||||
register char **ep;
|
||||
int i;
|
||||
char **sp;
|
||||
char **ep;
|
||||
|
||||
reginput = string;
|
||||
regstartp = prog->startp;
|
||||
@ -900,7 +904,7 @@ static int /* 0 failure, 1 success */
|
||||
regmatch(prog)
|
||||
char *prog;
|
||||
{
|
||||
register char *scan; /* Current node. */
|
||||
char *scan; /* Current node. */
|
||||
char *next; /* Next node. */
|
||||
|
||||
scan = prog;
|
||||
@ -945,8 +949,8 @@ char *prog;
|
||||
reginput++;
|
||||
break;
|
||||
case EXACTLY: {
|
||||
register int len;
|
||||
register char *opnd;
|
||||
int len;
|
||||
char *opnd;
|
||||
|
||||
opnd = OPERAND(scan);
|
||||
/* Inline the first character, for speed. */
|
||||
@ -981,8 +985,8 @@ char *prog;
|
||||
case OPEN+7:
|
||||
case OPEN+8:
|
||||
case OPEN+9: {
|
||||
register int no;
|
||||
register char *save;
|
||||
int no;
|
||||
char *save;
|
||||
|
||||
no = OP(scan) - OPEN;
|
||||
save = reginput;
|
||||
@ -1009,8 +1013,8 @@ char *prog;
|
||||
case CLOSE+7:
|
||||
case CLOSE+8:
|
||||
case CLOSE+9: {
|
||||
register int no;
|
||||
register char *save;
|
||||
int no;
|
||||
char *save;
|
||||
|
||||
no = OP(scan) - CLOSE;
|
||||
save = reginput;
|
||||
@ -1029,7 +1033,7 @@ char *prog;
|
||||
}
|
||||
break;
|
||||
case BRANCH: {
|
||||
register char *save;
|
||||
char *save;
|
||||
|
||||
if (OP(next) != BRANCH) /* No choice. */
|
||||
next = OPERAND(scan); /* Avoid recursion. */
|
||||
@ -1048,10 +1052,10 @@ char *prog;
|
||||
break;
|
||||
case STAR:
|
||||
case PLUS: {
|
||||
register char nextch;
|
||||
register int no;
|
||||
register char *save;
|
||||
register int min;
|
||||
char nextch;
|
||||
int no;
|
||||
char *save;
|
||||
int min;
|
||||
|
||||
/*
|
||||
* Lookahead to avoid useless match attempts
|
||||
@ -1102,9 +1106,9 @@ static int
|
||||
regrepeat(p)
|
||||
char *p;
|
||||
{
|
||||
register int count = 0;
|
||||
register char *scan;
|
||||
register char *opnd;
|
||||
int count = 0;
|
||||
char *scan;
|
||||
char *opnd;
|
||||
|
||||
scan = reginput;
|
||||
opnd = OPERAND(p);
|
||||
@ -1146,9 +1150,9 @@ char *p;
|
||||
*/
|
||||
static char *
|
||||
regnext(p)
|
||||
register char *p;
|
||||
char *p;
|
||||
{
|
||||
register int offset;
|
||||
int offset;
|
||||
|
||||
if (p == ®dummy)
|
||||
return(NULL);
|
||||
@ -1174,9 +1178,9 @@ void
|
||||
regdump(r)
|
||||
regexp *r;
|
||||
{
|
||||
register char *s;
|
||||
register char op = EXACTLY; /* Arbitrary non-END op. */
|
||||
register char *next;
|
||||
char *s;
|
||||
char op = EXACTLY; /* Arbitrary non-END op. */
|
||||
char *next;
|
||||
extern char *strchr();
|
||||
|
||||
|
||||
@ -1218,7 +1222,7 @@ static char *
|
||||
regprop(op)
|
||||
char *op;
|
||||
{
|
||||
register char *p;
|
||||
char *p;
|
||||
static char buf[50];
|
||||
|
||||
(void) strcpy(buf, ":");
|
||||
@ -1317,9 +1321,9 @@ strcspn(s1, s2)
|
||||
char *s1;
|
||||
char *s2;
|
||||
{
|
||||
register char *scan1;
|
||||
register char *scan2;
|
||||
register int count;
|
||||
char *scan1;
|
||||
char *scan2;
|
||||
int count;
|
||||
|
||||
count = 0;
|
||||
for (scan1 = s1; *scan1 != '\0'; scan1++) {
|
||||
|
@ -18,6 +18,10 @@
|
||||
* 3. Altered versions must be plainly marked as such, and must not
|
||||
* be misrepresented as being the original software.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <regexp.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -38,11 +42,11 @@ const regexp *prog;
|
||||
const char *source;
|
||||
char *dest;
|
||||
{
|
||||
register char *src;
|
||||
register char *dst;
|
||||
register char c;
|
||||
register int no;
|
||||
register int len;
|
||||
char *src;
|
||||
char *dst;
|
||||
char c;
|
||||
int no;
|
||||
int len;
|
||||
extern char *strncpy();
|
||||
|
||||
if (prog == NULL || source == NULL || dest == NULL) {
|
||||
|
@ -516,7 +516,7 @@ devstat_selectdevs(struct device_selection **dev_select, int *num_selected,
|
||||
devstat_select_mode select_mode, int maxshowdevs,
|
||||
int perf_select)
|
||||
{
|
||||
register int i, j, k;
|
||||
int i, j, k;
|
||||
int init_selections = 0, init_selected_var = 0;
|
||||
struct device_selection *old_dev_select = NULL;
|
||||
int old_num_selections = 0, old_num_selected;
|
||||
@ -979,7 +979,7 @@ devstat_buildmatch(char *match_str, struct devstat_match **matches,
|
||||
char *tstr[5];
|
||||
char **tempstr;
|
||||
int num_args;
|
||||
register int i, j;
|
||||
int i, j;
|
||||
const char *func_name = "devstat_buildmatch";
|
||||
|
||||
/* We can't do much without a string to parse */
|
||||
|
@ -104,7 +104,7 @@ Field(buf, out, len)
|
||||
u_char *out;
|
||||
int len;
|
||||
{
|
||||
register char *bp = buf;
|
||||
char *bp = buf;
|
||||
int i, ibase, base16 = 0, base10 = 0, clen = 0;
|
||||
int hb[6], *hp;
|
||||
char *fmt;
|
||||
|
@ -50,9 +50,9 @@ ipx_ntoa(addr)
|
||||
static char obuf[40];
|
||||
union { union ipx_net net_e; u_long long_e; } net;
|
||||
u_short port = htons(addr.x_port);
|
||||
register char *cp;
|
||||
char *cp;
|
||||
char *cp2;
|
||||
register u_char *up = addr.x_host.c_host;
|
||||
u_char *up = addr.x_host.c_host;
|
||||
u_char *uplim = up + 6;
|
||||
static char *spectHex();
|
||||
|
||||
@ -87,7 +87,7 @@ spectHex(p0)
|
||||
{
|
||||
int ok = 0;
|
||||
int nonzero = 0;
|
||||
register char *p = p0;
|
||||
char *p = p0;
|
||||
for (; *p; p++) switch (*p) {
|
||||
|
||||
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
|
||||
|
@ -132,7 +132,7 @@ _kvm_syserr(kd, program, fmt, va_alist)
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
register int n;
|
||||
int n;
|
||||
|
||||
#if __STDC__
|
||||
va_start(ap, fmt);
|
||||
@ -144,7 +144,7 @@ _kvm_syserr(kd, program, fmt, va_alist)
|
||||
(void)vfprintf(stderr, fmt, ap);
|
||||
(void)fprintf(stderr, ": %s\n", strerror(errno));
|
||||
} else {
|
||||
register char *cp = kd->errbuf;
|
||||
char *cp = kd->errbuf;
|
||||
|
||||
(void)vsnprintf(cp, sizeof(kd->errbuf), (char *)fmt, ap);
|
||||
n = strlen(cp);
|
||||
@ -156,8 +156,8 @@ _kvm_syserr(kd, program, fmt, va_alist)
|
||||
|
||||
void *
|
||||
_kvm_malloc(kd, n)
|
||||
register kvm_t *kd;
|
||||
register size_t n;
|
||||
kvm_t *kd;
|
||||
size_t n;
|
||||
{
|
||||
void *p;
|
||||
|
||||
@ -169,7 +169,7 @@ _kvm_malloc(kd, n)
|
||||
|
||||
static kvm_t *
|
||||
_kvm_open(kd, uf, mf, flag, errout)
|
||||
register kvm_t *kd;
|
||||
kvm_t *kd;
|
||||
const char *uf;
|
||||
const char *mf;
|
||||
int flag;
|
||||
@ -257,7 +257,7 @@ kvm_openfiles(uf, mf, sf, flag, errout)
|
||||
int flag;
|
||||
char *errout;
|
||||
{
|
||||
register kvm_t *kd;
|
||||
kvm_t *kd;
|
||||
|
||||
if ((kd = malloc(sizeof(*kd))) == NULL) {
|
||||
(void)strlcpy(errout, strerror(errno), _POSIX2_LINE_MAX);
|
||||
@ -276,7 +276,7 @@ kvm_open(uf, mf, sf, flag, errstr)
|
||||
int flag;
|
||||
const char *errstr;
|
||||
{
|
||||
register kvm_t *kd;
|
||||
kvm_t *kd;
|
||||
|
||||
if ((kd = malloc(sizeof(*kd))) == NULL) {
|
||||
if (errstr != NULL)
|
||||
@ -293,7 +293,7 @@ int
|
||||
kvm_close(kd)
|
||||
kvm_t *kd;
|
||||
{
|
||||
register int error = 0;
|
||||
int error = 0;
|
||||
|
||||
if (kd->pmfd >= 0)
|
||||
error |= close(kd->pmfd);
|
||||
@ -317,8 +317,8 @@ kvm_nlist(kd, nl)
|
||||
kvm_t *kd;
|
||||
struct nlist *nl;
|
||||
{
|
||||
register struct nlist *p;
|
||||
register int nvalid;
|
||||
struct nlist *p;
|
||||
int nvalid;
|
||||
struct kld_sym_lookup lookup;
|
||||
|
||||
/*
|
||||
@ -360,12 +360,12 @@ kvm_nlist(kd, nl)
|
||||
ssize_t
|
||||
kvm_read(kd, kva, buf, len)
|
||||
kvm_t *kd;
|
||||
register u_long kva;
|
||||
register void *buf;
|
||||
register size_t len;
|
||||
u_long kva;
|
||||
void *buf;
|
||||
size_t len;
|
||||
{
|
||||
register int cc;
|
||||
register void *cp;
|
||||
int cc;
|
||||
void *cp;
|
||||
|
||||
if (ISALIVE(kd)) {
|
||||
/*
|
||||
@ -424,11 +424,11 @@ kvm_read(kd, kva, buf, len)
|
||||
ssize_t
|
||||
kvm_write(kd, kva, buf, len)
|
||||
kvm_t *kd;
|
||||
register u_long kva;
|
||||
register const void *buf;
|
||||
register size_t len;
|
||||
u_long kva;
|
||||
const void *buf;
|
||||
size_t len;
|
||||
{
|
||||
register int cc;
|
||||
int cc;
|
||||
|
||||
if (ISALIVE(kd)) {
|
||||
/*
|
||||
|
@ -84,7 +84,7 @@ kvm_deadfiles(kd, op, arg, filehead_o, nfiles)
|
||||
{
|
||||
int buflen = kd->arglen, n = 0;
|
||||
struct file *fp;
|
||||
register char *where = kd->argspc;
|
||||
char *where = kd->argspc;
|
||||
struct filelist filehead;
|
||||
|
||||
/*
|
||||
|
@ -108,7 +108,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
|
||||
struct kinfo_proc *bp;
|
||||
int maxcnt;
|
||||
{
|
||||
register int cnt = 0;
|
||||
int cnt = 0;
|
||||
struct kinfo_proc kinfo_proc, *kp;
|
||||
struct pgrp pgrp;
|
||||
struct session sess;
|
||||
@ -358,8 +358,8 @@ kvm_deadprocs(kd, what, arg, a_allproc, a_zombproc, maxcnt)
|
||||
u_long a_zombproc;
|
||||
int maxcnt;
|
||||
{
|
||||
register struct kinfo_proc *bp = kd->procbase;
|
||||
register int acnt, zcnt;
|
||||
struct kinfo_proc *bp = kd->procbase;
|
||||
int acnt, zcnt;
|
||||
struct proc *p;
|
||||
|
||||
if (KREAD(kd, a_allproc, &p)) {
|
||||
@ -505,14 +505,14 @@ static char **
|
||||
kvm_argv(kd, kp, addr, narg, maxcnt)
|
||||
kvm_t *kd;
|
||||
struct kinfo_proc *kp;
|
||||
register u_long addr;
|
||||
register int narg;
|
||||
register int maxcnt;
|
||||
u_long addr;
|
||||
int narg;
|
||||
int maxcnt;
|
||||
{
|
||||
register char *np, *cp, *ep, *ap;
|
||||
register u_long oaddr = -1;
|
||||
register int len, cc;
|
||||
register char **argv;
|
||||
char *np, *cp, *ep, *ap;
|
||||
u_long oaddr = -1;
|
||||
int len, cc;
|
||||
char **argv;
|
||||
|
||||
/*
|
||||
* Check that there aren't an unreasonable number of agruments,
|
||||
@ -620,9 +620,9 @@ kvm_argv(kd, kp, addr, narg, maxcnt)
|
||||
|
||||
/* will we exceed the malloc/realloced buffer? */
|
||||
if (len + cc > kd->arglen) {
|
||||
register int off;
|
||||
register char **pp;
|
||||
register char *op = kd->argspc;
|
||||
int off;
|
||||
char **pp;
|
||||
char *op = kd->argspc;
|
||||
|
||||
kd->arglen *= 2;
|
||||
kd->argspc = (char *)_kvm_realloc(kd, kd->argspc,
|
||||
@ -843,11 +843,11 @@ ssize_t
|
||||
kvm_uread(kd, kp, uva, buf, len)
|
||||
kvm_t *kd;
|
||||
struct kinfo_proc *kp;
|
||||
register u_long uva;
|
||||
register char *buf;
|
||||
register size_t len;
|
||||
u_long uva;
|
||||
char *buf;
|
||||
size_t len;
|
||||
{
|
||||
register char *cp;
|
||||
char *cp;
|
||||
char procfile[MAXPATHLEN];
|
||||
ssize_t amount;
|
||||
int fd;
|
||||
|
@ -92,9 +92,9 @@ int
|
||||
_kvm_initvtop(kd)
|
||||
kvm_t *kd;
|
||||
{
|
||||
register int i;
|
||||
register int off;
|
||||
register struct vmstate *vm;
|
||||
int i;
|
||||
int off;
|
||||
struct vmstate *vm;
|
||||
struct stat st;
|
||||
struct nlist nlist[2];
|
||||
|
||||
@ -168,8 +168,8 @@ _kvm_uvatop(kd, p, va, pa)
|
||||
u_long *pa;
|
||||
{
|
||||
int kva, pte;
|
||||
register int off, frame;
|
||||
register struct vmspace *vms = p->p_vmspace;
|
||||
int off, frame;
|
||||
struct vmspace *vms = p->p_vmspace;
|
||||
|
||||
if ((u_long)vms < KERNBASE) {
|
||||
_kvm_err(kd, kd->program, "_kvm_uvatop: corrupt proc");
|
||||
@ -218,10 +218,10 @@ _kvm_kvatop(kd, va, pa)
|
||||
u_long va;
|
||||
u_long *pa;
|
||||
{
|
||||
register struct vmstate *vm;
|
||||
register int s;
|
||||
register int pte;
|
||||
register int off;
|
||||
struct vmstate *vm;
|
||||
int s;
|
||||
int pte;
|
||||
int off;
|
||||
|
||||
if (va >= KERNBASE) {
|
||||
vm = kd->vmst;
|
||||
|
@ -106,7 +106,7 @@ RIPEMD160_CTX *c;
|
||||
const unsigned char *data;
|
||||
size_t len;
|
||||
{
|
||||
register u_int32_t *p;
|
||||
u_int32_t *p;
|
||||
int sw,sc;
|
||||
u_int32_t l;
|
||||
|
||||
@ -276,7 +276,7 @@ RIPEMD160_CTX *ctx;
|
||||
const u_int32_t *X;
|
||||
int num;
|
||||
{
|
||||
register u_int32_t A,B,C,D,E;
|
||||
u_int32_t A,B,C,D,E;
|
||||
u_int32_t a,b,c,d,e;
|
||||
|
||||
for (;;)
|
||||
@ -475,9 +475,9 @@ void RIPEMD160_Final(md, c)
|
||||
unsigned char *md;
|
||||
RIPEMD160_CTX *c;
|
||||
{
|
||||
register int i,j;
|
||||
register u_int32_t l;
|
||||
register u_int32_t *p;
|
||||
int i,j;
|
||||
u_int32_t l;
|
||||
u_int32_t *p;
|
||||
static unsigned char end[4]={0x80,0x00,0x00,0x00};
|
||||
unsigned char *cp=end;
|
||||
|
||||
|
@ -120,7 +120,7 @@ SHA_CTX *c;
|
||||
const unsigned char *data;
|
||||
size_t len;
|
||||
{
|
||||
register u_int32_t *p;
|
||||
u_int32_t *p;
|
||||
int ew,ec,sw,sc;
|
||||
u_int32_t l;
|
||||
|
||||
@ -290,7 +290,7 @@ SHA_CTX *c;
|
||||
const u_int32_t *W;
|
||||
int num;
|
||||
{
|
||||
register u_int32_t A,B,C,D,E,T;
|
||||
u_int32_t A,B,C,D,E,T;
|
||||
u_int32_t X[16];
|
||||
|
||||
A=c->h0;
|
||||
@ -408,9 +408,9 @@ void SHA_Final(md, c)
|
||||
unsigned char *md;
|
||||
SHA_CTX *c;
|
||||
{
|
||||
register int i,j;
|
||||
register u_int32_t l;
|
||||
register u_int32_t *p;
|
||||
int i,j;
|
||||
u_int32_t l;
|
||||
u_int32_t *p;
|
||||
static unsigned char end[4]={0x80,0x00,0x00,0x00};
|
||||
unsigned char *cp=end;
|
||||
|
||||
|
@ -148,7 +148,7 @@ SHA1_Update(c, data, len)
|
||||
const unsigned char *data;
|
||||
size_t len;
|
||||
{
|
||||
register u_int32_t *p;
|
||||
u_int32_t *p;
|
||||
int ew,ec,sw,sc;
|
||||
u_int32_t l;
|
||||
|
||||
@ -321,7 +321,7 @@ sha1_block(c, W, num)
|
||||
const u_int32_t *W;
|
||||
int num;
|
||||
{
|
||||
register u_int32_t A,B,C,D,E,T;
|
||||
u_int32_t A,B,C,D,E,T;
|
||||
u_int32_t X[16];
|
||||
|
||||
A=c->h0;
|
||||
@ -440,9 +440,9 @@ void SHA1_Final(md, c)
|
||||
unsigned char *md;
|
||||
SHA_CTX *c;
|
||||
{
|
||||
register int i,j;
|
||||
register u_int32_t l;
|
||||
register u_int32_t *p;
|
||||
int i,j;
|
||||
u_int32_t l;
|
||||
u_int32_t *p;
|
||||
static unsigned char end[4]={0x80,0x00,0x00,0x00};
|
||||
unsigned char *cp=end;
|
||||
|
||||
|
@ -103,8 +103,8 @@ int
|
||||
_nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
|
||||
{
|
||||
ENTRY *ep;
|
||||
register char *p;
|
||||
register char *cp;
|
||||
char *p;
|
||||
char *cp;
|
||||
char *dummy;
|
||||
char **fname;
|
||||
char *home;
|
||||
|
@ -74,12 +74,12 @@ static ssize_t arprecv(struct iodesc *, void *, size_t, time_t);
|
||||
/* Broadcast an ARP packet, asking who has addr on interface d */
|
||||
u_char *
|
||||
arpwhohas(d, addr)
|
||||
register struct iodesc *d;
|
||||
struct iodesc *d;
|
||||
struct in_addr addr;
|
||||
{
|
||||
register int i;
|
||||
register struct ether_arp *ah;
|
||||
register struct arp_list *al;
|
||||
int i;
|
||||
struct ether_arp *ah;
|
||||
struct arp_list *al;
|
||||
struct {
|
||||
struct ether_header eh;
|
||||
struct {
|
||||
@ -152,9 +152,9 @@ arpwhohas(d, addr)
|
||||
|
||||
static ssize_t
|
||||
arpsend(d, pkt, len)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
{
|
||||
|
||||
#ifdef ARP_DEBUG
|
||||
@ -171,13 +171,13 @@ arpsend(d, pkt, len)
|
||||
*/
|
||||
static ssize_t
|
||||
arprecv(d, pkt, len, tleft)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
time_t tleft;
|
||||
{
|
||||
register ssize_t n;
|
||||
register struct ether_arp *ah;
|
||||
ssize_t n;
|
||||
struct ether_arp *ah;
|
||||
u_int16_t etype; /* host order */
|
||||
|
||||
#ifdef ARP_DEBUG
|
||||
@ -261,8 +261,8 @@ arprecv(d, pkt, len, tleft)
|
||||
*/
|
||||
void
|
||||
arp_reply(d, pkt)
|
||||
register struct iodesc *d;
|
||||
register void *pkt; /* the request */
|
||||
struct iodesc *d;
|
||||
void *pkt; /* the request */
|
||||
{
|
||||
struct ether_arp *arp = pkt;
|
||||
|
||||
|
@ -88,7 +88,7 @@ bootp(sock, flag)
|
||||
int flag;
|
||||
{
|
||||
struct iodesc *d;
|
||||
register struct bootp *bp;
|
||||
struct bootp *bp;
|
||||
struct {
|
||||
u_char header[HEADER_SIZE];
|
||||
struct bootp wbootp;
|
||||
@ -256,11 +256,11 @@ bootp(sock, flag)
|
||||
/* Transmit a bootp request */
|
||||
static ssize_t
|
||||
bootpsend(d, pkt, len)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
{
|
||||
register struct bootp *bp;
|
||||
struct bootp *bp;
|
||||
|
||||
#ifdef BOOTP_DEBUG
|
||||
if (debug)
|
||||
@ -280,13 +280,13 @@ bootpsend(d, pkt, len)
|
||||
|
||||
static ssize_t
|
||||
bootprecv(d, pkt, len, tleft)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
time_t tleft;
|
||||
{
|
||||
register ssize_t n;
|
||||
register struct bootp *bp;
|
||||
ssize_t n;
|
||||
struct bootp *bp;
|
||||
|
||||
#ifdef BOOTP_DEBUGx
|
||||
if (debug)
|
||||
@ -339,12 +339,12 @@ time_t tleft;
|
||||
|
||||
static int
|
||||
vend_rfc1048(cp, len)
|
||||
register u_char *cp;
|
||||
u_char *cp;
|
||||
u_int len;
|
||||
{
|
||||
register u_char *ep;
|
||||
register int size;
|
||||
register u_char tag;
|
||||
u_char *ep;
|
||||
int size;
|
||||
u_char tag;
|
||||
|
||||
#ifdef BOOTP_DEBUG
|
||||
if (debug)
|
||||
@ -400,7 +400,7 @@ static void
|
||||
vend_cmu(cp)
|
||||
u_char *cp;
|
||||
{
|
||||
register struct cmu_vend *vp;
|
||||
struct cmu_vend *vp;
|
||||
|
||||
#ifdef BOOTP_DEBUG
|
||||
if (debug)
|
||||
|
@ -65,8 +65,8 @@ sendether(d, pkt, len, dea, etype)
|
||||
u_char *dea;
|
||||
int etype;
|
||||
{
|
||||
register ssize_t n;
|
||||
register struct ether_header *eh;
|
||||
ssize_t n;
|
||||
struct ether_header *eh;
|
||||
|
||||
#ifdef ETHER_DEBUG
|
||||
if (debug)
|
||||
@ -95,14 +95,14 @@ sendether(d, pkt, len, dea, etype)
|
||||
*/
|
||||
ssize_t
|
||||
readether(d, pkt, len, tleft, etype)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
time_t tleft;
|
||||
register u_int16_t *etype;
|
||||
u_int16_t *etype;
|
||||
{
|
||||
register ssize_t n;
|
||||
register struct ether_header *eh;
|
||||
ssize_t n;
|
||||
struct ether_header *eh;
|
||||
|
||||
#ifdef ETHER_DEBUG
|
||||
if (debug)
|
||||
@ -138,11 +138,11 @@ readether(d, pkt, len, tleft, etype)
|
||||
static char digits[] = "0123456789abcdef";
|
||||
char *
|
||||
ether_sprintf(ap)
|
||||
register u_char *ap;
|
||||
u_char *ap;
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
static char etherbuf[18];
|
||||
register char *cp = etherbuf;
|
||||
char *cp = etherbuf;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
*cp++ = digits[*ap >> 4];
|
||||
|
@ -45,7 +45,7 @@ fstat(fd, sb)
|
||||
int fd;
|
||||
struct stat *sb;
|
||||
{
|
||||
register struct open_file *f = &files[fd];
|
||||
struct open_file *f = &files[fd];
|
||||
|
||||
if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
|
||||
errno = EBADF;
|
||||
|
@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$");
|
||||
void
|
||||
ngets(char *buf, int n)
|
||||
{
|
||||
register int c;
|
||||
register char *lp;
|
||||
int c;
|
||||
char *lp;
|
||||
|
||||
for (lp = buf;;)
|
||||
switch (c = getchar() & 0177) {
|
||||
@ -65,7 +65,7 @@ ngets(char *buf, int n)
|
||||
}
|
||||
break;
|
||||
case 'r'&037: {
|
||||
register char *p;
|
||||
char *p;
|
||||
|
||||
putchar('\n');
|
||||
for (p = buf; p < lp; ++p)
|
||||
|
@ -52,11 +52,11 @@ __FBSDID("$FreeBSD$");
|
||||
*/
|
||||
int
|
||||
in_cksum(p, len)
|
||||
register void *p;
|
||||
register int len;
|
||||
void *p;
|
||||
int len;
|
||||
{
|
||||
register int sum = 0, oddbyte = 0, v = 0;
|
||||
register u_char *cp = p;
|
||||
int sum = 0, oddbyte = 0, v = 0;
|
||||
u_char *cp = p;
|
||||
|
||||
/* we assume < 2^16 bytes being summed */
|
||||
while (len > 0) {
|
||||
|
@ -75,7 +75,7 @@ ioctl(fd, cmd, arg)
|
||||
u_long cmd;
|
||||
char *arg;
|
||||
{
|
||||
register struct open_file *f = &files[fd];
|
||||
struct open_file *f = &files[fd];
|
||||
|
||||
if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
|
||||
errno = EBADF;
|
||||
|
@ -73,16 +73,16 @@ __FBSDID("$FreeBSD$");
|
||||
*/
|
||||
ssize_t
|
||||
sendrecv(d, sproc, sbuf, ssize, rproc, rbuf, rsize)
|
||||
register struct iodesc *d;
|
||||
register ssize_t (*sproc)(struct iodesc *, void *, size_t);
|
||||
register void *sbuf;
|
||||
register size_t ssize;
|
||||
register ssize_t (*rproc)(struct iodesc *, void *, size_t, time_t);
|
||||
register void *rbuf;
|
||||
register size_t rsize;
|
||||
struct iodesc *d;
|
||||
ssize_t (*sproc)(struct iodesc *, void *, size_t);
|
||||
void *sbuf;
|
||||
size_t ssize;
|
||||
ssize_t (*rproc)(struct iodesc *, void *, size_t, time_t);
|
||||
void *rbuf;
|
||||
size_t rsize;
|
||||
{
|
||||
register ssize_t cc;
|
||||
register time_t t, tmo, tlast;
|
||||
ssize_t cc;
|
||||
time_t t, tmo, tlast;
|
||||
long tleft;
|
||||
|
||||
#ifdef NET_DEBUG
|
||||
@ -140,11 +140,11 @@ n_long
|
||||
inet_addr(cp)
|
||||
char *cp;
|
||||
{
|
||||
register u_long val;
|
||||
register int n;
|
||||
register char c;
|
||||
u_long val;
|
||||
int n;
|
||||
char c;
|
||||
u_int parts[4];
|
||||
register u_int *pp = parts;
|
||||
u_int *pp = parts;
|
||||
|
||||
for (;;) {
|
||||
/*
|
||||
@ -224,11 +224,11 @@ inet_ntoa(ia)
|
||||
/* Similar to inet_ntoa() */
|
||||
char *
|
||||
intoa(addr)
|
||||
register n_long addr;
|
||||
n_long addr;
|
||||
{
|
||||
register char *cp;
|
||||
register u_int byte;
|
||||
register int n;
|
||||
char *cp;
|
||||
u_int byte;
|
||||
int n;
|
||||
static char buf[17]; /* strlen(".255.255.255.255") + 1 */
|
||||
|
||||
addr = ntohl(addr);
|
||||
|
@ -293,7 +293,7 @@ netif_open(machdep_hint)
|
||||
void *machdep_hint;
|
||||
{
|
||||
int fd;
|
||||
register struct iodesc *s;
|
||||
struct iodesc *s;
|
||||
struct netif *nif;
|
||||
|
||||
/* find a free socket */
|
||||
|
@ -148,11 +148,11 @@ struct fs_ops nfs_fsops = {
|
||||
*/
|
||||
int
|
||||
nfs_getrootfh(d, path, fhp)
|
||||
register struct iodesc *d;
|
||||
struct iodesc *d;
|
||||
char *path;
|
||||
u_char *fhp;
|
||||
{
|
||||
register int len;
|
||||
int len;
|
||||
struct args {
|
||||
n_long len;
|
||||
char path[FNAME_SIZE];
|
||||
@ -211,7 +211,7 @@ nfs_lookupfh(d, name, newfd)
|
||||
const char *name;
|
||||
struct nfs_iodesc *newfd;
|
||||
{
|
||||
register int len, rlen;
|
||||
int len, rlen;
|
||||
struct args {
|
||||
u_char fh[NFS_FHSIZE];
|
||||
n_long len;
|
||||
@ -390,8 +390,8 @@ nfs_open(upath, f)
|
||||
#ifndef NFS_NOSYMLINK
|
||||
struct nfs_iodesc *newfd;
|
||||
struct nfsv2_fattrs *fa;
|
||||
register char *cp, *ncp;
|
||||
register int c;
|
||||
char *cp, *ncp;
|
||||
int c;
|
||||
char namebuf[NFS_MAXPATHLEN + 1];
|
||||
char linkbuf[NFS_MAXPATHLEN + 1];
|
||||
int nlinks = 0;
|
||||
@ -459,7 +459,7 @@ nfs_open(upath, f)
|
||||
* Get next component of path name.
|
||||
*/
|
||||
{
|
||||
register int len = 0;
|
||||
int len = 0;
|
||||
|
||||
ncp = cp;
|
||||
while ((c = *cp) != '\0' && c != '/') {
|
||||
@ -560,7 +560,7 @@ int
|
||||
nfs_close(f)
|
||||
struct open_file *f;
|
||||
{
|
||||
register struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
|
||||
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
|
||||
|
||||
#ifdef NFS_DEBUG
|
||||
if (debug)
|
||||
@ -584,9 +584,9 @@ nfs_read(f, buf, size, resid)
|
||||
size_t size;
|
||||
size_t *resid; /* out */
|
||||
{
|
||||
register struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
|
||||
register ssize_t cc;
|
||||
register char *addr = buf;
|
||||
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
|
||||
ssize_t cc;
|
||||
char *addr = buf;
|
||||
|
||||
#ifdef NFS_DEBUG
|
||||
if (debug)
|
||||
@ -641,7 +641,7 @@ nfs_seek(f, offset, where)
|
||||
off_t offset;
|
||||
int where;
|
||||
{
|
||||
register struct nfs_iodesc *d = (struct nfs_iodesc *)f->f_fsdata;
|
||||
struct nfs_iodesc *d = (struct nfs_iodesc *)f->f_fsdata;
|
||||
n_long size = ntohl(d->fa.fa_size);
|
||||
|
||||
switch (where) {
|
||||
@ -671,7 +671,7 @@ nfs_stat(f, sb)
|
||||
struct stat *sb;
|
||||
{
|
||||
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
|
||||
register n_long ftype, mode;
|
||||
n_long ftype, mode;
|
||||
|
||||
ftype = ntohl(fp->fa.fa_type);
|
||||
mode = ntohl(fp->fa.fa_mode);
|
||||
@ -689,7 +689,7 @@ nfs_stat(f, sb)
|
||||
static int
|
||||
nfs_readdir(struct open_file *f, struct dirent *d)
|
||||
{
|
||||
register struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
|
||||
struct nfs_iodesc *fp = (struct nfs_iodesc *)f->f_fsdata;
|
||||
struct nfs_readdir_args *args;
|
||||
struct nfs_readdir_data *rd;
|
||||
struct nfs_readdir_off *roff = NULL;
|
||||
|
@ -106,11 +106,11 @@ vsprintf(char *buf, const char *cfmt, va_list ap)
|
||||
*/
|
||||
static char *
|
||||
ksprintn(ul, base, lenp)
|
||||
register u_long ul;
|
||||
register int base, *lenp;
|
||||
u_long ul;
|
||||
int base, *lenp;
|
||||
{ /* A long in base 8, plus NULL. */
|
||||
static char buf[sizeof(long) * NBBY / 3 + 2];
|
||||
register char *p;
|
||||
char *p;
|
||||
|
||||
p = buf;
|
||||
do {
|
||||
|
@ -65,9 +65,9 @@ typedef u_long digit;
|
||||
* We may assume len >= 0. NOTE THAT THIS WRITES len+1 DIGITS.
|
||||
*/
|
||||
static void
|
||||
shl(register digit *p, register int len, register int sh)
|
||||
shl(digit *p, int len, int sh)
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
p[i] = LHALF(p[i] << sh) | (p[i + 1] >> (HALF_BITS - sh));
|
||||
@ -88,7 +88,7 @@ __qdivrem(uq, vq, arq)
|
||||
{
|
||||
union uu tmp;
|
||||
digit *u, *v, *q;
|
||||
register digit v1, v2;
|
||||
digit v1, v2;
|
||||
u_long qhat, rhat, t;
|
||||
int m, n, d, j, i;
|
||||
digit uspace[5], vspace[5], qspace[5];
|
||||
@ -198,7 +198,7 @@ __qdivrem(uq, vq, arq)
|
||||
v1 = v[1]; /* for D3 -- note that v[1..n] are constant */
|
||||
v2 = v[2]; /* for D3 */
|
||||
do {
|
||||
register digit uj0, uj1, uj2;
|
||||
digit uj0, uj1, uj2;
|
||||
|
||||
/*
|
||||
* D3: Calculate qhat (\^q, in TeX notation).
|
||||
|
@ -55,7 +55,7 @@ srandom(seed)
|
||||
u_long
|
||||
random()
|
||||
{
|
||||
register long x, hi, lo, t;
|
||||
long x, hi, lo, t;
|
||||
|
||||
/*
|
||||
* Compute x[n + 1] = (7^5 * x[n]) mod (2^31 - 1).
|
||||
|
@ -68,7 +68,7 @@ rarp_getipaddress(sock)
|
||||
int sock;
|
||||
{
|
||||
struct iodesc *d;
|
||||
register struct ether_arp *ap;
|
||||
struct ether_arp *ap;
|
||||
struct {
|
||||
u_char header[ETHER_SIZE];
|
||||
struct {
|
||||
@ -139,9 +139,9 @@ rarp_getipaddress(sock)
|
||||
*/
|
||||
static ssize_t
|
||||
rarpsend(d, pkt, len)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
{
|
||||
|
||||
#ifdef RARP_DEBUG
|
||||
@ -158,13 +158,13 @@ rarpsend(d, pkt, len)
|
||||
*/
|
||||
static ssize_t
|
||||
rarprecv(d, pkt, len, tleft)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
time_t tleft;
|
||||
{
|
||||
register ssize_t n;
|
||||
register struct ether_arp *ap;
|
||||
ssize_t n;
|
||||
struct ether_arp *ap;
|
||||
u_int16_t etype; /* host order */
|
||||
|
||||
#ifdef RARP_DEBUG
|
||||
|
@ -113,14 +113,14 @@ int rpc_port = 0x400; /* predecrement */
|
||||
*/
|
||||
ssize_t
|
||||
rpc_call(d, prog, vers, proc, sdata, slen, rdata, rlen)
|
||||
register struct iodesc *d;
|
||||
register n_long prog, vers, proc;
|
||||
register void *sdata;
|
||||
register size_t slen;
|
||||
register void *rdata;
|
||||
register size_t rlen;
|
||||
struct iodesc *d;
|
||||
n_long prog, vers, proc;
|
||||
void *sdata;
|
||||
size_t slen;
|
||||
void *rdata;
|
||||
size_t rlen;
|
||||
{
|
||||
register ssize_t cc;
|
||||
ssize_t cc;
|
||||
struct auth_info *auth;
|
||||
struct rpc_call *call;
|
||||
struct rpc_reply *reply;
|
||||
@ -237,12 +237,12 @@ rpc_call(d, prog, vers, proc, sdata, slen, rdata, rlen)
|
||||
*/
|
||||
static ssize_t
|
||||
recvrpc(d, pkt, len, tleft)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
time_t tleft;
|
||||
{
|
||||
register struct rpc_reply *reply;
|
||||
struct rpc_reply *reply;
|
||||
ssize_t n;
|
||||
int x;
|
||||
|
||||
@ -382,7 +382,7 @@ rpc_pmap_putcache(addr, prog, vers, port)
|
||||
*/
|
||||
int
|
||||
rpc_getport(d, prog, vers)
|
||||
register struct iodesc *d;
|
||||
struct iodesc *d;
|
||||
n_long prog; /* host order */
|
||||
n_long vers; /* host order */
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ int
|
||||
strcasecmp(s1, s2)
|
||||
const char *s1, *s2;
|
||||
{
|
||||
register const u_char
|
||||
const u_char
|
||||
*us1 = (const u_char *)s1,
|
||||
*us2 = (const u_char *)s2;
|
||||
|
||||
@ -59,10 +59,10 @@ strcasecmp(s1, s2)
|
||||
int
|
||||
strncasecmp(s1, s2, n)
|
||||
const char *s1, *s2;
|
||||
register size_t n;
|
||||
size_t n;
|
||||
{
|
||||
if (n != 0) {
|
||||
register const u_char
|
||||
const u_char
|
||||
*us1 = (const u_char *)s1,
|
||||
*us2 = (const u_char *)s2;
|
||||
|
||||
|
@ -51,13 +51,13 @@ long
|
||||
strtol(nptr, endptr, base)
|
||||
const char *nptr;
|
||||
char **endptr;
|
||||
register int base;
|
||||
int base;
|
||||
{
|
||||
register const char *s;
|
||||
register unsigned long acc;
|
||||
register unsigned char c;
|
||||
register unsigned long cutoff;
|
||||
register int neg = 0, any, cutlim;
|
||||
const char *s;
|
||||
unsigned long acc;
|
||||
unsigned char c;
|
||||
unsigned long cutoff;
|
||||
int neg = 0, any, cutlim;
|
||||
|
||||
/* Be sensible about NULL strings */
|
||||
if (nptr == NULL)
|
||||
|
@ -111,9 +111,9 @@ static int tftperrors[8] = {
|
||||
|
||||
static ssize_t
|
||||
recvtftp(d, pkt, len, tleft)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register ssize_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
ssize_t len;
|
||||
time_t tleft;
|
||||
{
|
||||
struct tftphdr *t;
|
||||
@ -140,7 +140,7 @@ recvtftp(d, pkt, len, tleft)
|
||||
/*
|
||||
* First data packet from new port.
|
||||
*/
|
||||
register struct udphdr *uh;
|
||||
struct udphdr *uh;
|
||||
uh = (struct udphdr *) pkt - 1;
|
||||
d->destport = uh->uh_sport;
|
||||
} /* else check uh_sport has not changed??? */
|
||||
|
@ -63,14 +63,14 @@ __FBSDID("$FreeBSD$");
|
||||
/* Caller must leave room for ethernet, ip and udp headers in front!! */
|
||||
ssize_t
|
||||
sendudp(d, pkt, len)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
{
|
||||
register ssize_t cc;
|
||||
register struct ip *ip;
|
||||
register struct udphdr *uh;
|
||||
register u_char *ea;
|
||||
ssize_t cc;
|
||||
struct ip *ip;
|
||||
struct udphdr *uh;
|
||||
u_char *ea;
|
||||
|
||||
#ifdef NET_DEBUG
|
||||
if (debug) {
|
||||
@ -105,7 +105,7 @@ sendudp(d, pkt, len)
|
||||
|
||||
#ifndef UDP_NO_CKSUM
|
||||
{
|
||||
register struct udpiphdr *ui;
|
||||
struct udpiphdr *ui;
|
||||
struct ip tip;
|
||||
|
||||
/* Calculate checksum (must save and restore ip header) */
|
||||
@ -138,15 +138,15 @@ sendudp(d, pkt, len)
|
||||
*/
|
||||
ssize_t
|
||||
readudp(d, pkt, len, tleft)
|
||||
register struct iodesc *d;
|
||||
register void *pkt;
|
||||
register size_t len;
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
size_t len;
|
||||
time_t tleft;
|
||||
{
|
||||
register ssize_t n;
|
||||
register size_t hlen;
|
||||
register struct ip *ip;
|
||||
register struct udphdr *uh;
|
||||
ssize_t n;
|
||||
size_t hlen;
|
||||
struct ip *ip;
|
||||
struct udphdr *uh;
|
||||
u_int16_t etype; /* host order */
|
||||
|
||||
#ifdef NET_DEBUG
|
||||
@ -235,7 +235,7 @@ readudp(d, pkt, len, tleft)
|
||||
|
||||
#ifndef UDP_NO_CKSUM
|
||||
if (uh->uh_sum) {
|
||||
register struct udpiphdr *ui;
|
||||
struct udpiphdr *ui;
|
||||
struct ip tip;
|
||||
|
||||
n = ntohs(uh->uh_ulen) + sizeof(*ip);
|
||||
|
@ -137,8 +137,8 @@ read_inode(inumber, f)
|
||||
ino_t inumber;
|
||||
struct open_file *f;
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
register struct fs *fs = fp->f_fs;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct fs *fs = fp->f_fs;
|
||||
char *buf;
|
||||
size_t rsize;
|
||||
int rc;
|
||||
@ -162,7 +162,7 @@ read_inode(inumber, f)
|
||||
}
|
||||
|
||||
{
|
||||
register struct dinode *dp;
|
||||
struct dinode *dp;
|
||||
|
||||
dp = (struct dinode *)buf;
|
||||
fp->f_di = dp[ino_to_fsbo(fs, inumber)];
|
||||
@ -172,7 +172,7 @@ read_inode(inumber, f)
|
||||
* Clear out the old buffers
|
||||
*/
|
||||
{
|
||||
register int level;
|
||||
int level;
|
||||
|
||||
for (level = 0; level < NIADDR; level++)
|
||||
fp->f_blkno[level] = -1;
|
||||
@ -193,8 +193,8 @@ block_map(f, file_block, disk_block_p)
|
||||
daddr_t file_block;
|
||||
daddr_t *disk_block_p; /* out */
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
register struct fs *fs = fp->f_fs;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct fs *fs = fp->f_fs;
|
||||
int level;
|
||||
int idx;
|
||||
daddr_t ind_block_num;
|
||||
@ -298,10 +298,10 @@ buf_write_file(f, buf_p, size_p)
|
||||
char *buf_p;
|
||||
size_t *size_p; /* out */
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
register struct fs *fs = fp->f_fs;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct fs *fs = fp->f_fs;
|
||||
long off;
|
||||
register daddr_t file_block;
|
||||
daddr_t file_block;
|
||||
daddr_t disk_block;
|
||||
size_t block_size;
|
||||
int rc;
|
||||
@ -375,10 +375,10 @@ buf_read_file(f, buf_p, size_p)
|
||||
char **buf_p; /* out */
|
||||
size_t *size_p; /* out */
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
register struct fs *fs = fp->f_fs;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct fs *fs = fp->f_fs;
|
||||
long off;
|
||||
register daddr_t file_block;
|
||||
daddr_t file_block;
|
||||
daddr_t disk_block;
|
||||
size_t block_size;
|
||||
int rc;
|
||||
@ -437,8 +437,8 @@ search_directory(name, f, inumber_p)
|
||||
struct open_file *f;
|
||||
ino_t *inumber_p; /* out */
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
register struct direct *dp;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct direct *dp;
|
||||
struct direct *edp;
|
||||
char *buf;
|
||||
size_t buf_size;
|
||||
@ -486,8 +486,8 @@ ufs_open(upath, f)
|
||||
const char *upath;
|
||||
struct open_file *f;
|
||||
{
|
||||
register char *cp, *ncp;
|
||||
register int c;
|
||||
char *cp, *ncp;
|
||||
int c;
|
||||
ino_t inumber, parent_inumber;
|
||||
struct file *fp;
|
||||
struct fs *fs;
|
||||
@ -525,8 +525,8 @@ ufs_open(upath, f)
|
||||
* Calculate indirect block levels.
|
||||
*/
|
||||
{
|
||||
register int mult;
|
||||
register int level;
|
||||
int mult;
|
||||
int level;
|
||||
|
||||
mult = 1;
|
||||
for (level = 0; level < NIADDR; level++) {
|
||||
@ -566,7 +566,7 @@ ufs_open(upath, f)
|
||||
* Get next component of path name.
|
||||
*/
|
||||
{
|
||||
register int len = 0;
|
||||
int len = 0;
|
||||
|
||||
ncp = cp;
|
||||
while ((c = *cp) != '\0' && c != '/') {
|
||||
@ -622,7 +622,7 @@ ufs_open(upath, f)
|
||||
*/
|
||||
size_t buf_size;
|
||||
daddr_t disk_block;
|
||||
register struct fs *fs = fp->f_fs;
|
||||
struct fs *fs = fp->f_fs;
|
||||
|
||||
if (!buf)
|
||||
buf = malloc(fs->fs_bsize);
|
||||
@ -677,7 +677,7 @@ static int
|
||||
ufs_close(f)
|
||||
struct open_file *f;
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
int level;
|
||||
|
||||
f->f_fsdata = (void *)0;
|
||||
@ -706,12 +706,12 @@ ufs_read(f, start, size, resid)
|
||||
size_t size;
|
||||
size_t *resid; /* out */
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
register size_t csize;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
size_t csize;
|
||||
char *buf;
|
||||
size_t buf_size;
|
||||
int rc = 0;
|
||||
register char *addr = start;
|
||||
char *addr = start;
|
||||
|
||||
while (size != 0) {
|
||||
if (fp->f_seekp >= fp->f_di.di_size)
|
||||
@ -748,10 +748,10 @@ ufs_write(f, start, size, resid)
|
||||
size_t size;
|
||||
size_t *resid; /* out */
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
size_t csize;
|
||||
int rc = 0;
|
||||
register char *addr = start;
|
||||
char *addr = start;
|
||||
|
||||
csize = size;
|
||||
while ((size != 0) && (csize != 0)) {
|
||||
@ -779,7 +779,7 @@ ufs_seek(f, offset, where)
|
||||
off_t offset;
|
||||
int where;
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
|
||||
switch (where) {
|
||||
case SEEK_SET:
|
||||
@ -802,7 +802,7 @@ ufs_stat(f, sb)
|
||||
struct open_file *f;
|
||||
struct stat *sb;
|
||||
{
|
||||
register struct file *fp = (struct file *)f->f_fsdata;
|
||||
struct file *fp = (struct file *)f->f_fsdata;
|
||||
|
||||
/* only important stuff */
|
||||
sb->st_mode = fp->f_di.di_mode;
|
||||
|
@ -76,7 +76,7 @@ write(fd, dest, bcount)
|
||||
void *dest;
|
||||
size_t bcount;
|
||||
{
|
||||
register struct open_file *f = &files[fd];
|
||||
struct open_file *f = &files[fd];
|
||||
size_t resid;
|
||||
|
||||
if ((unsigned)fd >= SOPEN_MAX || !(f->f_flags & F_WRITE)) {
|
||||
|
@ -53,7 +53,7 @@ void
|
||||
login(ut)
|
||||
struct utmp *ut;
|
||||
{
|
||||
register int fd;
|
||||
int fd;
|
||||
int tty;
|
||||
|
||||
tty = ttyslot();
|
||||
|
@ -61,8 +61,8 @@ openpty(amaster, aslave, name, termp, winp)
|
||||
struct winsize *winp;
|
||||
{
|
||||
char line[] = "/dev/ptyXX";
|
||||
register const char *cp1, *cp2;
|
||||
register int master, slave, ttygid;
|
||||
const char *cp1, *cp2;
|
||||
int master, slave, ttygid;
|
||||
struct group *gr;
|
||||
|
||||
if ((gr = getgrnam("tty")) != NULL)
|
||||
|
@ -103,8 +103,8 @@ int
|
||||
_nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
|
||||
{
|
||||
ENTRY *ep;
|
||||
register char *p;
|
||||
register char *cp;
|
||||
char *p;
|
||||
char *cp;
|
||||
char *dummy;
|
||||
char **fname;
|
||||
char *home;
|
||||
|
Loading…
Reference in New Issue
Block a user