From 345f916537662d077177ceb1c7c10258d69143c0 Mon Sep 17 00:00:00 2001 From: charnier Date: Sun, 5 Dec 1999 19:57:14 +0000 Subject: Correct use of .Nm, .Em, .Ev Add rcsid. Use errx instead of fprintf + exit. Various spelling fixes. --- usr.bin/at/panic.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'usr.bin/at/panic.c') diff --git a/usr.bin/at/panic.c b/usr.bin/at/panic.c index 6098c95..9cabc1d 100644 --- a/usr.bin/at/panic.c +++ b/usr.bin/at/panic.c @@ -23,8 +23,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef lint +static const char rcsid[] = + "$FreeBSD$"; +#endif /* not lint */ + /* System Headers */ +#include #include #include #include @@ -35,11 +41,6 @@ #include "panic.h" #include "at.h" -/* File scope variables */ - -static const char rcsid[] = - "$FreeBSD$"; - /* External variables */ /* Global functions */ @@ -49,11 +50,10 @@ panic(char *a) { /* Something fatal has happened, print error message and exit. */ - fprintf(stderr,"%s: %s\n",namep,a); if (fcreated) unlink(atfile); - exit (EXIT_FAILURE); + errx(EXIT_FAILURE, "%s", a); } void @@ -61,11 +61,13 @@ perr(char *a) { /* Some operating system error; print error message and exit. */ - perror(a); + int serrno = errno; + if (fcreated) unlink(atfile); - exit(EXIT_FAILURE); + errno = serrno; + err(EXIT_FAILURE, "%s", a); } void -- cgit v1.1