macro and text revision (-mdoc version 3)
[unix-history] / usr / src / lib / libc / gen / setjmperr.c
CommitLineData
5af61c73
KM
1/*
2 * Copyright (c) 1980 Regents of the University of California.
f6d6f23b
KB
3 * All rights reserved.
4 *
269a7923 5 * %sccs.include.redist.c%
5af61c73
KM
6 */
7
2ce81398 8#if defined(LIBC_SCCS) && !defined(lint)
c5980113 9static char sccsid[] = "@(#)setjmperr.c 5.8 (Berkeley) %G%";
f6d6f23b 10#endif /* LIBC_SCCS and not lint */
5af61c73
KM
11
12/*
13 * This routine is called from longjmp() when an error occurs.
14 * Programs that wish to exit gracefully from this error may
15 * write their own versions.
16 * If this routine returns, the program is aborted.
17 */
f6d6f23b 18
c5980113 19#include <setjmp.h>
90793b84 20#include <unistd.h>
f964b2d3 21
c5980113 22void
5af61c73
KM
23longjmperror()
24{
90793b84
KB
25#define ERRMSG "longjmp botch.\n"
26 (void)write(STDERR_FILENO, ERRMSG, sizeof(ERRMSG) - 1);
5af61c73 27}