diff options
author | Philippe Charnier <charnier@FreeBSD.org> | 1999-12-05 19:57:14 +0000 |
---|---|---|
committer | Philippe Charnier <charnier@FreeBSD.org> | 1999-12-05 19:57:14 +0000 |
commit | 81c8c7a4545fe60ac4a241e750831de3be5b4837 (patch) | |
tree | f64179c669e7f8c0c83b89be98d0e7cc80084576 /usr.bin/at/panic.c | |
parent | 6ec34d218af280c7e2cd8359d203c3d3f1f31d76 (diff) | |
download | src-81c8c7a4545fe60ac4a241e750831de3be5b4837.tar.gz src-81c8c7a4545fe60ac4a241e750831de3be5b4837.zip |
Correct use of .Nm, .Em, .Ev
Add rcsid. Use errx instead of fprintf + exit.
Various spelling fixes.
Notes
Notes:
svn path=/head/; revision=54158
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 6098c9501e9e..9cabc1da0d5e 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 |