From 546d7b7b78b61935341e8d0e4039503b12da73de Mon Sep 17 00:00:00 2001 From: charnier Date: Mon, 18 Aug 1997 07:27:59 +0000 Subject: Use err(3) insteadof local redefinition. Sync usage string with man page. --- usr.bin/tset/map.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'usr.bin/tset/map.c') diff --git a/usr.bin/tset/map.c b/usr.bin/tset/map.c index 2e71d2c..cee4b66 100644 --- a/usr.bin/tset/map.c +++ b/usr.bin/tset/map.c @@ -32,14 +32,18 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/9/93"; +#endif +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include -#include -#include +#include #include #include +#include #include "extern.h" extern speed_t Ospeed; @@ -78,7 +82,7 @@ add_mapping(port, arg) copy = strdup(arg); mapp = malloc((u_int)sizeof(MAP)); if (copy == NULL || mapp == NULL) - err("%s", strerror(errno)); + errx(1, "malloc"); mapp->next = NULL; if (maplist == NULL) cur = maplist = mapp; @@ -154,7 +158,7 @@ next: if (*arg == ':') { /* If user specified a port with an option flag, set it. */ done: if (port) { if (mapp->porttype) -badmopt: err("illegal -m option format: %s", copy); +badmopt: errx(1, "illegal -m option format: %s", copy); mapp->porttype = port; } @@ -247,6 +251,6 @@ baudrate(rate) return (sp->speed); speed = atol(rate); if (speed == 0) - err("unknown baud rate %s", rate); + errx(1, "unknown baud rate %s", rate); return speed; } -- cgit v1.1