diff options
author | charnier <charnier@FreeBSD.org> | 1999-12-05 19:57:14 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1999-12-05 19:57:14 +0000 |
commit | 345f916537662d077177ceb1c7c10258d69143c0 (patch) | |
tree | 688e50df63e8fd20ecde66d5157337b9c8e1e0b6 /usr.bin/at/panic.c | |
parent | 8b03354e3023710aa24c33cc8203969bc0d9de54 (diff) | |
download | FreeBSD-src-345f916537662d077177ceb1c7c10258d69143c0.zip FreeBSD-src-345f916537662d077177ceb1c7c10258d69143c0.tar.gz |
Correct use of .Nm, .Em, .Ev
Add rcsid. Use errx instead of fprintf + exit.
Various spelling fixes.
Diffstat (limited to 'usr.bin/at/panic.c')
-rw-r--r-- | usr.bin/at/panic.c | 20 |
1 files changed, 11 insertions, 9 deletions
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 <err.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> @@ -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 |