diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-19 19:39:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-19 19:39:42 +0000 |
commit | 3923126b85f9e8a77cab9a41b5a62125acd5b4cd (patch) | |
tree | 1a8b19c5db03f8c989fc8228811837b182feb7a3 /bin/pax/cpio.c | |
parent | cc03bdb70090357d2393b6ec82e3cde4d5ce5edd (diff) |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'bin/pax/cpio.c')
-rw-r--r-- | bin/pax/cpio.c | 136 |
1 files changed, 2 insertions, 134 deletions
diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c index 5d75a0567f9..d6e516fe391 100644 --- a/bin/pax/cpio.c +++ b/bin/pax/cpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpio.c,v 1.8 2002/02/16 21:27:07 millert Exp $ */ +/* $OpenBSD: cpio.c,v 1.9 2002/02/19 19:39:35 millert Exp $ */ /* $NetBSD: cpio.c,v 1.5 1995/03/21 09:07:13 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)cpio.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: cpio.c,v 1.8 2002/02/16 21:27:07 millert Exp $"; +static char rcsid[] = "$OpenBSD: cpio.c,v 1.9 2002/02/19 19:39:35 millert Exp $"; #endif #endif /* not lint */ @@ -79,13 +79,8 @@ static int swp_head; /* binary cpio header byte swap */ * 0 if ok -1 otherwise (the return values of lnk_start()) */ -#ifdef __STDC__ int cpio_strd(void) -#else -int -cpio_strd() -#endif { return(lnk_start()); } @@ -100,14 +95,8 @@ cpio_strd() * 0 if a valid trailer, -1 if not a valid trailer, */ -#ifdef __STDC__ int cpio_trail(register ARCHD *arcn) -#else -int -cpio_trail(arcn) - register ARCHD *arcn; -#endif { /* * look for trailer id in file we are about to process @@ -124,14 +113,8 @@ cpio_trail(arcn) * 0 */ -#ifdef __STDC__ static int com_rd(register ARCHD *arcn) -#else -static int -com_rd(arcn) - register ARCHD *arcn; -#endif { arcn->skip = 0; arcn->pat = NULL; @@ -179,13 +162,8 @@ com_rd(arcn) * result of the write of the trailer from the cpio specific write func */ -#ifdef __STDC__ int cpio_endwr(void) -#else -int -cpio_endwr() -#endif { ARCHD last; @@ -207,15 +185,8 @@ cpio_endwr() * 0 if ok, -1 otherwise */ -#ifdef __STDC__ static int rd_nm(register ARCHD *arcn, int nsz) -#else -static int -rd_nm(arcn, nsz) - register ARCHD *arcn; - int nsz; -#endif { /* * do not even try bogus values @@ -244,14 +215,8 @@ rd_nm(arcn, nsz) * 0 if ok, -1 otherwise */ -#ifdef __STDC__ static int rd_ln_nm(register ARCHD *arcn) -#else -static int -rd_ln_nm(arcn) - register ARCHD *arcn; -#endif { /* * check the length specified for bogus values @@ -301,15 +266,8 @@ rd_ln_nm(arcn) * 0 if a valid header, -1 otherwise */ -#ifdef __STDC__ int cpio_id(char *blk, int size) -#else -int -cpio_id(blk, size) - char *blk; - int size; -#endif { if ((size < sizeof(HD_CPIO)) || (strncmp(blk, AMAGIC, sizeof(AMAGIC) - 1) != 0)) @@ -325,15 +283,8 @@ cpio_id(blk, size) * 0 if a valid header, -1 otherwise. */ -#ifdef __STDC__ int cpio_rd(register ARCHD *arcn, register char *buf) -#else -int -cpio_rd(arcn, buf) - register ARCHD *arcn; - register char *buf; -#endif { register int nsz; register HD_CPIO *hd; @@ -408,13 +359,8 @@ cpio_rd(arcn, buf) * size of trailer header in this format */ -#ifdef __STDC__ off_t cpio_endrd(void) -#else -off_t -cpio_endrd() -#endif { return((off_t)(sizeof(HD_CPIO) + sizeof(TRAILER))); } @@ -426,13 +372,8 @@ cpio_endrd() * 0 if ok, -1 otherwise (what dev_start() returns) */ -#ifdef __STDC__ int cpio_stwr(void) -#else -int -cpio_stwr() -#endif { return(dev_start()); } @@ -446,14 +387,8 @@ cpio_stwr() * data to write after the header, -1 if archive write failed */ -#ifdef __STDC__ int cpio_wr(register ARCHD *arcn) -#else -int -cpio_wr(arcn) - register ARCHD *arcn; -#endif { register HD_CPIO *hd; register int nsz; @@ -582,15 +517,8 @@ cpio_wr(arcn) * 0 if a valid header, -1 otherwise */ -#ifdef __STDC__ int vcpio_id(char *blk, int size) -#else -int -vcpio_id(blk, size) - char *blk; - int size; -#endif { if ((size < sizeof(HD_VCPIO)) || (strncmp(blk, AVMAGIC, sizeof(AVMAGIC) - 1) != 0)) @@ -606,15 +534,8 @@ vcpio_id(blk, size) * 0 if a valid header, -1 otherwise */ -#ifdef __STDC__ int crc_id(char *blk, int size) -#else -int -crc_id(blk, size) - char *blk; - int size; -#endif { if ((size < sizeof(HD_VCPIO)) || (strncmp(blk, AVCMAGIC, sizeof(AVCMAGIC) - 1) != 0)) @@ -629,13 +550,8 @@ crc_id(blk, size) * 0 if ok -1 otherwise (the return values of lnk_start()) */ -#ifdef __STDC__ int crc_strd(void) -#else -int -crc_strd() -#endif { docrc = 1; return(lnk_start()); @@ -649,15 +565,8 @@ crc_strd() * 0 if a valid header, -1 otherwise. */ -#ifdef __STDC__ int vcpio_rd(register ARCHD *arcn, register char *buf) -#else -int -vcpio_rd(arcn, buf) - register ARCHD *arcn; - register char *buf; -#endif { register HD_VCPIO *hd; dev_t devminor; @@ -755,13 +664,8 @@ vcpio_rd(arcn, buf) * size of trailer header in this format */ -#ifdef __STDC__ off_t vcpio_endrd(void) -#else -off_t -vcpio_endrd() -#endif { return((off_t)(sizeof(HD_VCPIO) + sizeof(TRAILER) + (VCPIO_PAD(sizeof(HD_VCPIO) + sizeof(TRAILER))))); @@ -774,13 +678,8 @@ vcpio_endrd() * 0 if ok, -1 otherwise (what dev_start() returns) */ -#ifdef __STDC__ int crc_stwr(void) -#else -int -crc_stwr() -#endif { docrc = 1; return(dev_start()); @@ -795,14 +694,8 @@ crc_stwr() * NO data to write after the header, -1 if archive write failed */ -#ifdef __STDC__ int vcpio_wr(register ARCHD *arcn) -#else -int -vcpio_wr(arcn) - register ARCHD *arcn; -#endif { register HD_VCPIO *hd; unsigned int nsz; @@ -958,15 +851,8 @@ vcpio_wr(arcn) * 0 if a valid header, -1 otherwise */ -#ifdef __STDC__ int bcpio_id(char *blk, int size) -#else -int -bcpio_id(blk, size) - char *blk; - int size; -#endif { if (size < sizeof(HD_BCPIO)) return(-1); @@ -993,15 +879,8 @@ bcpio_id(blk, size) * 0 if a valid header, -1 otherwise. */ -#ifdef __STDC__ int bcpio_rd(register ARCHD *arcn, register char *buf) -#else -int -bcpio_rd(arcn, buf) - register ARCHD *arcn; - register char *buf; -#endif { register HD_BCPIO *hd; register int nsz; @@ -1097,13 +976,8 @@ bcpio_rd(arcn, buf) * size of trailer header in this format */ -#ifdef __STDC__ off_t bcpio_endrd(void) -#else -off_t -bcpio_endrd() -#endif { return((off_t)(sizeof(HD_BCPIO) + sizeof(TRAILER) + (BCPIO_PAD(sizeof(HD_BCPIO) + sizeof(TRAILER))))); @@ -1120,14 +994,8 @@ bcpio_endrd() * data to write after the header, -1 if archive write failed */ -#ifdef __STDC__ int bcpio_wr(register ARCHD *arcn) -#else -int -bcpio_wr(arcn) - register ARCHD *arcn; -#endif { register HD_BCPIO *hd; register int nsz; |