summaryrefslogtreecommitdiffstats
path: root/bin/pax/ar_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pax/ar_io.c')
-rw-r--r--bin/pax/ar_io.c72
1 files changed, 2 insertions, 70 deletions
diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c
index 3651ca0..aa3f22f 100644
--- a/bin/pax/ar_io.c
+++ b/bin/pax/ar_io.c
@@ -85,9 +85,9 @@ char *arcname; /* printable name of archive */
const char *gzip_program; /* name of gzip program */
static pid_t zpid = -1; /* pid of child process */
-static int get_phys __P((void));
+static int get_phys(void);
extern sigset_t s_mask;
-static void ar_start_gzip __P((int, const char *, int));
+static void ar_start_gzip(int, const char *, int);
/*
* ar_open()
@@ -98,14 +98,8 @@ static void ar_start_gzip __P((int, const char *, int));
* -1 on failure, 0 otherwise
*/
-#ifdef __STDC__
int
ar_open(char *name)
-#else
-int
-ar_open(name)
- char *name;
-#endif
{
struct mtget mb;
@@ -303,13 +297,8 @@ ar_open(name)
* ar_close()
* closes archive device, increments volume number, and prints i/o summary
*/
-#ifdef __STDC__
void
ar_close(void)
-#else
-void
-ar_close()
-#endif
{
if (arfd < 0) {
@@ -425,13 +414,8 @@ ar_close()
* other side of the pipe from getting a SIGPIPE (pax will stop
* reading an archive once a format dependent trailer is detected).
*/
-#ifdef __STDC__
void
ar_drain(void)
-#else
-void
-ar_drain()
-#endif
{
register int res;
char drbuf[MAXBLK];
@@ -462,13 +446,8 @@ ar_drain()
* 0 if all ready to write, -1 otherwise
*/
-#ifdef __STDC__
int
ar_set_wr(void)
-#else
-int
-ar_set_wr()
-#endif
{
off_t cpos;
@@ -505,13 +484,8 @@ ar_set_wr()
* 0 if we can append, -1 otherwise.
*/
-#ifdef __STDC__
int
ar_app_ok(void)
-#else
-int
-ar_app_ok()
-#endif
{
if (artyp == ISPIPE) {
paxwarn(1, "Cannot append to an archive obtained from a pipe.");
@@ -534,15 +508,8 @@ ar_app_ok()
* Number of bytes in buffer. 0 for end of file, -1 for a read error.
*/
-#ifdef __STDC__
int
ar_read(register char *buf, register int cnt)
-#else
-int
-ar_read(buf, cnt)
- register char *buf;
- register int cnt;
-#endif
{
register int res = 0;
@@ -624,15 +591,8 @@ ar_read(buf, cnt)
* error in the archive occured.
*/
-#ifdef __STDC__
int
ar_write(register char *buf, register int bsz)
-#else
-int
-ar_write(buf, bsz)
- register char *buf;
- register int bsz;
-#endif
{
register int res;
off_t cpos;
@@ -749,13 +709,8 @@ ar_write(buf, bsz)
* 0 when ok to try i/o again, -1 otherwise.
*/
-#ifdef __STDC__
int
ar_rdsync(void)
-#else
-int
-ar_rdsync()
-#endif
{
long fsbz;
off_t cpos;
@@ -840,15 +795,8 @@ ar_rdsync()
* partial move (the amount moved is in skipped)
*/
-#ifdef __STDC__
int
ar_fow(off_t sksz, off_t *skipped)
-#else
-int
-ar_fow(sksz, skipped)
- off_t sksz;
- off_t *skipped;
-#endif
{
off_t cpos;
off_t mpos;
@@ -906,14 +854,8 @@ ar_fow(sksz, skipped)
* 0 if moved the requested distance, -1 on complete failure
*/
-#ifdef __STDC__
int
ar_rev(off_t sksz)
-#else
-int
-ar_rev(sksz)
- off_t sksz;
-#endif
{
off_t cpos;
struct mtop mb;
@@ -1044,13 +986,8 @@ ar_rev(sksz)
* physical block size if ok (ok > 0), -1 otherwise
*/
-#ifdef __STDC__
static int
get_phys(void)
-#else
-static int
-get_phys()
-#endif
{
register int padsz = 0;
register int res;
@@ -1162,13 +1099,8 @@ get_phys()
* 0 when ready to continue, -1 when all done
*/
-#ifdef __STDC__
int
ar_next(void)
-#else
-int
-ar_next()
-#endif
{
char buf[PAXPATHLEN+2];
static int freeit = 0;
OpenPOWER on IntegriCloud