1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-06 13:09:50 +00:00

Ooops, forgot to remove the registers here.

This commit is contained in:
Warner Losh 2002-02-02 07:07:59 +00:00
parent 90e41fc40a
commit f789b2611b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90113
14 changed files with 318 additions and 318 deletions

View File

@ -417,7 +417,7 @@ ar_close(void)
void void
ar_drain(void) ar_drain(void)
{ {
register int res; int res;
char drbuf[MAXBLK]; char drbuf[MAXBLK];
/* /*
@ -509,9 +509,9 @@ ar_app_ok(void)
*/ */
int int
ar_read(register char *buf, register int cnt) ar_read(char *buf, int cnt)
{ {
register int res = 0; int res = 0;
/* /*
* if last i/o was in error, no more reads until reset or new volume * if last i/o was in error, no more reads until reset or new volume
@ -592,9 +592,9 @@ ar_read(register char *buf, register int cnt)
*/ */
int int
ar_write(register char *buf, register int bsz) ar_write(char *buf, int bsz)
{ {
register int res; int res;
off_t cpos; off_t cpos;
/* /*
@ -859,7 +859,7 @@ ar_rev(off_t sksz)
{ {
off_t cpos; off_t cpos;
struct mtop mb; struct mtop mb;
register int phyblk; int phyblk;
/* /*
* make sure we do not have try to reverse on a flawed archive * make sure we do not have try to reverse on a flawed archive
@ -989,9 +989,9 @@ ar_rev(off_t sksz)
static int static int
get_phys(void) get_phys(void)
{ {
register int padsz = 0; int padsz = 0;
register int res; int res;
register int phyblk; int phyblk;
struct mtop mb; struct mtop mb;
char scbuf[MAXBLK]; char scbuf[MAXBLK];

View File

@ -56,9 +56,9 @@ static const char rcsid[] =
#include "pax.h" #include "pax.h"
#include "extern.h" #include "extern.h"
static void wr_archive(register ARCHD *, int is_app); static void wr_archive(ARCHD *, int is_app);
static int get_arc(void); static int get_arc(void);
static int next_head(register ARCHD *); static int next_head(ARCHD *);
extern sigset_t s_mask; extern sigset_t s_mask;
/* /*
@ -78,8 +78,8 @@ u_long flcnt; /* number of files processed */
void void
list(void) list(void)
{ {
register ARCHD *arcn; ARCHD *arcn;
register int res; int res;
ARCHD archd; ARCHD archd;
time_t now; time_t now;
@ -155,8 +155,8 @@ list(void)
void void
extract(void) extract(void)
{ {
register ARCHD *arcn; ARCHD *arcn;
register int res; int res;
off_t cnt; off_t cnt;
ARCHD archd; ARCHD archd;
struct stat sb; struct stat sb;
@ -359,11 +359,11 @@ extract(void)
*/ */
static void static void
wr_archive(register ARCHD *arcn, int is_app) wr_archive(ARCHD *arcn, int is_app)
{ {
register int res; int res;
register int hlk; int hlk;
register int wr_one; int wr_one;
off_t cnt; off_t cnt;
int (*wrf)(); int (*wrf)();
int fd = -1; int fd = -1;
@ -564,8 +564,8 @@ wr_archive(register ARCHD *arcn, int is_app)
void void
append(void) append(void)
{ {
register ARCHD *arcn; ARCHD *arcn;
register int res; int res;
ARCHD archd; ARCHD archd;
FSUB *orgfrmt; FSUB *orgfrmt;
int udev; int udev;
@ -726,12 +726,12 @@ archive(void)
void void
copy(void) copy(void)
{ {
register ARCHD *arcn; ARCHD *arcn;
register int res; int res;
register int fddest; int fddest;
register char *dest_pt; char *dest_pt;
register int dlen; int dlen;
register int drem; int drem;
int fdsrc = -1; int fdsrc = -1;
struct stat sb; struct stat sb;
ARCHD archd; ARCHD archd;
@ -971,14 +971,14 @@ copy(void)
*/ */
static int static int
next_head(register ARCHD *arcn) next_head(ARCHD *arcn)
{ {
register int ret; int ret;
register char *hdend; char *hdend;
register int res; int res;
register int shftsz; int shftsz;
register int hsz; int hsz;
register int in_resync = 0; /* set when we are in resync mode */ int in_resync = 0; /* set when we are in resync mode */
int cnt = 0; /* counter for trailer function */ int cnt = 0; /* counter for trailer function */
int first = 1; /* on 1st read, EOF isn't premature. */ int first = 1; /* on 1st read, EOF isn't premature. */
@ -1125,10 +1125,10 @@ next_head(register ARCHD *arcn)
static int static int
get_arc(void) get_arc(void)
{ {
register int i; int i;
register int hdsz = 0; int hdsz = 0;
register int res; int res;
register int minhd = BLKMULT; int minhd = BLKMULT;
char *hdend; char *hdend;
int notice = 0; int notice = 0;

View File

@ -212,7 +212,7 @@ cp_start(void)
int int
appnd_start(off_t skcnt) appnd_start(off_t skcnt)
{ {
register int res; int res;
off_t cnt; off_t cnt;
if (exit_val != 0) { if (exit_val != 0) {
@ -311,8 +311,8 @@ appnd_start(off_t skcnt)
int int
rd_sync(void) rd_sync(void)
{ {
register int errcnt = 0; int errcnt = 0;
register int res; int res;
/* /*
* if the user says bail out on first fault, we are out of here... * if the user says bail out on first fault, we are out of here...
@ -483,9 +483,9 @@ wr_fin(void)
*/ */
int int
wr_rdbuf(register char *out, register int outcnt) wr_rdbuf(char *out, int outcnt)
{ {
register int cnt; int cnt;
/* /*
* while there is data to copy copy into the write buffer. when the * while there is data to copy copy into the write buffer. when the
@ -519,11 +519,11 @@ wr_rdbuf(register char *out, register int outcnt)
*/ */
int int
rd_wrbuf(register char *in, register int cpcnt) rd_wrbuf(char *in, int cpcnt)
{ {
register int res; int res;
register int cnt; int cnt;
register int incnt = cpcnt; int incnt = cpcnt;
/* /*
* loop until we fill the buffer with the requested number of bytes * loop until we fill the buffer with the requested number of bytes
@ -569,7 +569,7 @@ rd_wrbuf(register char *in, register int cpcnt)
int int
wr_skip(off_t skcnt) wr_skip(off_t skcnt)
{ {
register int cnt; int cnt;
/* /*
* loop while there is more padding to add * loop while there is more padding to add
@ -607,9 +607,9 @@ wr_skip(off_t skcnt)
int int
wr_rdfile(ARCHD *arcn, int ifd, off_t *left) wr_rdfile(ARCHD *arcn, int ifd, off_t *left)
{ {
register int cnt; int cnt;
register int res = 0; int res = 0;
register off_t size = arcn->sb.st_size; off_t size = arcn->sb.st_size;
struct stat sb; struct stat sb;
/* /*
@ -668,10 +668,10 @@ wr_rdfile(ARCHD *arcn, int ifd, off_t *left)
int int
rd_wrfile(ARCHD *arcn, int ofd, off_t *left) rd_wrfile(ARCHD *arcn, int ofd, off_t *left)
{ {
register int cnt = 0; int cnt = 0;
register off_t size = arcn->sb.st_size; off_t size = arcn->sb.st_size;
register int res = 0; int res = 0;
register char *fnm = arcn->name; char *fnm = arcn->name;
int isem = 1; int isem = 1;
int rem; int rem;
int sz = MINFBSZ; int sz = MINFBSZ;
@ -756,11 +756,11 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *left)
void void
cp_file(ARCHD *arcn, int fd1, int fd2) cp_file(ARCHD *arcn, int fd1, int fd2)
{ {
register int cnt; int cnt;
register off_t cpcnt = 0L; off_t cpcnt = 0L;
register int res = 0; int res = 0;
register char *fnm = arcn->name; char *fnm = arcn->name;
register int no_hole = 0; int no_hole = 0;
int isem = 1; int isem = 1;
int rem; int rem;
int sz = MINFBSZ; int sz = MINFBSZ;
@ -837,7 +837,7 @@ cp_file(ARCHD *arcn, int fd1, int fd2)
int int
buf_fill(void) buf_fill(void)
{ {
register int cnt; int cnt;
static int fini = 0; static int fini = 0;
if (fini) if (fini)
@ -880,11 +880,11 @@ buf_fill(void)
*/ */
int int
buf_flush(register int bufcnt) buf_flush(int bufcnt)
{ {
register int cnt; int cnt;
register int push = 0; int push = 0;
register int totcnt = 0; int totcnt = 0;
/* /*
* if we have reached the user specified byte count for each archive * if we have reached the user specified byte count for each archive

View File

@ -176,8 +176,8 @@ grptb_start(void)
char * char *
name_uid(uid_t uid, int frc) name_uid(uid_t uid, int frc)
{ {
register struct passwd *pw; struct passwd *pw;
register UIDC *ptr; UIDC *ptr;
if ((uidtb == NULL) && (uidtb_start() < 0)) if ((uidtb == NULL) && (uidtb_start() < 0))
return(""); return("");
@ -247,8 +247,8 @@ name_uid(uid_t uid, int frc)
char * char *
name_gid(gid_t gid, int frc) name_gid(gid_t gid, int frc)
{ {
register struct group *gr; struct group *gr;
register GIDC *ptr; GIDC *ptr;
if ((gidtb == NULL) && (gidtb_start() < 0)) if ((gidtb == NULL) && (gidtb_start() < 0))
return(""); return("");
@ -317,9 +317,9 @@ name_gid(gid_t gid, int frc)
int int
uid_name(char *name, uid_t *uid) uid_name(char *name, uid_t *uid)
{ {
register struct passwd *pw; struct passwd *pw;
register UIDC *ptr; UIDC *ptr;
register int namelen; int namelen;
/* /*
* return -1 for mangled names * return -1 for mangled names
@ -381,9 +381,9 @@ uid_name(char *name, uid_t *uid)
int int
gid_name(char *name, gid_t *gid) gid_name(char *name, gid_t *gid)
{ {
register struct group *gr; struct group *gr;
register GIDC *ptr; GIDC *ptr;
register int namelen; int namelen;
/* /*
* return -1 for mangled names * return -1 for mangled names

View File

@ -54,9 +54,9 @@ static const char rcsid[] =
#include "cpio.h" #include "cpio.h"
#include "extern.h" #include "extern.h"
static int rd_nm(register ARCHD *, int); static int rd_nm(ARCHD *, int);
static int rd_ln_nm(register ARCHD *); static int rd_ln_nm(ARCHD *);
static int com_rd(register ARCHD *); static int com_rd(ARCHD *);
/* /*
* Routines which support the different cpio versions * Routines which support the different cpio versions
@ -92,7 +92,7 @@ cpio_strd(void)
*/ */
int int
cpio_trail(register ARCHD *arcn) cpio_trail(ARCHD *arcn)
{ {
/* /*
* look for trailer id in file we are about to process * look for trailer id in file we are about to process
@ -110,7 +110,7 @@ cpio_trail(register ARCHD *arcn)
*/ */
static int static int
com_rd(register ARCHD *arcn) com_rd(ARCHD *arcn)
{ {
arcn->skip = 0; arcn->skip = 0;
arcn->pat = NULL; arcn->pat = NULL;
@ -182,7 +182,7 @@ cpio_endwr(void)
*/ */
static int static int
rd_nm(register ARCHD *arcn, int nsz) rd_nm(ARCHD *arcn, int nsz)
{ {
/* /*
* do not even try bogus values * do not even try bogus values
@ -212,7 +212,7 @@ rd_nm(register ARCHD *arcn, int nsz)
*/ */
static int static int
rd_ln_nm(register ARCHD *arcn) rd_ln_nm(ARCHD *arcn)
{ {
/* /*
* check the length specified for bogus values * check the length specified for bogus values
@ -280,10 +280,10 @@ cpio_id(char *blk, int size)
*/ */
int int
cpio_rd(register ARCHD *arcn, register char *buf) cpio_rd(ARCHD *arcn, char *buf)
{ {
register int nsz; int nsz;
register HD_CPIO *hd; HD_CPIO *hd;
/* /*
* check that this is a valid header, if not return -1 * check that this is a valid header, if not return -1
@ -389,10 +389,10 @@ cpio_stwr(void)
*/ */
int int
cpio_wr(register ARCHD *arcn) cpio_wr(ARCHD *arcn)
{ {
register HD_CPIO *hd; HD_CPIO *hd;
register int nsz; int nsz;
char hdblk[sizeof(HD_CPIO)]; char hdblk[sizeof(HD_CPIO)];
/* /*
@ -567,12 +567,12 @@ crc_strd(void)
*/ */
int int
vcpio_rd(register ARCHD *arcn, register char *buf) vcpio_rd(ARCHD *arcn, char *buf)
{ {
register HD_VCPIO *hd; HD_VCPIO *hd;
dev_t devminor; dev_t devminor;
dev_t devmajor; dev_t devmajor;
register int nsz; int nsz;
/* /*
* during the id phase it was determined if we were using CRC, use the * during the id phase it was determined if we were using CRC, use the
@ -700,9 +700,9 @@ crc_stwr(void)
*/ */
int int
vcpio_wr(register ARCHD *arcn) vcpio_wr(ARCHD *arcn)
{ {
register HD_VCPIO *hd; HD_VCPIO *hd;
unsigned int nsz; unsigned int nsz;
char hdblk[sizeof(HD_VCPIO)]; char hdblk[sizeof(HD_VCPIO)];
@ -885,10 +885,10 @@ bcpio_id(char *blk, int size)
*/ */
int int
bcpio_rd(register ARCHD *arcn, register char *buf) bcpio_rd(ARCHD *arcn, char *buf)
{ {
register HD_BCPIO *hd; HD_BCPIO *hd;
register int nsz; int nsz;
/* /*
* check the header * check the header
@ -1000,10 +1000,10 @@ bcpio_endrd(void)
*/ */
int int
bcpio_wr(register ARCHD *arcn) bcpio_wr(ARCHD *arcn)
{ {
register HD_BCPIO *hd; HD_BCPIO *hd;
register int nsz; int nsz;
char hdblk[sizeof(HD_BCPIO)]; char hdblk[sizeof(HD_BCPIO)];
off_t t_offt; off_t t_offt;
int t_int; int t_int;

View File

@ -58,7 +58,7 @@ static const char rcsid[] =
#include "extern.h" #include "extern.h"
static int static int
mk_link(register char *,register struct stat *,register char *, int); mk_link(char *,struct stat *,char *, int);
/* /*
* routines that deal with file operations such as: creating, removing; * routines that deal with file operations such as: creating, removing;
@ -77,7 +77,7 @@ mk_link(register char *,register struct stat *,register char *, int);
*/ */
int int
file_creat(register ARCHD *arcn) file_creat(ARCHD *arcn)
{ {
int fd = -1; int fd = -1;
mode_t file_mode; mode_t file_mode;
@ -134,7 +134,7 @@ file_creat(register ARCHD *arcn)
*/ */
void void
file_close(register ARCHD *arcn, int fd) file_close(ARCHD *arcn, int fd)
{ {
int res = 0; int res = 0;
@ -174,7 +174,7 @@ file_close(register ARCHD *arcn, int fd)
*/ */
int int
lnk_creat(register ARCHD *arcn) lnk_creat(ARCHD *arcn)
{ {
struct stat sb; struct stat sb;
@ -208,7 +208,7 @@ lnk_creat(register ARCHD *arcn)
*/ */
int int
cross_lnk(register ARCHD *arcn) cross_lnk(ARCHD *arcn)
{ {
/* /*
* try to make a link to original file (-l flag in copy mode). make sure * try to make a link to original file (-l flag in copy mode). make sure
@ -232,7 +232,7 @@ cross_lnk(register ARCHD *arcn)
*/ */
int int
chk_same(register ARCHD *arcn) chk_same(ARCHD *arcn)
{ {
struct stat sb; struct stat sb;
@ -269,7 +269,7 @@ chk_same(register ARCHD *arcn)
*/ */
static int static int
mk_link(register char *to, register struct stat *to_sb, register char *from, mk_link(char *to, struct stat *to_sb, char *from,
int ign) int ign)
{ {
struct stat sb; struct stat sb;
@ -342,12 +342,12 @@ mk_link(register char *to, register struct stat *to_sb, register char *from,
*/ */
int int
node_creat(register ARCHD *arcn) node_creat(ARCHD *arcn)
{ {
register int res; int res;
register int ign = 0; int ign = 0;
register int oerrno; int oerrno;
register int pass = 0; int pass = 0;
mode_t file_mode; mode_t file_mode;
struct stat sb; struct stat sb;
@ -506,7 +506,7 @@ node_creat(register ARCHD *arcn)
*/ */
int int
unlnk_exist(register char *name, register int type) unlnk_exist(char *name, int type)
{ {
struct stat sb; struct stat sb;
@ -557,9 +557,9 @@ unlnk_exist(register char *name, register int type)
*/ */
int int
chk_path( register char *name, uid_t st_uid, gid_t st_gid) chk_path( char *name, uid_t st_uid, gid_t st_gid)
{ {
register char *spt = name; char *spt = name;
struct stat sb; struct stat sb;
int retval = -1; int retval = -1;
@ -782,13 +782,13 @@ set_pmode(char *fnm, mode_t mode)
*/ */
int int
file_write(int fd, char *str, register int cnt, int *rem, int *isempt, int sz, file_write(int fd, char *str, int cnt, int *rem, int *isempt, int sz,
char *name) char *name)
{ {
register char *pt; char *pt;
register char *end; char *end;
register int wcnt; int wcnt;
register char *st = str; char *st = str;
/* /*
* while we have data to process * while we have data to process
@ -894,7 +894,7 @@ file_flush(int fd, char *fname, int isempt)
*/ */
void void
rdfile_close(register ARCHD *arcn, register int *fd) rdfile_close(ARCHD *arcn, int *fd)
{ {
/* /*
* make sure the file is open * make sure the file is open
@ -924,10 +924,10 @@ rdfile_close(register ARCHD *arcn, register int *fd)
*/ */
int int
set_crc(register ARCHD *arcn, register int fd) set_crc(ARCHD *arcn, int fd)
{ {
register int i; int i;
register int res; int res;
off_t cpcnt = 0L; off_t cpcnt = 0L;
u_long size; u_long size;
unsigned long crc = 0L; unsigned long crc = 0L;

View File

@ -146,10 +146,10 @@ ftree_start(void)
*/ */
int int
ftree_add(register char *str, int chflg) ftree_add(char *str, int chflg)
{ {
register FTREE *ft; FTREE *ft;
register int len; int len;
/* /*
* simple check for bad args * simple check for bad args
@ -191,7 +191,7 @@ ftree_add(register char *str, int chflg)
*/ */
void void
ftree_sel(register ARCHD *arcn) ftree_sel(ARCHD *arcn)
{ {
/* /*
* set reference bit for this pattern. This linked list is only used * set reference bit for this pattern. This linked list is only used
@ -226,8 +226,8 @@ ftree_sel(register ARCHD *arcn)
void void
ftree_chk(void) ftree_chk(void)
{ {
register FTREE *ft; FTREE *ft;
register int wban = 0; int wban = 0;
/* /*
* make sure all dir access times were reset. * make sure all dir access times were reset.
@ -263,7 +263,7 @@ ftree_chk(void)
static int static int
ftree_arg(void) ftree_arg(void)
{ {
register char *pt; char *pt;
/* /*
* close off the current file tree * close off the current file tree
@ -335,9 +335,9 @@ ftree_arg(void)
*/ */
int int
next_file(register ARCHD *arcn) next_file(ARCHD *arcn)
{ {
register int cnt; int cnt;
time_t atime; time_t atime;
time_t mtime; time_t mtime;

View File

@ -82,9 +82,9 @@ static int d_first = -1;
*/ */
void void
ls_list(register ARCHD *arcn, time_t now, FILE *fp) ls_list(ARCHD *arcn, time_t now, FILE *fp)
{ {
register struct stat *sbp; struct stat *sbp;
char f_mode[MODELEN]; char f_mode[MODELEN];
char f_date[DATELEN]; char f_date[DATELEN];
char *timefrmt; char *timefrmt;
@ -162,7 +162,7 @@ ls_list(register ARCHD *arcn, time_t now, FILE *fp)
*/ */
void void
ls_tty(register ARCHD *arcn) ls_tty(ARCHD *arcn)
{ {
char f_date[DATELEN]; char f_date[DATELEN];
char f_mode[MODELEN]; char f_mode[MODELEN];
@ -197,10 +197,10 @@ ls_tty(register ARCHD *arcn)
*/ */
int int
l_strncpy(register char *dest, register char *src, int len) l_strncpy(char *dest, char *src, int len)
{ {
register char *stop; char *stop;
register char *start; char *start;
stop = dest + len; stop = dest + len;
start = dest; start = dest;
@ -223,9 +223,9 @@ l_strncpy(register char *dest, register char *src, int len)
*/ */
u_long u_long
asc_ul(register char *str, int len, register int base) asc_ul(char *str, int len, int base)
{ {
register char *stop; char *stop;
u_long tval = 0; u_long tval = 0;
stop = str + len; stop = str + len;
@ -266,9 +266,9 @@ asc_ul(register char *str, int len, register int base)
*/ */
int int
ul_asc(u_long val, register char *str, register int len, register int base) ul_asc(u_long val, char *str, int len, int base)
{ {
register char *pt; char *pt;
u_long digit; u_long digit;
/* /*
@ -320,9 +320,9 @@ ul_asc(u_long val, register char *str, register int len, register int base)
*/ */
u_quad_t u_quad_t
asc_uqd(register char *str, int len, register int base) asc_uqd(char *str, int len, int base)
{ {
register char *stop; char *stop;
u_quad_t tval = 0; u_quad_t tval = 0;
stop = str + len; stop = str + len;
@ -363,9 +363,9 @@ asc_uqd(register char *str, int len, register int base)
*/ */
int int
uqd_asc(u_quad_t val, register char *str, register int len, register int base) uqd_asc(u_quad_t val, char *str, int len, int base)
{ {
register char *pt; char *pt;
u_quad_t digit; u_quad_t digit;
/* /*

View File

@ -72,11 +72,11 @@ static void printflg(unsigned int);
static int c_frmt(const void *, const void *); static int c_frmt(const void *, const void *);
static off_t str_offt(char *); static off_t str_offt(char *);
static char *getline(FILE *fp); static char *getline(FILE *fp);
static void pax_options(register int, register char **); static void pax_options(int, char **);
static void pax_usage(void); static void pax_usage(void);
static void tar_options(register int, register char **); static void tar_options(int, char **);
static void tar_usage(void); static void tar_usage(void);
static void cpio_options(register int, register char **); static void cpio_options(int, char **);
static void cpio_usage(void); static void cpio_usage(void);
/* errors from getline */ /* errors from getline */
@ -150,7 +150,7 @@ int ford[] = {5, 4, 3, 2, 1, 0, -1 };
*/ */
void void
options(register int argc, register char **argv) options(int argc, char **argv)
{ {
/* /*
@ -179,13 +179,13 @@ options(register int argc, register char **argv)
*/ */
static void static void
pax_options(register int argc, register char **argv) pax_options(int argc, char **argv)
{ {
register int c; int c;
register int i; int i;
unsigned int flg = 0; unsigned int flg = 0;
unsigned int bflg = 0; unsigned int bflg = 0;
register char *pt; char *pt;
FSUB tmp; FSUB tmp;
/* /*
@ -577,9 +577,9 @@ pax_options(register int argc, register char **argv)
*/ */
static void static void
tar_options(register int argc, register char **argv) tar_options(int argc, char **argv)
{ {
register int c; int c;
int fstdin = 0; int fstdin = 0;
int Oflag = 0; int Oflag = 0;
int nincfiles = 0; int nincfiles = 0;
@ -974,7 +974,7 @@ mkpath(path)
char *path; char *path;
{ {
struct stat sb; struct stat sb;
register char *slash; char *slash;
int done = 0; int done = 0;
slash = path; slash = path;
@ -1009,9 +1009,9 @@ mkpath(path)
*/ */
static void static void
cpio_options(register int argc, register char **argv) cpio_options(int argc, char **argv)
{ {
register int c, i; int c, i;
char *str; char *str;
FSUB tmp; FSUB tmp;
FILE *fp; FILE *fp;
@ -1322,7 +1322,7 @@ opt_next(void)
int int
bad_opt(void) bad_opt(void)
{ {
register OPLIST *opt; OPLIST *opt;
if (ophead == NULL) if (ophead == NULL)
return(0); return(0);
@ -1346,12 +1346,12 @@ bad_opt(void)
*/ */
int int
opt_add(register char *str) opt_add(char *str)
{ {
register OPLIST *opt; OPLIST *opt;
register char *frpt; char *frpt;
register char *pt; char *pt;
register char *endpt; char *endpt;
if ((str == NULL) || (*str == '\0')) { if ((str == NULL) || (*str == '\0')) {
paxwarn(0, "Invalid option name"); paxwarn(0, "Invalid option name");

View File

@ -73,12 +73,12 @@ static REPLACE *rephead = NULL; /* replacement string list head */
static REPLACE *reptail = NULL; /* replacement string list tail */ static REPLACE *reptail = NULL; /* replacement string list tail */
static int rep_name(char *, int *, int); static int rep_name(char *, int *, int);
static int tty_rename(register ARCHD *); static int tty_rename(ARCHD *);
static int fix_path(char *, int *, char *, int); static int fix_path(char *, int *, char *, int);
static int fn_match(register char *, register char *, char **); static int fn_match(char *, char *, char **);
static char * range_match(register char *, register int); static char * range_match(char *, int);
#ifdef NET2_REGEX #ifdef NET2_REGEX
static int resub(regexp *, char *, char *, register char *); static int resub(regexp *, char *, char *, char *);
#else #else
static int resub(regex_t *, regmatch_t *, char *, char *, char *); static int resub(regex_t *, regmatch_t *, char *, char *, char *);
#endif #endif
@ -100,13 +100,13 @@ static int resub(regex_t *, regmatch_t *, char *, char *, char *);
*/ */
int int
rep_add(register char *str) rep_add(char *str)
{ {
register char *pt1; char *pt1;
register char *pt2; char *pt2;
register REPLACE *rep; REPLACE *rep;
# ifndef NET2_REGEX # ifndef NET2_REGEX
register int res; int res;
char rebuf[BUFSIZ]; char rebuf[BUFSIZ];
# endif # endif
@ -224,7 +224,7 @@ rep_add(register char *str)
int int
pat_add(char *str, char *chdname) pat_add(char *str, char *chdname)
{ {
register PATTERN *pt; PATTERN *pt;
/* /*
* throw out the junk * throw out the junk
@ -269,8 +269,8 @@ pat_add(char *str, char *chdname)
void void
pat_chk(void) pat_chk(void)
{ {
register PATTERN *pt; PATTERN *pt;
register int wban = 0; int wban = 0;
/* /*
* walk down the list checking the flags to make sure MTCH was set, * walk down the list checking the flags to make sure MTCH was set,
@ -304,11 +304,11 @@ pat_chk(void)
*/ */
int int
pat_sel(register ARCHD *arcn) pat_sel(ARCHD *arcn)
{ {
register PATTERN *pt; PATTERN *pt;
register PATTERN **ppt; PATTERN **ppt;
register int len; int len;
/* /*
* if no patterns just return * if no patterns just return
@ -423,9 +423,9 @@ pat_sel(register ARCHD *arcn)
*/ */
int int
pat_match(register ARCHD *arcn) pat_match(ARCHD *arcn)
{ {
register PATTERN *pt; PATTERN *pt;
arcn->pat = NULL; arcn->pat = NULL;
@ -495,9 +495,9 @@ pat_match(register ARCHD *arcn)
*/ */
static int static int
fn_match(register char *pattern, register char *string, char **pend) fn_match(char *pattern, char *string, char **pend)
{ {
register char c; char c;
char test; char test;
*pend = NULL; *pend = NULL;
@ -568,10 +568,10 @@ fn_match(register char *pattern, register char *string, char **pend)
} }
static char * static char *
range_match(register char *pattern, register int test) range_match(char *pattern, int test)
{ {
register char c; char c;
register char c2; char c2;
int negate; int negate;
int ok = 0; int ok = 0;
@ -611,9 +611,9 @@ range_match(register char *pattern, register int test)
*/ */
int int
mod_name(register ARCHD *arcn) mod_name(ARCHD *arcn)
{ {
register int res = 0; int res = 0;
/* /*
* Strip off leading '/' if appropriate. * Strip off leading '/' if appropriate.
@ -704,7 +704,7 @@ mod_name(register ARCHD *arcn)
*/ */
static int static int
tty_rename(register ARCHD *arcn) tty_rename(ARCHD *arcn)
{ {
char tmpname[PAXPATHLEN+2]; char tmpname[PAXPATHLEN+2];
int res; int res;
@ -770,7 +770,7 @@ tty_rename(register ARCHD *arcn)
*/ */
int int
set_dest(register ARCHD *arcn, char *dest_dir, int dir_len) set_dest(ARCHD *arcn, char *dest_dir, int dir_len)
{ {
if (fix_path(arcn->name, &(arcn->nlen), dest_dir, dir_len) < 0) if (fix_path(arcn->name, &(arcn->nlen), dest_dir, dir_len) < 0)
return(-1); return(-1);
@ -799,9 +799,9 @@ set_dest(register ARCHD *arcn, char *dest_dir, int dir_len)
static int static int
fix_path( char *or_name, int *or_len, char *dir_name, int dir_len) fix_path( char *or_name, int *or_len, char *dir_name, int dir_len)
{ {
register char *src; char *src;
register char *dest; char *dest;
register char *start; char *start;
int len; int len;
/* /*
@ -862,13 +862,13 @@ fix_path( char *or_name, int *or_len, char *dir_name, int dir_len)
static int static int
rep_name(char *name, int *nlen, int prnt) rep_name(char *name, int *nlen, int prnt)
{ {
register REPLACE *pt; REPLACE *pt;
register char *inpt; char *inpt;
register char *outpt; char *outpt;
register char *endpt; char *endpt;
register char *rpt; char *rpt;
register int found = 0; int found = 0;
register int res; int res;
# ifndef NET2_REGEX # ifndef NET2_REGEX
regmatch_t pm[MAXSUBEXP]; regmatch_t pm[MAXSUBEXP];
# endif # endif
@ -1026,13 +1026,13 @@ rep_name(char *name, int *nlen, int prnt)
*/ */
static int static int
resub(regexp *prog, char *src, char *dest, register char *destend) resub(regexp *prog, char *src, char *dest, char *destend)
{ {
register char *spt; char *spt;
register char *dpt; char *dpt;
register char c; char c;
register int no; int no;
register int len; int len;
spt = src; spt = src;
dpt = dest; dpt = dest;
@ -1075,14 +1075,14 @@ resub(regexp *prog, char *src, char *dest, register char *destend)
*/ */
static int static int
resub(regex_t *rp, register regmatch_t *pm, char *src, char *dest, resub(regex_t *rp, regmatch_t *pm, char *src, char *dest,
register char *destend) char *destend)
{ {
register char *spt; char *spt;
register char *dpt; char *dpt;
register char c; char c;
register regmatch_t *pmpt; regmatch_t *pmpt;
register int len; int len;
int subexcnt; int subexcnt;
spt = src; spt = src;

View File

@ -57,10 +57,10 @@ static const char rcsid[] =
#include "sel_subs.h" #include "sel_subs.h"
#include "extern.h" #include "extern.h"
static int str_sec(register char *, time_t *); static int str_sec(char *, time_t *);
static int usr_match(register ARCHD *); static int usr_match(ARCHD *);
static int grp_match(register ARCHD *); static int grp_match(ARCHD *);
static int trng_match(register ARCHD *); static int trng_match(ARCHD *);
static TIME_RNG *trhead = NULL; /* time range list head */ static TIME_RNG *trhead = NULL; /* time range list head */
static TIME_RNG *trtail = NULL; /* time range list tail */ static TIME_RNG *trtail = NULL; /* time range list tail */
@ -79,7 +79,7 @@ static GRPT **grptb = NULL; /* group selection table */
*/ */
int int
sel_chk(register ARCHD *arcn) sel_chk(ARCHD *arcn)
{ {
if (((usrtb != NULL) && usr_match(arcn)) || if (((usrtb != NULL) && usr_match(arcn)) ||
((grptb != NULL) && grp_match(arcn)) || ((grptb != NULL) && grp_match(arcn)) ||
@ -104,12 +104,12 @@ sel_chk(register ARCHD *arcn)
*/ */
int int
usr_add(register char *str) usr_add(char *str)
{ {
register u_int indx; u_int indx;
register USRT *pt; USRT *pt;
register struct passwd *pw; struct passwd *pw;
register uid_t uid; uid_t uid;
/* /*
* create the table if it doesn't exist * create the table if it doesn't exist
@ -177,9 +177,9 @@ usr_add(register char *str)
*/ */
static int static int
usr_match(register ARCHD *arcn) usr_match(ARCHD *arcn)
{ {
register USRT *pt; USRT *pt;
/* /*
* hash and look for it in the table * hash and look for it in the table
@ -205,12 +205,12 @@ usr_match(register ARCHD *arcn)
*/ */
int int
grp_add(register char *str) grp_add(char *str)
{ {
register u_int indx; u_int indx;
register GRPT *pt; GRPT *pt;
register struct group *gr; struct group *gr;
register gid_t gid; gid_t gid;
/* /*
* create the table if it doesn't exist * create the table if it doesn't exist
@ -278,9 +278,9 @@ grp_add(register char *str)
*/ */
static int static int
grp_match(register ARCHD *arcn) grp_match(ARCHD *arcn)
{ {
register GRPT *pt; GRPT *pt;
/* /*
* hash and look for it in the table * hash and look for it in the table
@ -328,13 +328,13 @@ grp_match(register ARCHD *arcn)
*/ */
int int
trng_add(register char *str) trng_add(char *str)
{ {
register TIME_RNG *pt; TIME_RNG *pt;
register char *up_pt = NULL; char *up_pt = NULL;
register char *stpt; char *stpt;
register char *flgpt; char *flgpt;
register int dot = 0; int dot = 0;
/* /*
* throw out the badly formed time ranges * throw out the badly formed time ranges
@ -468,9 +468,9 @@ trng_add(register char *str)
*/ */
static int static int
trng_match(register ARCHD *arcn) trng_match(ARCHD *arcn)
{ {
register TIME_RNG *pt; TIME_RNG *pt;
/* /*
* have to search down the list one at a time looking for a match. * have to search down the list one at a time looking for a match.
@ -537,10 +537,10 @@ trng_match(register ARCHD *arcn)
*/ */
static int static int
str_sec(register char *str, time_t *tval) str_sec(char *str, time_t *tval)
{ {
register struct tm *lt; struct tm *lt;
register char *dot = NULL; char *dot = NULL;
lt = localtime(tval); lt = localtime(tval);
if ((dot = strchr(str, '.')) != NULL) { if ((dot = strchr(str, '.')) != NULL) {

View File

@ -130,11 +130,11 @@ lnk_start(void)
*/ */
int int
chk_lnk(register ARCHD *arcn) chk_lnk(ARCHD *arcn)
{ {
register HRDLNK *pt; HRDLNK *pt;
register HRDLNK **ppt; HRDLNK **ppt;
register u_int indx; u_int indx;
if (ltab == NULL) if (ltab == NULL)
return(-1); return(-1);
@ -217,11 +217,11 @@ chk_lnk(register ARCHD *arcn)
*/ */
void void
purg_lnk(register ARCHD *arcn) purg_lnk(ARCHD *arcn)
{ {
register HRDLNK *pt; HRDLNK *pt;
register HRDLNK **ppt; HRDLNK **ppt;
register u_int indx; u_int indx;
if (ltab == NULL) if (ltab == NULL)
return; return;
@ -273,9 +273,9 @@ purg_lnk(register ARCHD *arcn)
void void
lnk_end(void) lnk_end(void)
{ {
register int i; int i;
register HRDLNK *pt; HRDLNK *pt;
register HRDLNK *ppt; HRDLNK *ppt;
if (ltab == NULL) if (ltab == NULL)
return; return;
@ -369,11 +369,11 @@ ftime_start(void)
*/ */
int int
chk_ftime(register ARCHD *arcn) chk_ftime(ARCHD *arcn)
{ {
register FTM *pt; FTM *pt;
register int namelen; int namelen;
register u_int indx; u_int indx;
char ckname[PAXPATHLEN+1]; char ckname[PAXPATHLEN+1];
/* /*
@ -509,10 +509,10 @@ name_start(void)
*/ */
int int
add_name(register char *oname, int onamelen, char *nname) add_name(char *oname, int onamelen, char *nname)
{ {
register NAMT *pt; NAMT *pt;
register u_int indx; u_int indx;
if (ntab == NULL) { if (ntab == NULL) {
/* /*
@ -577,10 +577,10 @@ add_name(register char *oname, int onamelen, char *nname)
*/ */
void void
sub_name(register char *oname, int *onamelen, size_t onamesize) sub_name(char *oname, int *onamelen, size_t onamesize)
{ {
register NAMT *pt; NAMT *pt;
register u_int indx; u_int indx;
if (ntab == NULL) if (ntab == NULL)
return; return;
@ -683,7 +683,7 @@ dev_start(void)
*/ */
int int
add_dev(register ARCHD *arcn) add_dev(ARCHD *arcn)
{ {
if (chk_dev(arcn->sb.st_dev, 1) == NULL) if (chk_dev(arcn->sb.st_dev, 1) == NULL)
return(-1); return(-1);
@ -706,8 +706,8 @@ add_dev(register ARCHD *arcn)
static DEVT * static DEVT *
chk_dev(dev_t dev, int add) chk_dev(dev_t dev, int add)
{ {
register DEVT *pt; DEVT *pt;
register u_int indx; u_int indx;
if (dtab == NULL) if (dtab == NULL)
return(NULL); return(NULL);
@ -762,10 +762,10 @@ chk_dev(dev_t dev, int add)
*/ */
int int
map_dev(register ARCHD *arcn, u_long dev_mask, u_long ino_mask) map_dev(ARCHD *arcn, u_long dev_mask, u_long ino_mask)
{ {
register DEVT *pt; DEVT *pt;
register DLIST *dpt; DLIST *dpt;
static dev_t lastdev = 0; /* next device number to try */ static dev_t lastdev = 0; /* next device number to try */
int trc_ino = 0; int trc_ino = 0;
int trc_dev = 0; int trc_dev = 0;
@ -926,8 +926,8 @@ atdir_start(void)
void void
atdir_end(void) atdir_end(void)
{ {
register ATDIR *pt; ATDIR *pt;
register int i; int i;
if (atab == NULL) if (atab == NULL)
return; return;
@ -957,8 +957,8 @@ atdir_end(void)
void void
add_atdir(char *fname, dev_t dev, ino_t ino, time_t mtime, time_t atime) add_atdir(char *fname, dev_t dev, ino_t ino, time_t mtime, time_t atime)
{ {
register ATDIR *pt; ATDIR *pt;
register u_int indx; u_int indx;
if (atab == NULL) if (atab == NULL)
return; return;
@ -1019,9 +1019,9 @@ add_atdir(char *fname, dev_t dev, ino_t ino, time_t mtime, time_t atime)
int int
get_atdir(dev_t dev, ino_t ino, time_t *mtime, time_t *atime) get_atdir(dev_t dev, ino_t ino, time_t *mtime, time_t *atime)
{ {
register ATDIR *pt; ATDIR *pt;
register ATDIR **ppt; ATDIR **ppt;
register u_int indx; u_int indx;
if (atab == NULL) if (atab == NULL)
return(-1); return(-1);
@ -1231,13 +1231,13 @@ proc_dir(void)
u_int u_int
st_hash(char *name, int len, int tabsz) st_hash(char *name, int len, int tabsz)
{ {
register char *pt; char *pt;
register char *dest; char *dest;
register char *end; char *end;
register int i; int i;
register u_int key = 0; u_int key = 0;
register int steps; int steps;
register int res; int res;
u_int val; u_int val;
/* /*

View File

@ -58,11 +58,11 @@ static const char rcsid[] =
* Routines for reading, writing and header identify of various versions of tar * Routines for reading, writing and header identify of various versions of tar
*/ */
static u_long tar_chksm(register char *, register int); static u_long tar_chksm(char *, int);
static char *name_split(register char *, register int); static char *name_split(char *, int);
static int ul_oct(u_long, register char *, register int, int); static int ul_oct(u_long, char *, int, int);
#ifndef NET2_STAT #ifndef NET2_STAT
static int uqd_oct(u_quad_t, register char *, register int, int); static int uqd_oct(u_quad_t, char *, int, int);
#endif #endif
/* /*
@ -109,9 +109,9 @@ tar_endrd(void)
*/ */
int int
tar_trail(register char *buf, register int in_resync, register int *cnt) tar_trail(char *buf, int in_resync, int *cnt)
{ {
register int i; int i;
/* /*
* look for all zero, trailer is two consecutive blocks of zero * look for all zero, trailer is two consecutive blocks of zero
@ -152,9 +152,9 @@ tar_trail(register char *buf, register int in_resync, register int *cnt)
*/ */
static int static int
ul_oct(u_long val, register char *str, register int len, int term) ul_oct(u_long val, char *str, int len, int term)
{ {
register char *pt; char *pt;
/* /*
* term selects the appropriate character(s) for the end of the string * term selects the appropriate character(s) for the end of the string
@ -207,9 +207,9 @@ ul_oct(u_long val, register char *str, register int len, int term)
*/ */
static int static int
uqd_oct(u_quad_t val, register char *str, register int len, int term) uqd_oct(u_quad_t val, char *str, int len, int term)
{ {
register char *pt; char *pt;
/* /*
* term selects the appropriate character(s) for the end of the string * term selects the appropriate character(s) for the end of the string
@ -261,10 +261,10 @@ uqd_oct(u_quad_t val, register char *str, register int len, int term)
*/ */
static u_long static u_long
tar_chksm(register char *blk, register int len) tar_chksm(char *blk, int len)
{ {
register char *stop; char *stop;
register char *pt; char *pt;
u_long chksm = BLNKSUM; /* initial value is checksum field sum */ u_long chksm = BLNKSUM; /* initial value is checksum field sum */
/* /*
@ -302,10 +302,10 @@ tar_chksm(register char *blk, register int len)
*/ */
int int
tar_id(register char *blk, int size) tar_id(char *blk, int size)
{ {
register HD_TAR *hd; HD_TAR *hd;
register HD_USTAR *uhd; HD_USTAR *uhd;
if (size < BLKMULT) if (size < BLKMULT)
return(-1); return(-1);
@ -373,10 +373,10 @@ tar_opt(void)
*/ */
int int
tar_rd(register ARCHD *arcn, register char *buf) tar_rd(ARCHD *arcn, char *buf)
{ {
register HD_TAR *hd; HD_TAR *hd;
register char *pt; char *pt;
/* /*
* we only get proper sized buffers passed to us * we only get proper sized buffers passed to us
@ -504,9 +504,9 @@ tar_rd(register ARCHD *arcn, register char *buf)
*/ */
int int
tar_wr(register ARCHD *arcn) tar_wr(ARCHD *arcn)
{ {
register HD_TAR *hd; HD_TAR *hd;
int len; int len;
char hdblk[sizeof(HD_TAR)]; char hdblk[sizeof(HD_TAR)];
@ -698,7 +698,7 @@ ustar_stwr(void)
int int
ustar_id(char *blk, int size) ustar_id(char *blk, int size)
{ {
register HD_USTAR *hd; HD_USTAR *hd;
if (size < BLKMULT) if (size < BLKMULT)
return(-1); return(-1);
@ -728,11 +728,11 @@ ustar_id(char *blk, int size)
*/ */
int int
ustar_rd(register ARCHD *arcn, register char *buf) ustar_rd(ARCHD *arcn, char *buf)
{ {
register HD_USTAR *hd; HD_USTAR *hd;
register char *dest; char *dest;
register int cnt = 0; int cnt = 0;
dev_t devmajor; dev_t devmajor;
dev_t devminor; dev_t devminor;
@ -885,10 +885,10 @@ ustar_rd(register ARCHD *arcn, register char *buf)
*/ */
int int
ustar_wr(register ARCHD *arcn) ustar_wr(ARCHD *arcn)
{ {
register HD_USTAR *hd; HD_USTAR *hd;
register char *pt; char *pt;
char hdblk[sizeof(HD_USTAR)]; char hdblk[sizeof(HD_USTAR)];
/* /*
@ -1067,9 +1067,9 @@ ustar_wr(register ARCHD *arcn)
*/ */
static char * static char *
name_split(register char *name, register int len) name_split(char *name, int len)
{ {
register char *start; char *start;
/* /*
* check to see if the file name is small enough to fit in the name * check to see if the file name is small enough to fit in the name

View File

@ -118,7 +118,7 @@ tty_prnt(const char *fmt, ...)
int int
tty_read(char *str, int len) tty_read(char *str, int len)
{ {
register char *pt; char *pt;
if ((--len <= 0) || (ttyinf == NULL) || (fgets(str,len,ttyinf) == NULL)) if ((--len <= 0) || (ttyinf == NULL) || (fgets(str,len,ttyinf) == NULL))
return(-1); return(-1);