/*- * Copyright (c) 1991 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Edward Sze-Tyan Wang. * * %sccs.include.redist.c% */ #ifndef lint static char sccsid[] = "@(#)misc.c 5.1 (Berkeley) 07/21/91"; #endif /* not lint */ #include #include #include #include #include #include #include #include "extern.h" void ierr() { err("%s: %s", fname, strerror(errno)); } void oerr() { err("stdout: %s", strerror(errno)); } #if __STDC__ #include #else #include #endif void #if __STDC__ err(const char *fmt, ...) #else err(fmt, va_alist) char *fmt; va_dcl #endif { va_list ap; #if __STDC__ va_start(ap, fmt); #else va_start(ap); #endif (void)fprintf(stderr, "tail: "); (void)vfprintf(stderr, fmt, ap); va_end(ap); (void)fprintf(stderr, "\n"); exit(1); /* NOTREACHED */ }