* 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
[] = "@(#)misc.c 5.2 (Berkeley) %G%";
extern CHDR chdr
; /* converted header */
extern char *archive
; /* archive name */
char *tname
= "temporary file"; /* temporary file "name" */
envtmp
= getenv("TMPDIR");
(void)sprintf(path
, "%s/%s", envtmp
, _NAME_ARTMP
);
bcopy(_PATH_ARTMP
, path
, sizeof(_PATH_ARTMP
));
sigaddset(&set
, SIGQUIT
);
sigaddset(&set
, SIGTERM
);
(void)sigprocmask(SIG_BLOCK
, &set
, &oset
);
if ((fd
= mkstemp(path
)) == -1)
(void)sigprocmask(SIG_SETMASK
, &oset
, (sigset_t
*)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
);
return((ind
= rindex(path
, '/')) ? ind
+ 1 : path
);
return(!strcmp(chdr
.name
, rname(dest
)));
(void)fprintf(stderr
, "ar: %s: %s\n", name
, strerror(errno
));