* 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
[] = "@(#)append.c 5.3 (Berkeley) %G%";
extern char *archive
; /* archive name */
* Append files to the archive - modifies original archive or creates
* a new archive if named archive does not exist.
afd
= open_archive(O_CREAT
|O_RDWR
);
if (lseek(afd
, (off_t
)0, SEEK_END
) == (off_t
)-1)
/* Read from disk, write to an archive; pad on write. */
SETCF(0, 0, afd
, archive
, WPAD
);
if ((fd
= open(file
, O_RDONLY
)) < 0) {
"ar: %s: %s.\n", file
, strerror(errno
));
(void)printf("q - %s\n", file
);