summaryrefslogtreecommitdiffstats
path: root/usr.bin/tip/libacu
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-08-18 07:16:12 +0000
committercharnier <charnier@FreeBSD.org>1997-08-18 07:16:12 +0000
commit6fbe0aac6da1c5f7425829dcc7e22593a28f923c (patch)
tree2cf85c7dc8c3711f9f7ed17879219aea309ddd9d /usr.bin/tip/libacu
parente0224667fe353de8d6394686a4589a5a7935b6b2 (diff)
downloadFreeBSD-src-6fbe0aac6da1c5f7425829dcc7e22593a28f923c.zip
FreeBSD-src-6fbe0aac6da1c5f7425829dcc7e22593a28f923c.tar.gz
Add prototypes, usage(). Use err(3).
Diffstat (limited to 'usr.bin/tip/libacu')
-rw-r--r--usr.bin/tip/libacu/acucommon.c10
-rw-r--r--usr.bin/tip/libacu/unidialer.c11
-rw-r--r--usr.bin/tip/libacu/ventel.c7
3 files changed, 22 insertions, 6 deletions
diff --git a/usr.bin/tip/libacu/acucommon.c b/usr.bin/tip/libacu/acucommon.c
index 479e9a3..fe0d146 100644
--- a/usr.bin/tip/libacu/acucommon.c
+++ b/usr.bin/tip/libacu/acucommon.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)acucommon.c 8.1 (Berkeley) 6/6/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
@@ -42,6 +46,8 @@ static char sccsid[] = "@(#)acucommon.c 8.1 (Berkeley) 6/6/93";
#include "tipconf.h"
#include "tip.h"
+#include <err.h>
+
#if HAVE_SELECT
#include <sys/types.h>
#include <sys/times.h>
@@ -161,12 +167,12 @@ int acu_setspeed (int speed)
#else /* HAVE TERMIOS */
struct sgttyb sb;
if (ioctl(FD, TIOCGETP, &sb) < 0) {
- perror("TIOCGETP");
+ warn("TIOCGETP");
}
else {
sb.sg_ispeed = sb.sg_ospeed = speed;
if (ioctl(FD, TIOCSETP, &sb) < 0) {
- perror("TIOCSETP");
+ warn("TIOCSETP");
}
else
++rc;
diff --git a/usr.bin/tip/libacu/unidialer.c b/usr.bin/tip/libacu/unidialer.c
index 4f8a1f5..a8d8ef1 100644
--- a/usr.bin/tip/libacu/unidialer.c
+++ b/usr.bin/tip/libacu/unidialer.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)unidialer.c 8.1 (Berkeley) 6/6/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
@@ -46,6 +50,7 @@ static char sccsid[] = "@(#)unidialer.c 8.1 (Berkeley) 6/6/93";
#include <sys/times.h>
#include <assert.h>
+#include <err.h>
#include <stdio.h>
#include <stdlib.h>
@@ -184,13 +189,13 @@ static int getmodemparms (const char *modem)
if ((stat = cgetent (&bp, db_array, (char *)modem)) < 0) {
switch (stat) {
case -1:
- fprintf (stderr, "tip: unknown modem %s\n", modem);
+ warnx ("unknown modem %s", modem);
break;
case -2:
- fprintf (stderr, "tip: can't open modem description file\n");
+ warnx ("can't open modem description file");
break;
case -3:
- fprintf (stderr, "tip: possible reference loop in modem description file\n");
+ warnx ("possible reference loop in modem description file");
break;
}
return 0;
diff --git a/usr.bin/tip/libacu/ventel.c b/usr.bin/tip/libacu/ventel.c
index 73733e5..a438b42 100644
--- a/usr.bin/tip/libacu/ventel.c
+++ b/usr.bin/tip/libacu/ventel.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)ventel.c 8.1 (Berkeley) 6/6/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
@@ -41,6 +45,7 @@ static char sccsid[] = "@(#)ventel.c 8.1 (Berkeley) 6/6/93";
*/
#include "tipconf.h"
#include "tip.h"
+#include <err.h>
#define MAXRETRY 5
@@ -235,7 +240,7 @@ vensync(fd)
write(fd, "\r", 1);
sleep(2);
if (ioctl(fd, FIONREAD, (caddr_t)&nread) < 0) {
- perror("tip: ioctl");
+ warn("ioctl");
continue;
}
while (nread > 0) {
OpenPOWER on IntegriCloud