Remove 'register' keyword.

It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
 "register" -- just how many free registers do people think machines have?)
This commit is contained in:
obrien 2002-03-20 17:55:10 +00:00
parent d1c0995d10
commit f0428c61e5
44 changed files with 329 additions and 329 deletions

View File

@ -1273,7 +1273,7 @@ readdefects(struct cam_device *device, int argc, char **argv,
u_int32_t returned_length = 0;
u_int32_t num_returned = 0;
u_int8_t returned_format;
register int i;
int i;
int c, error = 0;
int lists_specified = 0;

View File

@ -140,7 +140,7 @@ void mode_list(struct cam_device *device, int page_control,
#define RTRIM(string) do { \
register int _length; \
int _length; \
while (isspace(string[_length = strlen(string) - 1])) \
string[_length] = '\0'; \
} while (0)

View File

@ -81,7 +81,7 @@ main(argc, argv)
int argc;
char *argv[];
{
register struct fstab *fs;
struct fstab *fs;
int ch, eval;
while ((ch = getopt(argc, argv, "")) != -1)
@ -312,11 +312,11 @@ dumpcg(name, fd, c)
void
pbits(vp, max)
register void *vp;
void *vp;
int max;
{
register int i;
register char *p;
int i;
char *p;
int count, j;
for (count = i = 0, p = vp; i < max; i++)

View File

@ -82,7 +82,7 @@ static int mkentry __P((struct inodesc *));
void
propagate()
{
register struct inoinfo **inpp, *inp;
struct inoinfo **inpp, *inp;
struct inoinfo **inpend;
long change;
@ -107,10 +107,10 @@ propagate()
*/
int
dirscan(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct direct *dp;
register struct bufarea *bp;
struct direct *dp;
struct bufarea *bp;
u_int dsize, n;
long blksiz;
char dbuf[DIRBLKSIZ];
@ -171,10 +171,10 @@ dirscan(idesc)
*/
static struct direct *
fsck_readdir(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct direct *dp, *ndp;
register struct bufarea *bp;
struct direct *dp, *ndp;
struct bufarea *bp;
long size, blksiz, fix, dploc;
blksiz = idesc->id_numfrags * sblock.fs_fsize;
@ -234,10 +234,10 @@ fsck_readdir(idesc)
static int
dircheck(idesc, dp)
struct inodesc *idesc;
register struct direct *dp;
struct direct *dp;
{
register int size;
register char *cp;
int size;
char *cp;
u_char namlen, type;
int spaceleft;
@ -294,7 +294,7 @@ fileerror(cwd, ino, errmesg)
ino_t cwd, ino;
char *errmesg;
{
register struct dinode *dp;
struct dinode *dp;
char pathbuf[MAXPATHLEN + 1];
pwarn("%s ", errmesg);
@ -315,7 +315,7 @@ fileerror(cwd, ino, errmesg)
void
adjust(idesc, lcnt)
register struct inodesc *idesc;
struct inodesc *idesc;
int lcnt;
{
struct dinode *dp;
@ -387,7 +387,7 @@ static int
mkentry(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
struct direct newent;
int newlen, oldlen;
@ -432,7 +432,7 @@ static int
chgino(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (memcmp(dirp->d_name, idesc->id_name, (int)dirp->d_namlen + 1))
return (KEEPON);
@ -450,7 +450,7 @@ linkup(orphan, parentdir, name)
ino_t parentdir;
char *name;
{
register struct dinode *dp;
struct dinode *dp;
int lostdir;
ino_t oldlfdir;
struct inodesc idesc;
@ -625,11 +625,11 @@ makeentry(parent, ino, name)
*/
static int
expanddir(dp, name)
register struct dinode *dp;
struct dinode *dp;
char *name;
{
ufs_daddr_t lastbn, newblk;
register struct bufarea *bp;
struct bufarea *bp;
char *cp, firstblk[DIRBLKSIZ];
lastbn = lblkno(&sblock, dp->di_size);
@ -763,8 +763,8 @@ lftempname(bufp, ino)
char *bufp;
ino_t ino;
{
register ino_t in;
register char *cp;
ino_t in;
char *cp;
int namlen;
cp = bufp + 2;

View File

@ -147,7 +147,7 @@ inoinfo(inum)
void
bufinit()
{
register struct bufarea *bp;
struct bufarea *bp;
long bufcnt, i;
char *bufp;
@ -187,7 +187,7 @@ getdatablk(blkno, size)
ufs_daddr_t blkno;
long size;
{
register struct bufarea *bp;
struct bufarea *bp;
for (bp = bufhead.b_next; bp != &bufhead; bp = bp->b_next)
if (bp->b_bno == fsbtodb(&sblock, blkno))
@ -213,7 +213,7 @@ getdatablk(blkno, size)
void
getblk(bp, blk, size)
register struct bufarea *bp;
struct bufarea *bp;
ufs_daddr_t blk;
long size;
{
@ -232,9 +232,9 @@ getblk(bp, blk, size)
void
flush(fd, bp)
int fd;
register struct bufarea *bp;
struct bufarea *bp;
{
register int i, j;
int i, j;
if (!bp->b_dirty)
return;
@ -278,7 +278,7 @@ void
ckfini(markclean)
int markclean;
{
register struct bufarea *bp, *nbp;
struct bufarea *bp, *nbp;
int ofsmodified, cnt = 0;
if (bkgrdflag) {
@ -491,7 +491,7 @@ getpathname(namebuf, curdir, ino)
ino_t curdir, ino;
{
int len;
register char *cp;
char *cp;
struct inodesc idesc;
static int busy = 0;
@ -570,7 +570,7 @@ catchquit(sig)
*/
int
dofix(idesc, msg)
register struct inodesc *idesc;
struct inodesc *idesc;
char *msg;
{

View File

@ -60,7 +60,7 @@ static int iblock __P((struct inodesc *, long ilevel, quad_t isize));
int
ckinode(dp, idesc)
struct dinode *dp;
register struct inodesc *idesc;
struct inodesc *idesc;
{
ufs_daddr_t *ap;
int ret;
@ -246,7 +246,7 @@ chkrange(blk, cnt)
ufs_daddr_t blk;
int cnt;
{
register int c;
int c;
if (cnt <= 0 || blk <= 0 || blk > maxfsblock ||
cnt - 1 > maxfsblock - blk)
@ -391,10 +391,10 @@ freeinodebuf()
*/
void
cacheino(dp, inumber)
register struct dinode *dp;
struct dinode *dp;
ino_t inumber;
{
register struct inoinfo *inp;
struct inoinfo *inp;
struct inoinfo **inpp;
int blks;
@ -431,7 +431,7 @@ struct inoinfo *
getinoinfo(inumber)
ino_t inumber;
{
register struct inoinfo *inp;
struct inoinfo *inp;
for (inp = inphead[inumber % dirhash]; inp; inp = inp->i_nexthash) {
if (inp->i_number != inumber)
@ -448,7 +448,7 @@ getinoinfo(inumber)
void
inocleanup()
{
register struct inoinfo **inpp;
struct inoinfo **inpp;
if (inphead == NULL)
return;
@ -468,11 +468,11 @@ inodirty()
void
clri(idesc, type, flag)
register struct inodesc *idesc;
struct inodesc *idesc;
char *type;
int flag;
{
register struct dinode *dp;
struct dinode *dp;
dp = ginode(idesc->id_number);
if (flag == 1) {
@ -506,7 +506,7 @@ int
findname(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (dirp->d_ino != idesc->id_parent || idesc->id_entryno < 2) {
idesc->id_entryno++;
@ -520,7 +520,7 @@ int
findino(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (dirp->d_ino == 0)
return (KEEPON);
@ -536,7 +536,7 @@ int
clearentry(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (dirp->d_ino != idesc->id_parent || idesc->id_entryno < 2) {
idesc->id_entryno++;
@ -550,8 +550,8 @@ void
pinode(ino)
ino_t ino;
{
register struct dinode *dp;
register char *p;
struct dinode *dp;
char *p;
struct passwd *pw;
time_t t;
@ -610,8 +610,8 @@ allocino(request, type)
ino_t request;
int type;
{
register ino_t ino;
register struct dinode *dp;
ino_t ino;
struct dinode *dp;
struct cg *cgp = &cgrp;
int cg;

View File

@ -180,9 +180,9 @@ pass1()
static void
checkinode(inumber, idesc)
ino_t inumber;
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct dinode *dp;
struct dinode *dp;
struct zlncnt *zlnp;
u_int64_t kernmaxfilesize;
ufs_daddr_t ndb, j;
@ -375,12 +375,12 @@ checkinode(inumber, idesc)
int
pass1check(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
int res = KEEPON;
int anyout, nfrags;
ufs_daddr_t blkno = idesc->id_blkno;
register struct dups *dlp;
struct dups *dlp;
struct dups *new;
if (idesc->id_type == SNAP) {

View File

@ -54,8 +54,8 @@ static int pass1bcheck __P((struct inodesc *));
void
pass1b()
{
register int c, i;
register struct dinode *dp;
int c, i;
struct dinode *dp;
struct inodesc idesc;
ino_t inumber;
@ -87,9 +87,9 @@ pass1b()
static int
pass1bcheck(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct dups *dlp;
struct dups *dlp;
int nfrags, res = KEEPON;
ufs_daddr_t blkno = idesc->id_blkno;

View File

@ -58,8 +58,8 @@ static int pass2check __P((struct inodesc *));
void
pass2()
{
register struct dinode *dp;
register struct inoinfo **inpp, *inp;
struct dinode *dp;
struct inoinfo **inpp, *inp;
struct inoinfo **inpend;
struct inodesc curino;
struct dinode dino;
@ -223,8 +223,8 @@ static int
pass2check(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
register struct inoinfo *inp;
struct direct *dirp = idesc->id_dirp;
struct inoinfo *inp;
int n, entrysize, ret = 0;
struct dinode *dp;
char *errmsg;

View File

@ -52,8 +52,8 @@ static const char rcsid[] =
void
pass4()
{
register ino_t inumber;
register struct zlncnt *zlnp;
ino_t inumber;
struct zlncnt *zlnp;
struct dinode *dp;
struct inodesc idesc;
int i, n, cg;
@ -122,9 +122,9 @@ pass4()
int
pass4check(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct dups *dlp;
struct dups *dlp;
int nfrags, res = KEEPON;
ufs_daddr_t blkno = idesc->id_blkno;

View File

@ -66,7 +66,7 @@ pass5()
struct csum cstotal;
struct inodesc idesc[3];
char buf[MAXBSIZE];
register struct cg *newcg = (struct cg *)buf;
struct cg *newcg = (struct cg *)buf;
struct ocg *ocg = (struct ocg *)buf;
inoinfo(WINO)->ino_state = USTATE;

View File

@ -81,9 +81,9 @@ checkfstab(preen, maxrun, docheck, chkit)
int (*docheck)(struct fstab *);
int (*chkit)(char *, char *, long, int);
{
register struct fstab *fsp;
register struct disk *dk, *nextdisk;
register struct part *pt;
struct fstab *fsp;
struct disk *dk, *nextdisk;
struct part *pt;
int ret, pid, retcode, passno, sumstatus, status;
long auxdata;
char *name;
@ -205,8 +205,8 @@ static struct disk *
finddisk(name)
char *name;
{
register struct disk *dk, **dkp;
register char *p;
struct disk *dk, **dkp;
char *p;
size_t len;
p = strrchr(name, '/');
@ -245,7 +245,7 @@ addpart(name, fsname, auxdata)
long auxdata;
{
struct disk *dk = finddisk(name);
register struct part *pt, **ppt = &dk->part;
struct part *pt, **ppt = &dk->part;
for (pt = dk->part; pt; ppt = &pt->next, pt = pt->next)
if (strcmp(pt->name, name) == 0) {
@ -273,10 +273,10 @@ addpart(name, fsname, auxdata)
static int
startdisk(dk, checkit)
register struct disk *dk;
struct disk *dk;
int (*checkit)(char *, char *, long, int);
{
register struct part *pt = dk->part;
struct part *pt = dk->part;
dk->pid = fork();
if (dk->pid < 0) {

View File

@ -510,11 +510,11 @@ static int
calcsb(dev, devfd, fs)
char *dev;
int devfd;
register struct fs *fs;
struct fs *fs;
{
register struct disklabel *lp;
register struct partition *pp;
register char *cp;
struct disklabel *lp;
struct partition *pp;
char *cp;
int i;
cp = strchr(dev, '\0') - 1;

View File

@ -78,7 +78,7 @@ static int mkentry __P((struct inodesc *));
void
propagate()
{
register struct inoinfo **inpp, *inp;
struct inoinfo **inpp, *inp;
struct inoinfo **inpend;
long change;
@ -103,10 +103,10 @@ propagate()
*/
int
dirscan(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct direct *dp;
register struct bufarea *bp;
struct direct *dp;
struct bufarea *bp;
int dsize, n;
long blksiz;
char dbuf[DIRBLKSIZ];
@ -167,10 +167,10 @@ dirscan(idesc)
*/
static struct direct *
fsck_readdir(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct direct *dp, *ndp;
register struct bufarea *bp;
struct direct *dp, *ndp;
struct bufarea *bp;
long size, blksiz, fix, dploc;
blksiz = idesc->id_numfrags * sblock.fs_fsize;
@ -230,10 +230,10 @@ fsck_readdir(idesc)
static int
dircheck(idesc, dp)
struct inodesc *idesc;
register struct direct *dp;
struct direct *dp;
{
register int size;
register char *cp;
int size;
char *cp;
u_char namlen, type;
int spaceleft;
@ -290,7 +290,7 @@ fileerror(cwd, ino, errmesg)
ino_t cwd, ino;
char *errmesg;
{
register struct dinode *dp;
struct dinode *dp;
char pathbuf[MAXPATHLEN + 1];
pwarn("%s ", errmesg);
@ -311,7 +311,7 @@ fileerror(cwd, ino, errmesg)
void
adjust(idesc, lcnt)
register struct inodesc *idesc;
struct inodesc *idesc;
int lcnt;
{
struct dinode *dp;
@ -372,7 +372,7 @@ static int
mkentry(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
struct direct newent;
int newlen, oldlen;
@ -417,7 +417,7 @@ static int
chgino(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (memcmp(dirp->d_name, idesc->id_name, (int)dirp->d_namlen + 1))
return (KEEPON);
@ -435,7 +435,7 @@ linkup(orphan, parentdir, name)
ino_t parentdir;
char *name;
{
register struct dinode *dp;
struct dinode *dp;
int lostdir;
ino_t oldlfdir;
struct inodesc idesc;
@ -606,11 +606,11 @@ makeentry(parent, ino, name)
*/
static int
expanddir(dp, name)
register struct dinode *dp;
struct dinode *dp;
char *name;
{
ufs_daddr_t lastbn, newblk;
register struct bufarea *bp;
struct bufarea *bp;
char *cp, firstblk[DIRBLKSIZ];
lastbn = lblkno(&sblock, dp->di_size);
@ -744,8 +744,8 @@ lftempname(bufp, ino)
char *bufp;
ino_t ino;
{
register ino_t in;
register char *cp;
ino_t in;
char *cp;
int namlen;
cp = bufp + 2;

View File

@ -148,7 +148,7 @@ inoinfo(inum)
void
bufinit()
{
register struct bufarea *bp;
struct bufarea *bp;
long bufcnt, i;
char *bufp;
@ -188,7 +188,7 @@ getdatablk(blkno, size)
ufs_daddr_t blkno;
long size;
{
register struct bufarea *bp;
struct bufarea *bp;
for (bp = bufhead.b_next; bp != &bufhead; bp = bp->b_next)
if (bp->b_bno == fsbtodb(&sblock, blkno))
@ -214,7 +214,7 @@ getdatablk(blkno, size)
void
getblk(bp, blk, size)
register struct bufarea *bp;
struct bufarea *bp;
ufs_daddr_t blk;
long size;
{
@ -233,9 +233,9 @@ getblk(bp, blk, size)
void
flush(fd, bp)
int fd;
register struct bufarea *bp;
struct bufarea *bp;
{
register int i, j;
int i, j;
if (!bp->b_dirty)
return;
@ -273,7 +273,7 @@ void
ckfini(markclean)
int markclean;
{
register struct bufarea *bp, *nbp;
struct bufarea *bp, *nbp;
int ofsmodified, cnt = 0;
if (fswritefd < 0) {
@ -466,7 +466,7 @@ getpathname(namebuf, curdir, ino)
ino_t curdir, ino;
{
int len;
register char *cp;
char *cp;
struct inodesc idesc;
static int busy = 0;
@ -559,7 +559,7 @@ voidquit(sig)
*/
int
dofix(idesc, msg)
register struct inodesc *idesc;
struct inodesc *idesc;
char *msg;
{

View File

@ -59,7 +59,7 @@ static int iblock __P((struct inodesc *, long ilevel, quad_t isize));
int
ckinode(dp, idesc)
struct dinode *dp;
register struct inodesc *idesc;
struct inodesc *idesc;
{
ufs_daddr_t *ap;
int ret;
@ -243,7 +243,7 @@ chkrange(blk, cnt)
ufs_daddr_t blk;
int cnt;
{
register int c;
int c;
if (cnt <= 0 || blk <= 0 || blk > maxfsblock ||
cnt - 1 > maxfsblock - blk)
@ -388,10 +388,10 @@ freeinodebuf()
*/
void
cacheino(dp, inumber)
register struct dinode *dp;
struct dinode *dp;
ino_t inumber;
{
register struct inoinfo *inp;
struct inoinfo *inp;
struct inoinfo **inpp;
int blks;
@ -428,7 +428,7 @@ struct inoinfo *
getinoinfo(inumber)
ino_t inumber;
{
register struct inoinfo *inp;
struct inoinfo *inp;
for (inp = inphead[inumber % dirhash]; inp; inp = inp->i_nexthash) {
if (inp->i_number != inumber)
@ -445,7 +445,7 @@ getinoinfo(inumber)
void
inocleanup()
{
register struct inoinfo **inpp;
struct inoinfo **inpp;
if (inphead == NULL)
return;
@ -465,11 +465,11 @@ inodirty()
void
clri(idesc, type, flag)
register struct inodesc *idesc;
struct inodesc *idesc;
char *type;
int flag;
{
register struct dinode *dp;
struct dinode *dp;
dp = ginode(idesc->id_number);
if (flag == 1) {
@ -492,7 +492,7 @@ int
findname(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (dirp->d_ino != idesc->id_parent || idesc->id_entryno < 2) {
idesc->id_entryno++;
@ -506,7 +506,7 @@ int
findino(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (dirp->d_ino == 0)
return (KEEPON);
@ -522,7 +522,7 @@ int
clearentry(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (dirp->d_ino != idesc->id_parent || idesc->id_entryno < 2) {
idesc->id_entryno++;
@ -536,8 +536,8 @@ void
pinode(ino)
ino_t ino;
{
register struct dinode *dp;
register char *p;
struct dinode *dp;
char *p;
struct passwd *pw;
time_t t;
@ -596,8 +596,8 @@ allocino(request, type)
ino_t request;
int type;
{
register ino_t ino;
register struct dinode *dp;
ino_t ino;
struct dinode *dp;
struct cg *cgp = &cgrp;
int cg;

View File

@ -169,9 +169,9 @@ pass1()
static void
checkinode(inumber, idesc)
ino_t inumber;
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct dinode *dp;
struct dinode *dp;
struct zlncnt *zlnp;
int ndb, j;
mode_t mode;
@ -343,12 +343,12 @@ checkinode(inumber, idesc)
int
pass1check(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
int res = KEEPON;
int anyout, nfrags;
ufs_daddr_t blkno = idesc->id_blkno;
register struct dups *dlp;
struct dups *dlp;
struct dups *new;
if (idesc->id_type == SNAP) {

View File

@ -54,8 +54,8 @@ static int pass1bcheck __P((struct inodesc *));
void
pass1b()
{
register int c, i;
register struct dinode *dp;
int c, i;
struct dinode *dp;
struct inodesc idesc;
ino_t inumber;
@ -81,9 +81,9 @@ pass1b()
static int
pass1bcheck(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct dups *dlp;
struct dups *dlp;
int nfrags, res = KEEPON;
ufs_daddr_t blkno = idesc->id_blkno;

View File

@ -57,8 +57,8 @@ static int pass2check __P((struct inodesc *));
void
pass2()
{
register struct dinode *dp;
register struct inoinfo **inpp, *inp;
struct dinode *dp;
struct inoinfo **inpp, *inp;
struct inoinfo **inpend;
struct inodesc curino;
struct dinode dino;
@ -216,8 +216,8 @@ static int
pass2check(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
register struct inoinfo *inp;
struct direct *dirp = idesc->id_dirp;
struct inoinfo *inp;
int n, entrysize, ret = 0;
struct dinode *dp;
char *errmsg;

View File

@ -52,8 +52,8 @@ static const char rcsid[] =
void
pass4()
{
register ino_t inumber;
register struct zlncnt *zlnp;
ino_t inumber;
struct zlncnt *zlnp;
struct dinode *dp;
struct inodesc idesc;
int i, n, cg;
@ -119,9 +119,9 @@ pass4()
int
pass4check(idesc)
register struct inodesc *idesc;
struct inodesc *idesc;
{
register struct dups *dlp;
struct dups *dlp;
int nfrags, res = KEEPON;
ufs_daddr_t blkno = idesc->id_blkno;

View File

@ -63,7 +63,7 @@ pass5()
struct csum cstotal;
struct inodesc idesc[3];
char buf[MAXBSIZE];
register struct cg *newcg = (struct cg *)buf;
struct cg *newcg = (struct cg *)buf;
struct ocg *ocg = (struct ocg *)buf;
inoinfo(WINO)->ino_state = USTATE;

View File

@ -80,9 +80,9 @@ checkfstab(preen, maxrun, docheck, chkit)
int (*docheck)(struct fstab *);
int (*chkit)(char *, char *, long, int);
{
register struct fstab *fsp;
register struct disk *dk, *nextdisk;
register struct part *pt;
struct fstab *fsp;
struct disk *dk, *nextdisk;
struct part *pt;
int ret, pid, retcode, passno, sumstatus, status;
long auxdata;
char *name;
@ -204,8 +204,8 @@ static struct disk *
finddisk(name)
char *name;
{
register struct disk *dk, **dkp;
register char *p;
struct disk *dk, **dkp;
char *p;
size_t len;
p = strrchr(name, '/');
@ -244,7 +244,7 @@ addpart(name, fsname, auxdata)
long auxdata;
{
struct disk *dk = finddisk(name);
register struct part *pt, **ppt = &dk->part;
struct part *pt, **ppt = &dk->part;
for (pt = dk->part; pt; ppt = &pt->next, pt = pt->next)
if (strcmp(pt->name, name) == 0) {
@ -272,10 +272,10 @@ addpart(name, fsname, auxdata)
static int
startdisk(dk, checkit)
register struct disk *dk;
struct disk *dk;
int (*checkit)(char *, char *, long, int);
{
register struct part *pt = dk->part;
struct part *pt = dk->part;
dk->pid = fork();
if (dk->pid < 0) {

View File

@ -449,11 +449,11 @@ static int
calcsb(dev, devfd, fs)
char *dev;
int devfd;
register struct fs *fs;
struct fs *fs;
{
register struct disklabel *lp;
register struct partition *pp;
register char *cp;
struct disklabel *lp;
struct partition *pp;
char *cp;
int i;
cp = strchr(dev, '\0') - 1;

View File

@ -190,7 +190,7 @@ helpfn(argc, argv)
int argc;
char *argv[];
{
register struct cmdtable *cmdtp;
struct cmdtable *cmdtp;
printf("Commands are:\n%-10s %5s %5s %s\n",
"command", "min argc", "max argc", "what");
@ -395,7 +395,7 @@ int
scannames(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
printf("slot %d ino %d reclen %d: %s, `%.*s'\n",
slot++, dirp->d_ino, dirp->d_reclen, typename[dirp->d_type],
@ -517,7 +517,7 @@ int
chinumfunc(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
if (slotcount++ == desired) {
dirp->d_ino = idesc->id_parent;
@ -561,7 +561,7 @@ int
chnamefunc(idesc)
struct inodesc *idesc;
{
register struct direct *dirp = idesc->id_dirp;
struct direct *dirp = idesc->id_dirp;
struct direct testdir;
if (slotcount++ == desired) {

View File

@ -361,7 +361,7 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag)
DBG_FUNC("initcg")
daddr_t cbase, d, dlower, dupper, dmax, blkno;
int i;
register struct csum *cs;
struct csum *cs;
#ifdef FSIRAND
int j;
#endif

View File

@ -651,7 +651,7 @@ ifconfig(argc, argv, afp)
err(1, "socket");
while (argc > 0) {
register const struct cmd *p;
const struct cmd *p;
for (p = cmds; p->c_name; p++)
if (strcmp(*argv, p->c_name) == 0)
@ -1590,7 +1590,7 @@ in_getaddr(s, which)
const char *s;
int which;
{
register struct sockaddr_in *sin = sintab[which];
struct sockaddr_in *sin = sintab[which];
struct hostent *hp;
struct netent *np;
@ -1640,7 +1640,7 @@ in6_getaddr(s, which)
const char *s;
int which;
{
register struct sockaddr_in6 *sin = sin6tab[which];
struct sockaddr_in6 *sin = sin6tab[which];
struct addrinfo hints, *res;
int error = -1;
@ -1676,8 +1676,8 @@ in6_getprefix(plen, which)
const char *plen;
int which;
{
register struct sockaddr_in6 *sin = sin6tab[which];
register u_char *cp;
struct sockaddr_in6 *sin = sin6tab[which];
u_char *cp;
int len = atoi(plen);
if ((len < 0) || (len > 128))
@ -1702,11 +1702,11 @@ in6_getprefix(plen, which)
void
printb(s, v, bits)
const char *s;
register unsigned v;
register const char *bits;
unsigned v;
const char *bits;
{
register int i, any = 0;
register char c;
int i, any = 0;
char c;
if (bits && *bits == 8)
printf("%s=%o", s, v);
@ -1867,8 +1867,8 @@ prefix(val, size)
void *val;
int size;
{
register u_char *name = (u_char *)val;
register int byte, bit, plen = 0;
u_char *name = (u_char *)val;
int byte, bit, plen = 0;
for (byte = 0; byte < size; byte++, plen += 8)
if (name[byte] != 0xff)

View File

@ -210,8 +210,8 @@ main(argc, argv)
/* So give them what they want */
if (argc > 1) {
if (strlen(argv[1]) == 1) {
register char runlevel = *argv[1];
register int sig;
char runlevel = *argv[1];
int sig;
switch (runlevel) {
case '0': /* halt + poweroff */
@ -944,8 +944,8 @@ construct_argv(command)
char *command;
{
char *strk (char *);
register int argc = 0;
register char **argv = (char **) malloc(((strlen(command) + 1) / 2 + 1)
int argc = 0;
char **argv = (char **) malloc(((strlen(command) + 1) / 2 + 1)
* sizeof (char *));
if ((argv[argc++] = strk(command)) == 0) {
@ -962,7 +962,7 @@ construct_argv(command)
*/
void
free_session(sp)
register session_t *sp;
session_t *sp;
{
free(sp->se_device);
if (sp->se_getty) {
@ -988,9 +988,9 @@ session_t *
new_session(sprev, session_index, typ)
session_t *sprev;
int session_index;
register struct ttyent *typ;
struct ttyent *typ;
{
register session_t *sp;
session_t *sp;
int fd;
if ((typ->ty_status & TTY_ON) == 0 ||
@ -1093,8 +1093,8 @@ state_func_t
read_ttys()
{
int session_index = 0;
register session_t *sp, *snext;
register struct ttyent *typ;
session_t *sp, *snext;
struct ttyent *typ;
/*
* Destroy any previous session state.
@ -1245,7 +1245,7 @@ collect_child(pid)
pid_t pid;
#endif
{
register session_t *sp, *sprev, *snext;
session_t *sp, *sprev, *snext;
if (! sessions)
return;
@ -1316,7 +1316,7 @@ state_func_t
multi_user()
{
pid_t pid;
register session_t *sp;
session_t *sp;
requested_transition = 0;
@ -1355,10 +1355,10 @@ multi_user()
state_func_t
clean_ttys()
{
register session_t *sp, *sprev;
register struct ttyent *typ;
register int session_index = 0;
register int devlen;
session_t *sp, *sprev;
struct ttyent *typ;
int session_index = 0;
int devlen;
char *old_getty, *old_window, *old_type;
if (! sessions)
@ -1453,7 +1453,7 @@ clean_ttys()
state_func_t
catatonia()
{
register session_t *sp;
session_t *sp;
for (sp = sessions; sp; sp = sp->se_next)
sp->se_flags |= SE_SHUTDOWN;
@ -1478,8 +1478,8 @@ alrm_handler(sig)
state_func_t
death()
{
register session_t *sp;
register int i;
session_t *sp;
int i;
pid_t pid;
static const int death_sigs[2] = { SIGTERM, SIGKILL };

View File

@ -274,8 +274,8 @@ int silent;
}
while ((dp = readdir(dd)) != NULL) {
register int n;
register char *cp;
int n;
char *cp;
/* Check for `lib' prefix */
if (dp->d_name[0] != 'l' ||

View File

@ -241,8 +241,8 @@ main(argc, argv)
int argc;
char *argv[];
{
register int c;
register struct nfs_args *nfsargsp;
int c;
struct nfs_args *nfsargsp;
struct nfs_args nfsargs;
int mntflags, altflags, nfssvc_flag, num;
char *name, *p, *spec;
@ -856,9 +856,9 @@ xdr_dir(xdrsp, dirp)
int
xdr_fh(xdrsp, np)
XDR *xdrsp;
register struct nfhret *np;
struct nfhret *np;
{
register int i;
int i;
long auth, authcnt, authfnd = 0;
if (!xdr_u_long(xdrsp, &np->stat))

View File

@ -723,7 +723,7 @@ xdr_fhs(xdrsp, cp)
XDR *xdrsp;
caddr_t cp;
{
register struct fhreturn *fhrp = (struct fhreturn *)cp;
struct fhreturn *fhrp = (struct fhreturn *)cp;
u_long ok = 0, len, auth;
if (!xdr_long(xdrsp, &ok))

View File

@ -201,7 +201,7 @@ main(argc, argv)
struct hostent *hp;
struct sockaddr_in *to, sin;
struct termios ts;
register int i;
int i;
int ch, hold, packlen, preload, sockerrno, almost_done = 0, ttl;
struct in_addr ifaddr;
unsigned char mttl, loop;
@ -639,7 +639,7 @@ main(argc, argv)
}
while (!finish_up) {
register int cc;
int cc;
int n;
struct timeval timeout, now;
fd_set rfds;
@ -747,8 +747,8 @@ stopit(sig)
static void
pinger(void)
{
register struct icmp *icp;
register int cc;
struct icmp *icp;
int cc;
int i;
icp = (struct icmp *)outpack;
@ -803,10 +803,10 @@ pr_pack(buf, cc, from, tv)
struct sockaddr_in *from;
struct timeval *tv;
{
register struct icmp *icp;
register u_long l;
register int i, j;
register u_char *cp,*dp;
struct icmp *icp;
u_long l;
int i, j;
u_char *cp,*dp;
static int old_rrlen;
static char old_rr[MAX_IPOPTLEN];
struct ip *ip;
@ -1041,9 +1041,9 @@ in_cksum(addr, len)
u_short *addr;
int len;
{
register int nleft = len;
register u_short *w = addr;
register int sum = 0;
int nleft = len;
u_short *w = addr;
int sum = 0;
union {
u_short us;
u_char uc[2];
@ -1081,7 +1081,7 @@ in_cksum(addr, len)
*/
static void
tvsub(out, in)
register struct timeval *out, *in;
struct timeval *out, *in;
{
if ((out->tv_usec -= in->tv_usec) < 0) {
--out->tv_sec;
@ -1406,7 +1406,7 @@ static void
fill(bp, patp)
char *bp, *patp;
{
register int ii, jj, kk;
int ii, jj, kk;
int pat[16];
char *cp;

View File

@ -295,7 +295,7 @@ main(argc, argv)
struct addrinfo hints;
fd_set *fdmaskp;
int fdmasks;
register int cc, i;
int cc, i;
int ch, fromlen, hold, packlen, preload, optval, ret_ga;
u_char *datap, *packet;
char *e, *target, *ifname = NULL;
@ -2127,7 +2127,7 @@ set_pathmtu(mtu)
*/
void
tvsub(out, in)
register struct timeval *out, *in;
struct timeval *out, *in;
{
if ((out->tv_usec -= in->tv_usec) < 0) {
--out->tv_sec;
@ -2585,7 +2585,7 @@ void
fill(bp, patp)
char *bp, *patp;
{
register int ii, jj, kk;
int ii, jj, kk;
int pat[16];
char *cp;

View File

@ -81,9 +81,9 @@ checkfstab(preen, maxrun, docheck, chkit)
int (*docheck)(struct fstab *);
int (*chkit)(char *, char *, long, int);
{
register struct fstab *fsp;
register struct disk *dk, *nextdisk;
register struct part *pt;
struct fstab *fsp;
struct disk *dk, *nextdisk;
struct part *pt;
int ret, pid, retcode, passno, sumstatus, status;
long auxdata;
char *name;
@ -205,8 +205,8 @@ static struct disk *
finddisk(name)
char *name;
{
register struct disk *dk, **dkp;
register char *p;
struct disk *dk, **dkp;
char *p;
size_t len;
p = strrchr(name, '/');
@ -245,7 +245,7 @@ addpart(name, fsname, auxdata)
long auxdata;
{
struct disk *dk = finddisk(name);
register struct part *pt, **ppt = &dk->part;
struct part *pt, **ppt = &dk->part;
for (pt = dk->part; pt; ppt = &pt->next, pt = pt->next)
if (strcmp(pt->name, name) == 0) {
@ -273,10 +273,10 @@ addpart(name, fsname, auxdata)
static int
startdisk(dk, checkit)
register struct disk *dk;
struct disk *dk;
int (*checkit)(char *, char *, long, int);
{
register struct part *pt = dk->part;
struct part *pt = dk->part;
dk->pid = fork();
if (dk->pid < 0) {

View File

@ -141,8 +141,8 @@ void
extractdirs(genmode)
int genmode;
{
register int i;
register struct dinode *ip;
int i;
struct dinode *ip;
struct inotab *itp;
struct direct nulldir;
int fd;
@ -229,8 +229,8 @@ treescan(pname, ino, todo)
ino_t ino;
long (*todo) __P((char *, ino_t, int));
{
register struct inotab *itp;
register struct direct *dp;
struct inotab *itp;
struct direct *dp;
int namelen;
long bpt;
char locname[MAXPATHLEN + 1];
@ -321,8 +321,8 @@ searchdir(inum, name)
ino_t inum;
char *name;
{
register struct direct *dp;
register struct inotab *itp;
struct direct *dp;
struct inotab *itp;
int len;
itp = inotablookup(inum);
@ -347,9 +347,9 @@ putdir(buf, size)
long size;
{
struct direct cvtbuf;
register struct odirect *odp;
struct odirect *odp;
struct odirect *eodp;
register struct direct *dp;
struct direct *dp;
long loc, i;
if (cvtflag) {
@ -443,8 +443,8 @@ flushent()
static void
dcvt(odp, ndp)
register struct odirect *odp;
register struct direct *ndp;
struct odirect *odp;
struct direct *ndp;
{
memset(ndp, 0, (long)(sizeof *ndp));
@ -464,7 +464,7 @@ dcvt(odp, ndp)
*/
static void
rst_seekdir(dirp, loc, base)
register RST_DIR *dirp;
RST_DIR *dirp;
long loc, base;
{
@ -484,9 +484,9 @@ rst_seekdir(dirp, loc, base)
*/
struct direct *
rst_readdir(dirp)
register RST_DIR *dirp;
RST_DIR *dirp;
{
register struct direct *dp;
struct direct *dp;
for (;;) {
if (dirp->dd_loc == 0) {
@ -571,8 +571,8 @@ static RST_DIR *
opendirfile(name)
const char *name;
{
register RST_DIR *dirp;
register int fd;
RST_DIR *dirp;
int fd;
if ((fd = open(name, O_RDONLY)) == -1)
return (NULL);
@ -658,7 +658,7 @@ genliteraldir(name, ino)
char *name;
ino_t ino;
{
register struct inotab *itp;
struct inotab *itp;
int ofile, dp, i, size;
char buf[BUFSIZ];
@ -720,7 +720,7 @@ allocinotab(ino, dip, seekpt)
struct dinode *dip;
long seekpt;
{
register struct inotab *itp;
struct inotab *itp;
struct modeinfo node;
itp = calloc(1, sizeof(struct inotab));
@ -752,7 +752,7 @@ static struct inotab *
inotablookup(ino)
ino_t ino;
{
register struct inotab *itp;
struct inotab *itp;
for (itp = inotab[INOHASH(ino)]; itp != NULL; itp = itp->t_next)
if (itp->t_ino == ino)

View File

@ -96,7 +96,7 @@ static void printlist __P((char *, char *));
void
runcmdshell()
{
register struct entry *np;
struct entry *np;
ino_t ino;
struct arglist arglist;
char curdir[MAXPATHLEN];
@ -307,7 +307,7 @@ getcmd(curdir, cmd, name, size, ap)
struct arglist *ap;
int size;
{
register char *cp;
char *cp;
static char input[BUFSIZ];
char output[BUFSIZ];
# define rawname input /* save space by reusing input buffer */
@ -393,7 +393,7 @@ static char *
copynext(input, output)
char *input, *output;
{
register char *cp, *bp;
char *cp, *bp;
char quote;
for (cp = input; *cp == ' ' || *cp == '\t'; cp++)
@ -444,7 +444,7 @@ canon(rawname, canonname, len)
char *rawname, *canonname;
int len;
{
register char *cp, *np;
char *cp, *np;
if (strcmp(rawname, ".") == 0 || strncmp(rawname, "./", 2) == 0)
(void) strcpy(canonname, "");
@ -500,8 +500,8 @@ printlist(name, basename)
char *name;
char *basename;
{
register struct afile *fp, *list, *listp;
register struct direct *dp;
struct afile *fp, *list, *listp;
struct direct *dp;
struct afile single;
RST_DIR *dirp;
int entries, len, namelen;
@ -583,7 +583,7 @@ static void
mkentry(name, dp, fp)
char *name;
struct direct *dp;
register struct afile *fp;
struct afile *fp;
{
char *cp;
struct entry *np;
@ -644,10 +644,10 @@ mkentry(name, dp, fp)
*/
static void
formatf(list, nentry)
register struct afile *list;
struct afile *list;
int nentry;
{
register struct afile *fp, *endlist;
struct afile *fp, *endlist;
int width, bigino, haveprefix, havepostfix;
int i, j, w, precision, columns, lines;
@ -744,7 +744,7 @@ glob_stat(name, stp)
const char *name;
struct stat *stp;
{
register struct direct *dp;
struct direct *dp;
dp = pathsearch(name);
if (dp == NULL || (!dflag && TSTINO(dp->d_ino, dumpmap) == 0) ||
@ -762,7 +762,7 @@ glob_stat(name, stp)
*/
static int
fcmp(f1, f2)
register const void *f1, *f2;
const void *f1, *f2;
{
return (strcmp(((struct afile *)f1)->fname,
((struct afile *)f2)->fname));

View File

@ -80,7 +80,7 @@ addfile(name, ino, type)
ino_t ino;
int type;
{
register struct entry *ep;
struct entry *ep;
long descend = hflag ? GOOD : FAIL;
char buf[100];
@ -162,8 +162,8 @@ static struct entry *removelist;
void
removeoldleaves()
{
register struct entry *ep, *nextep;
register ino_t i, mydirino;
struct entry *ep, *nextep;
ino_t i, mydirino;
vprintf(stdout, "Mark entries to be removed.\n");
if ((ep = lookupino(WINO))) {
@ -218,7 +218,7 @@ nodeupdates(name, ino, type)
ino_t ino;
int type;
{
register struct entry *ep, *np, *ip;
struct entry *ep, *np, *ip;
long descend = GOOD;
int lookuptype = 0;
int key = 0;
@ -526,8 +526,8 @@ keyval(key)
void
findunreflinks()
{
register struct entry *ep, *np;
register ino_t i;
struct entry *ep, *np;
ino_t i;
vprintf(stdout, "Find unreferenced names.\n");
for (i = ROOTINO; i < maxino; i++) {
@ -574,7 +574,7 @@ findunreflinks()
void
removeoldnodes()
{
register struct entry *ep, **prev;
struct entry *ep, **prev;
long change;
vprintf(stdout, "Remove old nodes (directories).\n");
@ -604,7 +604,7 @@ void
createleaves(symtabfile)
char *symtabfile;
{
register struct entry *ep;
struct entry *ep;
ino_t first;
long curvol;
@ -683,8 +683,8 @@ createleaves(symtabfile)
void
createfiles()
{
register ino_t first, next, last;
register struct entry *ep;
ino_t first, next, last;
struct entry *ep;
long curvol;
vprintf(stdout, "Extract requested files\n");
@ -779,8 +779,8 @@ createfiles()
void
createlinks()
{
register struct entry *np, *ep;
register ino_t i;
struct entry *np, *ep;
ino_t i;
char name[BUFSIZ];
if ((ep = lookupino(WINO))) {
@ -819,8 +819,8 @@ createlinks()
void
checkrestore()
{
register struct entry *ep;
register ino_t i;
struct entry *ep;
ino_t i;
vprintf(stdout, "Check the symbol table.\n");
for (i = WINO; i < maxino; i++) {

View File

@ -85,7 +85,7 @@ struct entry *
lookupino(inum)
ino_t inum;
{
register struct entry *ep;
struct entry *ep;
if (inum < WINO || inum >= maxino)
return (NULL);
@ -124,7 +124,7 @@ void
deleteino(inum)
ino_t inum;
{
register struct entry *next;
struct entry *next;
struct entry **prev;
if (inum < WINO || inum >= maxino)
@ -148,8 +148,8 @@ struct entry *
lookupname(name)
char *name;
{
register struct entry *ep;
register char *np, *cp;
struct entry *ep;
char *np, *cp;
char buf[MAXPATHLEN];
cp = name;
@ -199,9 +199,9 @@ lookupparent(name)
*/
char *
myname(ep)
register struct entry *ep;
struct entry *ep;
{
register char *cp;
char *cp;
static char namebuf[MAXPATHLEN];
for (cp = &namebuf[MAXPATHLEN - 2]; cp > &namebuf[ep->e_namlen]; ) {
@ -231,7 +231,7 @@ addentry(name, inum, type)
ino_t inum;
int type;
{
register struct entry *np, *ep;
struct entry *np, *ep;
if (freelist != NULL) {
np = freelist;
@ -278,9 +278,9 @@ addentry(name, inum, type)
*/
void
freeentry(ep)
register struct entry *ep;
struct entry *ep;
{
register struct entry *np;
struct entry *np;
ino_t inum;
if (ep->e_flags != REMOVED)
@ -322,7 +322,7 @@ freeentry(ep)
*/
void
moveentry(ep, newname)
register struct entry *ep;
struct entry *ep;
char *newname;
{
struct entry *np;
@ -352,9 +352,9 @@ moveentry(ep, newname)
*/
static void
removeentry(ep)
register struct entry *ep;
struct entry *ep;
{
register struct entry *np;
struct entry *np;
np = ep->e_parent;
if (np->e_entries == ep) {
@ -457,8 +457,8 @@ dumpsymtable(filename, checkpt)
char *filename;
long checkpt;
{
register struct entry *ep, *tep;
register ino_t i;
struct entry *ep, *tep;
ino_t i;
struct entry temp, *tentry;
long mynum = 1, stroff = 0;
FILE *fd;
@ -546,11 +546,11 @@ initsymtable(filename)
{
char *base;
long tblsize;
register struct entry *ep;
struct entry *ep;
struct entry *baseep, *lep;
struct symtableheader hdr;
struct stat stbuf;
register long i;
long i;
int fd;
vprintf(stdout, "Initialize symbol table.\n");

View File

@ -681,7 +681,7 @@ getfile(fill, skip)
void (*fill) __P((char *, long));
void (*skip) __P((char *, long));
{
register int i;
int i;
int curblk = 0;
quad_t size = spcl.c_dinode.di_size;
static char clearedbuf[MAXBSIZE];
@ -969,7 +969,7 @@ readtape(buf)
static void
findtapeblksize()
{
register long i;
long i;
for (i = 0; i < ntrec; i++)
((struct s_spcl *)&tapebuf[i * TP_BSIZE])->c_magic = 0;
@ -1297,9 +1297,9 @@ findinode(header)
static int
checksum(buf)
register int *buf;
int *buf;
{
register int i, j;
int i, j;
j = sizeof(union u_spcl) / sizeof(int);
i = 0;
@ -1352,8 +1352,8 @@ msg(fmt, va_alist)
static u_char *
swabshort(sp, n)
register u_char *sp;
register int n;
u_char *sp;
int n;
{
char c;
@ -1366,8 +1366,8 @@ swabshort(sp, n)
static u_char *
swablong(sp, n)
register u_char *sp;
register int n;
u_char *sp;
int n;
{
char c;
@ -1381,7 +1381,7 @@ swablong(sp, n)
void
swabst(cp, sp)
register u_char *cp, *sp;
u_char *cp, *sp;
{
int n = 0;

View File

@ -61,7 +61,7 @@ void
pathcheck(name)
char *name;
{
register char *cp;
char *cp;
struct entry *ep;
char *start;
@ -88,7 +88,7 @@ pathcheck(name)
*/
void
mktempname(ep)
register struct entry *ep;
struct entry *ep;
{
char oldname[MAXPATHLEN];
@ -162,7 +162,7 @@ newnode(np)
*/
void
removenode(ep)
register struct entry *ep;
struct entry *ep;
{
char *cp;
@ -185,7 +185,7 @@ removenode(ep)
*/
void
removeleaf(ep)
register struct entry *ep;
struct entry *ep;
{
char *cp;
@ -274,7 +274,7 @@ addwhiteout(name)
*/
void
delwhiteout(ep)
register struct entry *ep;
struct entry *ep;
{
char *name;
@ -298,7 +298,7 @@ ino_t
lowerbnd(start)
ino_t start;
{
register struct entry *ep;
struct entry *ep;
for ( ; start < maxino; start++) {
ep = lookupino(start);
@ -317,7 +317,7 @@ ino_t
upperbnd(start)
ino_t start;
{
register struct entry *ep;
struct entry *ep;
for ( ; start > ROOTINO; start--) {
ep = lookupino(start);
@ -334,7 +334,7 @@ upperbnd(start)
*/
void
badentry(ep, msg)
register struct entry *ep;
struct entry *ep;
char *msg;
{
@ -361,7 +361,7 @@ badentry(ep, msg)
*/
char *
flagvalues(ep)
register struct entry *ep;
struct entry *ep;
{
static char flagbuf[BUFSIZ];

View File

@ -214,7 +214,7 @@ flushroutes(argc, argv)
size_t needed;
int mib[6], rlen, seqno;
char *buf, *next, *lim;
register struct rt_msghdr *rtm;
struct rt_msghdr *rtm;
if (uid) {
errx(EX_NOPERM, "must be root to alter routing table");
@ -306,7 +306,7 @@ const char *
routename(sa)
struct sockaddr *sa;
{
register char *cp;
char *cp;
static char line[MAXHOSTNAMELEN + 1];
struct hostent *hp;
static char domain[MAXHOSTNAMELEN + 1];
@ -430,7 +430,7 @@ netname(sa)
static char line[MAXHOSTNAMELEN + 1];
struct netent *np = 0;
u_long net, mask;
register u_long i;
u_long i;
int n, subnetshift;
#ifdef NS
char *ns_print();
@ -586,7 +586,7 @@ set_metric(value, key)
void
newroute(argc, argv)
int argc;
register char **argv;
char **argv;
{
char *cmd, *dest = "", *gateway = "", *err;
int ishost = 0, proxy = 0, ret, attempts, oerrno, flags = RTF_STATIC;
@ -818,10 +818,10 @@ newroute(argc, argv)
void
inet_makenetandmask(net, sin, bits)
u_long net, bits;
register struct sockaddr_in *sin;
struct sockaddr_in *sin;
{
u_long addr, mask = 0;
register char *cp;
char *cp;
rtm_addrs |= RTA_NETMASK;
if (net == 0)
@ -869,7 +869,7 @@ getaddr(which, s, hpp)
char *s;
struct hostent **hpp;
{
register sup su;
sup su;
struct hostent *hp;
struct netent *np;
u_long val;
@ -1124,8 +1124,8 @@ ns_print(sns)
u_short port;
static char mybuf[50+MAXHOSTNAMELEN], cport[10], chost[25];
char *host = "";
register char *p;
register u_char *q;
char *p;
u_char *q;
work = sns->sns_addr;
port = ntohs(work.x_port);
@ -1168,7 +1168,7 @@ interfaces()
size_t needed;
int mib[6];
char *buf, *lim, *next;
register struct rt_msghdr *rtm;
struct rt_msghdr *rtm;
mib[0] = CTL_NET;
mib[1] = PF_ROUTE;
@ -1220,8 +1220,8 @@ rtmsg(cmd, flags)
{
static int seq;
int rlen;
register char *cp = m_rtmsg.m_space;
register int l;
char *cp = m_rtmsg.m_space;
int l;
#define NEXTADDR(w, u) \
if (rtm_addrs & (w)) {\
@ -1287,7 +1287,7 @@ void
mask_addr()
{
int olen = so_mask.sa.sa_len;
register char *cp1 = olen + (char *)&so_mask, *cp2;
char *cp1 = olen + (char *)&so_mask, *cp2;
for (so_mask.sa.sa_len = 0; cp1 > (char *)&so_mask; )
if (*--cp1 != 0) {
@ -1356,7 +1356,7 @@ char addrnames[] =
void
print_rtmsg(rtm, msglen)
register struct rt_msghdr *rtm;
struct rt_msghdr *rtm;
int msglen;
{
struct if_msghdr *ifm;
@ -1426,14 +1426,14 @@ print_rtmsg(rtm, msglen)
void
print_getmsg(rtm, msglen)
register struct rt_msghdr *rtm;
struct rt_msghdr *rtm;
int msglen;
{
struct sockaddr *dst = NULL, *gate = NULL, *mask = NULL;
struct sockaddr_dl *ifp = NULL;
register struct sockaddr *sa;
register char *cp;
register int i;
struct sockaddr *sa;
char *cp;
int i;
(void) printf(" route to: %s\n", routename(&so_dst));
if (rtm->rtm_version != RTM_VERSION) {
@ -1522,7 +1522,7 @@ print_getmsg(rtm, msglen)
void
pmsg_common(rtm)
register struct rt_msghdr *rtm;
struct rt_msghdr *rtm;
{
(void) printf("\nlocks: ");
bprintf(stdout, rtm->rtm_rmx.rmx_locks, metricnames);
@ -1536,7 +1536,7 @@ pmsg_addrs(cp, addrs)
char *cp;
int addrs;
{
register struct sockaddr *sa;
struct sockaddr *sa;
int i;
if (addrs == 0) {
@ -1558,11 +1558,11 @@ pmsg_addrs(cp, addrs)
void
bprintf(fp, b, s)
register FILE *fp;
register int b;
register u_char *s;
FILE *fp;
int b;
u_char *s;
{
register int i;
int i;
int gotsome = 0;
if (b == 0)
@ -1589,7 +1589,7 @@ int
keyword(cp)
char *cp;
{
register struct keytab *kt = keywords;
struct keytab *kt = keywords;
while (kt->kt_cp && strcmp(kt->kt_cp, cp))
kt++;
@ -1598,7 +1598,7 @@ keyword(cp)
void
sodump(su, which)
register sup su;
sup su;
char *which;
{
switch (su->sa.sa_family) {
@ -1635,13 +1635,13 @@ sodump(su, which)
void
sockaddr(addr, sa)
register char *addr;
register struct sockaddr *sa;
char *addr;
struct sockaddr *sa;
{
register char *cp = (char *)sa;
char *cp = (char *)sa;
int size = sa->sa_len;
char *cplim = cp + size;
register int byte = 0, state = VIRGIN, new = 0 /* foil gcc */;
int byte = 0, state = VIRGIN, new = 0 /* foil gcc */;
memset(cp, 0, size);
cp++;

View File

@ -367,8 +367,8 @@ char buf[1024 * 1024];
void
save_core()
{
register FILE *fp;
register int bounds, ifd, nr, nw;
FILE *fp;
int bounds, ifd, nr, nw;
int hs, he; /* start and end of hole */
char path[MAXPATHLEN];
mode_t oumask;
@ -518,7 +518,7 @@ err2: syslog(LOG_WARNING,
int
verify_dev(name, dev)
char *name;
register dev_t dev;
dev_t dev;
{
struct stat sb;
@ -538,7 +538,7 @@ verify_dev(name, dev)
*/
void
find_dev(dev)
register dev_t dev;
dev_t dev;
{
struct dirent *ent;
char *dn, *dnp;
@ -614,7 +614,7 @@ get_dumpsize()
int
check_space()
{
register FILE *fp;
FILE *fp;
const char *tkernel;
off_t minfree, spacefree, totfree, kernelsize, needed;
struct stat st;

View File

@ -513,7 +513,7 @@ getline(buf, size, fd, fintimeout)
int size, fd;
time_t fintimeout;
{
register int i;
int i;
int ret;
fd_set readfds;
struct timeval tv;

View File

@ -59,8 +59,8 @@ int add __P((char *name, int ignoreebusy));
int
main(int argc, char **argv)
{
register struct fstab *fsp;
register int stat;
struct fstab *fsp;
int stat;
int ch, doall;
doall = 0;

View File

@ -723,7 +723,7 @@ xdr_fhs(xdrsp, cp)
XDR *xdrsp;
caddr_t cp;
{
register struct fhreturn *fhrp = (struct fhreturn *)cp;
struct fhreturn *fhrp = (struct fhreturn *)cp;
u_long ok = 0, len, auth;
if (!xdr_long(xdrsp, &ok))