* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Hugh Smith at The University of Guelph.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)contents.c 5.6 (Berkeley) %G%";
extern CHDR chdr
; /* converted header */
extern char *archive
; /* archive name */
* Handles t[v] option - opens the archive and then reads headers,
* skipping member contents.
afd
= open_archive(O_RDONLY
);
for (all
= !*argv
; get_arobj(afd
);) {
else if (!(file
= files(argv
)))
(void)strmode(chdr
.mode
, buf
);
(void)printf("%s %6d/%-6d %8ld ",
buf
+ 1, chdr
.uid
, chdr
.gid
, chdr
.size
);
tp
= localtime(&chdr
.date
);
(void)strftime(buf
, sizeof(buf
), "%b %e %H:%M %Y", tp
);
(void)printf("%s %s\n", buf
, file
);
(void)printf("%s\n", file
);