908062a65defeb363517b5cd5d1d5aa564de61c5
* 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.1 (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
));
(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
);
"ar: %s: not found in archive.\n", *argv
);
return((ind
= rindex(path
, '/')) ? ind
+ 1 : path
);
return(!strncmp(chdr
.name
, rname(dest
), OLDARMAXNAME
));
return(!strcmp(chdr
.name
, rname(dest
)));
(void)fprintf(stderr
, "ar: %s: %s\n", name
, strerror(errno
));