* The Regents of the University of California. All rights reserved.
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)err.c 8.1 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
extern char *__progname
; /* Program name, from crt0. */
err(int eval
, const char *fmt
, ...)
(void)fprintf(stderr
, "%s: ", __progname
);
(void)vfprintf(stderr
, fmt
, ap
);
(void)fprintf(stderr
, ": ");
(void)fprintf(stderr
, "%s\n", strerror(sverrno
));
errx(int eval
, const char *fmt
, ...)
errx(eval
, fmt
, va_alist
)
(void)fprintf(stderr
, "%s: ", __progname
);
(void)vfprintf(stderr
, fmt
, ap
);
(void)fprintf(stderr
, "\n");
warn(const char *fmt
, ...)
(void)fprintf(stderr
, "%s: ", __progname
);
(void)vfprintf(stderr
, fmt
, ap
);
(void)fprintf(stderr
, ": ");
(void)fprintf(stderr
, "%s\n", strerror(sverrno
));
warnx(const char *fmt
, ...)
(void)fprintf(stderr
, "%s: ", __progname
);
(void)vfprintf(stderr
, fmt
, ap
);
(void)fprintf(stderr
, "\n");