* Copyright (c) 1991 The Regents of the University of California.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)misc.c 5.1 (Berkeley) %G%";
if ((fd
= open(file
, O_RDONLY
, 0)) < 0)
err("%s: %s", file
, strerror(errno
));
while ((nr
= read(fd
, buf
, sizeof(buf
))) > 0)
if ((nw
= write(STDERR_FILENO
, buf
, nr
)) == -1)
err("write to stderr: %s", strerror(errno
));
err("%s: %s", file
, strerror(errno
));
err(const char *fmt
, ...)
(void)fprintf(stderr
, "tset: ");
(void)vfprintf(stderr
, fmt
, ap
);
(void)fprintf(stderr
, "\n");