* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* 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 8.2 (Berkeley) %G%";
* 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
);
for (eval
= 0; file
= *argv
++;) {
if ((fd
= open(file
, O_RDONLY
)) < 0) {
(void)printf("q - %s\n", file
);