diff options
author | imp <imp@FreeBSD.org> | 2002-02-02 06:48:10 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-02-02 06:48:10 +0000 |
commit | 50014e35418ca00d25ea852fc4f94acf80be4df3 (patch) | |
tree | f26db6e85c29b2244f601bdb366caa7f26a96c24 /bin/pax/buf_subs.c | |
parent | 3fc8df52e3856eeac730574d5ae122806dd1e1ef (diff) | |
download | FreeBSD-src-50014e35418ca00d25ea852fc4f94acf80be4df3.zip FreeBSD-src-50014e35418ca00d25ea852fc4f94acf80be4df3.tar.gz |
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
Diffstat (limited to 'bin/pax/buf_subs.c')
-rw-r--r-- | bin/pax/buf_subs.c | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c index d6c4ae9..842fbfc 100644 --- a/bin/pax/buf_subs.c +++ b/bin/pax/buf_subs.c @@ -84,13 +84,8 @@ off_t rdcnt; /* # of bytes read on current vol */ * 0 if ok, -1 if the user specified write block size violates pax spec */ -#ifdef __STDC__ int wr_start(void) -#else -int -wr_start() -#endif { buf = &(bufmem[BLKMULT]); /* @@ -137,13 +132,8 @@ wr_start() * 0 if ok, -1 otherwise */ -#ifdef __STDC__ int rd_start(void) -#else -int -rd_start() -#endif { /* * leave space for the header pushback (see get_arc()). If we are @@ -180,13 +170,8 @@ rd_start() * set up buffer system for copying within the file system */ -#ifdef __STDC__ void cp_start(void) -#else -void -cp_start() -#endif { buf = &(bufmem[BLKMULT]); rdblksz = blksz = MAXBLK; @@ -224,14 +209,8 @@ cp_start() * 0 for success, -1 for failure */ -#ifdef __STDC__ int appnd_start(off_t skcnt) -#else -int -appnd_start(skcnt) - off_t skcnt; -#endif { register int res; off_t cnt; @@ -329,13 +308,8 @@ appnd_start(skcnt) * 0 on success, and -1 on failure */ -#ifdef __STDC__ int rd_sync(void) -#else -int -rd_sync() -#endif { register int errcnt = 0; register int res; @@ -402,15 +376,8 @@ rd_sync() * pback space is increased. */ -#ifdef __STDC__ void pback(char *pt, int cnt) -#else -void -pback(pt, cnt) - char *pt; - int cnt; -#endif { bufpt -= cnt; memcpy(bufpt, pt, cnt); @@ -425,14 +392,8 @@ pback(pt, cnt) * 0 if ok, -1 failure, and 1 when EOF on the archive volume was detected. */ -#ifdef __STDC__ int rd_skip(off_t skcnt) -#else -int -rd_skip(skcnt) - off_t skcnt; -#endif { off_t res; off_t cnt; @@ -500,13 +461,8 @@ rd_skip(skcnt) * BE a requirement.... */ -#ifdef __STDC__ void wr_fin(void) -#else -void -wr_fin() -#endif { if (bufpt > buf) { memset(bufpt, 0, bufend - bufpt); @@ -526,15 +482,8 @@ wr_fin() * 0 if buffer was filled ok, -1 o.w. (buffer flush failure) */ -#ifdef __STDC__ int wr_rdbuf(register char *out, register int outcnt) -#else -int -wr_rdbuf(out, outcnt) - register char *out; - register int outcnt; -#endif { register int cnt; @@ -569,15 +518,8 @@ wr_rdbuf(out, outcnt) * -1 is a read error */ -#ifdef __STDC__ int rd_wrbuf(register char *in, register int cpcnt) -#else -int -rd_wrbuf(in, cpcnt) - register char *in; - register int cpcnt; -#endif { register int res; register int cnt; @@ -624,14 +566,8 @@ rd_wrbuf(in, cpcnt) * 0 if ok, -1 if there was a buf_flush failure */ -#ifdef __STDC__ int wr_skip(off_t skcnt) -#else -int -wr_skip(skcnt) - off_t skcnt; -#endif { register int cnt; @@ -668,16 +604,8 @@ wr_skip(skcnt) * 0, but "left" is set to be greater than zero. */ -#ifdef __STDC__ int wr_rdfile(ARCHD *arcn, int ifd, off_t *left) -#else -int -wr_rdfile(arcn, ifd, left) - ARCHD *arcn; - int ifd; - off_t *left; -#endif { register int cnt; register int res = 0; @@ -737,16 +665,8 @@ wr_rdfile(arcn, ifd, left) * we return a 0 but "left" is set to be the amount unwritten */ -#ifdef __STDC__ int rd_wrfile(ARCHD *arcn, int ofd, off_t *left) -#else -int -rd_wrfile(arcn, ofd, left) - ARCHD *arcn; - int ofd; - off_t *left; -#endif { register int cnt = 0; register off_t size = arcn->sb.st_size; @@ -833,16 +753,8 @@ rd_wrfile(arcn, ofd, left) * destination file so we can properly copy files with holes. */ -#ifdef __STDC__ void cp_file(ARCHD *arcn, int fd1, int fd2) -#else -void -cp_file(arcn, fd1, fd2) - ARCHD *arcn; - int fd1; - int fd2; -#endif { register int cnt; register off_t cpcnt = 0L; @@ -922,13 +834,8 @@ cp_file(arcn, fd1, fd2) * 0 when finished (user specified termination in ar_next()). */ -#ifdef __STDC__ int buf_fill(void) -#else -int -buf_fill() -#endif { register int cnt; static int fini = 0; @@ -972,14 +879,8 @@ buf_fill() * 0 if all is ok, -1 when a write error occurs. */ -#ifdef __STDC__ int buf_flush(register int bufcnt) -#else -int -buf_flush(bufcnt) - register int bufcnt; -#endif { register int cnt; register int push = 0; |