* @(#)err 5.1 (Berkeley) %G%
* Error routines can be tricky. The following works in most cases,
* and can be easily adapted per program. It allows both:
* if ((fp = fopen(file, "r")) == NULL)
* err("%s: %s", file, strerror(errno));
* if ((p = malloc(sizeof(int))) == NULL)
* err("%s", strerror(errno));
err(const char *fmt, ...)
(void)fprintf(stderr, "program: ");
(void)vfprintf(stderr, fmt, ap);
(void)fprintf(stderr, "\n");