* 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
[] = "@(#)misc.c 8.2 (Berkeley) %G%";
char *tname
= "temporary file"; /* temporary file "name" */
envtmp
= getenv("TMPDIR");
(void)sprintf(path
, "%s/%s", envtmp
, _NAME_ARTMP
);
strcpy(path
, _PATH_ARTMP
);
(void)sigprocmask(SIG_BLOCK
, &set
, &oset
);
if ((fd
= mkstemp(path
)) == -1)
(void)sigprocmask(SIG_SETMASK
, &oset
, NULL
);
* See if the current file matches any file in the argument list; if it
* does, remove it from the argument list.
for (list
= argv
; *list
; ++list
)
for (; list
[0] = list
[1]; ++list
)
warnx("%s: not found in archive", *argv
);
return ((ind
= strrchr(path
, '/')) ? ind
+ 1 : path
);
return (!strncmp(chdr
.name
, rname(dest
), OLDARMAXNAME
));
return (!strcmp(chdr
.name
, rname(dest
)));
errx(1, "%s: %s", archive
, strerror(EFTYPE
));