summaryrefslogtreecommitdiff
path: root/usr.bin/tip/aculib
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tip/aculib')
-rw-r--r--usr.bin/tip/aculib/biz22.c4
-rw-r--r--usr.bin/tip/aculib/courier.c19
-rw-r--r--usr.bin/tip/aculib/df.c6
-rw-r--r--usr.bin/tip/aculib/dn11.c4
-rw-r--r--usr.bin/tip/aculib/hayes.c12
-rw-r--r--usr.bin/tip/aculib/t3000.c38
-rw-r--r--usr.bin/tip/aculib/v3451.c4
-rw-r--r--usr.bin/tip/aculib/v831.c4
-rw-r--r--usr.bin/tip/aculib/ventel.c35
9 files changed, 68 insertions, 58 deletions
diff --git a/usr.bin/tip/aculib/biz22.c b/usr.bin/tip/aculib/biz22.c
index cd5ca4acfcc..b3f2a4acc01 100644
--- a/usr.bin/tip/aculib/biz22.c
+++ b/usr.bin/tip/aculib/biz22.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: biz22.c,v 1.7 2001/10/24 18:38:58 millert Exp $ */
+/* $OpenBSD: biz22.c,v 1.8 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: biz22.c,v 1.6 1997/02/11 09:24:11 mrg Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)biz22.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: biz22.c,v 1.7 2001/10/24 18:38:58 millert Exp $";
+static const char rcsid[] = "$OpenBSD: biz22.c,v 1.8 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
#include "tip.h"
diff --git a/usr.bin/tip/aculib/courier.c b/usr.bin/tip/aculib/courier.c
index bfed40cf670..942b2dfb702 100644
--- a/usr.bin/tip/aculib/courier.c
+++ b/usr.bin/tip/aculib/courier.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: courier.c,v 1.10 2002/02/16 21:27:55 millert Exp $ */
+/* $OpenBSD: courier.c,v 1.11 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: courier.c,v 1.7 1997/02/11 09:24:16 mrg Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)courier.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: courier.c,v 1.10 2002/02/16 21:27:55 millert Exp $";
+static const char rcsid[] = "$OpenBSD: courier.c,v 1.11 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
/*
@@ -51,10 +51,11 @@ static char rcsid[] = "$OpenBSD: courier.c,v 1.10 2002/02/16 21:27:55 millert Ex
#define MAXRETRY 5
+static void cour_write(int fd, char *cp, int n);
static void sigALRM();
static int timeout = 0;
static int connected = 0;
-static jmp_buf timeoutbuf, intbuf;
+static jmp_buf timeoutbuf;
static int coursync(), cour_connect(), cour_swallow();
void cour_nap();
@@ -183,12 +184,12 @@ struct baud_msg {
char *msg;
int baud;
} baud_msg[] = {
- "", B300,
- " 1200", B1200,
- " 2400", B2400,
- " 9600", B9600,
- " 9600/ARQ", B9600,
- 0, 0,
+ { "", B300 },
+ { " 1200", B1200 },
+ { " 2400", B2400 },
+ { " 9600", B9600 },
+ { " 9600/ARQ", B9600 },
+ { 0, 0 },
};
static int
diff --git a/usr.bin/tip/aculib/df.c b/usr.bin/tip/aculib/df.c
index 2fa0a0b320a..4642f98c3d4 100644
--- a/usr.bin/tip/aculib/df.c
+++ b/usr.bin/tip/aculib/df.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: df.c,v 1.5 2001/10/24 18:38:58 millert Exp $ */
+/* $OpenBSD: df.c,v 1.6 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: df.c,v 1.4 1995/10/29 00:49:51 pk Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)df.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: df.c,v 1.5 2001/10/24 18:38:58 millert Exp $";
+static const char rcsid[] = "$OpenBSD: df.c,v 1.6 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
/*
@@ -49,6 +49,8 @@ static char rcsid[] = "$OpenBSD: df.c,v 1.5 2001/10/24 18:38:58 millert Exp $";
static jmp_buf Sjbuf;
static void timeout();
+static int df_dialer(char *num, char *acu, int df03);
+static void df_disconnect();
int
df02_dialer(num, acu)
diff --git a/usr.bin/tip/aculib/dn11.c b/usr.bin/tip/aculib/dn11.c
index 3f346159429..c84bc05a4e0 100644
--- a/usr.bin/tip/aculib/dn11.c
+++ b/usr.bin/tip/aculib/dn11.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dn11.c,v 1.5 2001/11/19 19:02:16 mpech Exp $ */
+/* $OpenBSD: dn11.c,v 1.6 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: dn11.c,v 1.4 1995/10/29 00:49:53 pk Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dn11.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: dn11.c,v 1.5 2001/11/19 19:02:16 mpech Exp $";
+static const char rcsid[] = "$OpenBSD: dn11.c,v 1.6 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
/*
diff --git a/usr.bin/tip/aculib/hayes.c b/usr.bin/tip/aculib/hayes.c
index 19ee8f80abe..e42e797b9f9 100644
--- a/usr.bin/tip/aculib/hayes.c
+++ b/usr.bin/tip/aculib/hayes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hayes.c,v 1.8 2001/10/24 18:38:58 millert Exp $ */
+/* $OpenBSD: hayes.c,v 1.9 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: hayes.c,v 1.6 1997/02/11 09:24:17 mrg Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)hayes.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: hayes.c,v 1.8 2001/10/24 18:38:58 millert Exp $";
+static const char rcsid[] = "$OpenBSD: hayes.c,v 1.9 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
/*
@@ -75,6 +75,11 @@ static void sigALRM();
static int timeout = 0;
static jmp_buf timeoutbuf;
static char gobble();
+static void error_rep(char c);
+int hay_sync(void);
+void hay_disconnect(void);
+void goodbye(void);
+
#define DUMBUFLEN 40
static char dumbuf[DUMBUFLEN];
@@ -209,8 +214,7 @@ gobble(match)
}
static void
-error_rep(c)
- char c;
+error_rep(char c)
{
printf("\n\r");
switch (c) {
diff --git a/usr.bin/tip/aculib/t3000.c b/usr.bin/tip/aculib/t3000.c
index 1f050910447..c3b8cb6595a 100644
--- a/usr.bin/tip/aculib/t3000.c
+++ b/usr.bin/tip/aculib/t3000.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: t3000.c,v 1.9 2001/10/24 18:38:58 millert Exp $ */
+/* $OpenBSD: t3000.c,v 1.10 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: t3000.c,v 1.5 1997/02/11 09:24:18 mrg Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)t3000.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: t3000.c,v 1.9 2001/10/24 18:38:58 millert Exp $";
+static const char rcsid[] = "$OpenBSD: t3000.c,v 1.10 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
/*
@@ -55,9 +55,11 @@ static char rcsid[] = "$OpenBSD: t3000.c,v 1.9 2001/10/24 18:38:58 millert Exp $
static void sigALRM();
static int timeout = 0;
static int connected = 0;
-static jmp_buf timeoutbuf, intbuf;
+static jmp_buf timeoutbuf;
static int t3000_sync(), t3000_connect(), t3000_swallow();
+static void t3000_write(int fd, char *cp, int n);
static void t3000_nap();
+void t3000_disconnect();
int
t3000_dialer(num, acu)
@@ -188,20 +190,20 @@ struct tbaud_msg {
int baud;
int baud2;
} tbaud_msg[] = {
- "", B300, 0,
- " 1200", B1200, 0,
- " 2400", B2400, 0,
- " 4800", B4800, 0,
- " 9600", B9600, 0,
- " 14400", B19200, B9600,
- " 19200", B19200, B9600,
- " 38400", B38400, B9600,
- " 57600", B38400, B9600,
- " 7512", B9600, 0,
- " 1275", B2400, 0,
- " 7200", B9600, 0,
- " 12000", B19200, B9600,
- 0, 0, 0,
+ { "", B300, 0 },
+ { " 1200", B1200, 0 },
+ { " 2400", B2400, 0 },
+ { " 4800", B4800, 0 },
+ { " 9600", B9600, 0 },
+ { " 14400", B19200, B9600 },
+ { " 19200", B19200, B9600 },
+ { " 38400", B38400, B9600 },
+ { " 57600", B38400, B9600 },
+ { " 7512", B9600, 0 },
+ { " 1275", B2400, 0 },
+ { " 7200", B9600, 0 },
+ { " 12000", B19200, B9600 },
+ { 0, 0, 0 },
};
static int
@@ -322,7 +324,7 @@ if (len == 0) len = 1;
return (0);
}
-static int
+static void
t3000_write(fd, cp, n)
int fd;
char *cp;
diff --git a/usr.bin/tip/aculib/v3451.c b/usr.bin/tip/aculib/v3451.c
index 1440c551e0e..b4b902dcfb6 100644
--- a/usr.bin/tip/aculib/v3451.c
+++ b/usr.bin/tip/aculib/v3451.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v3451.c,v 1.6 2001/10/24 18:38:58 millert Exp $ */
+/* $OpenBSD: v3451.c,v 1.7 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: v3451.c,v 1.6 1997/02/11 09:24:20 mrg Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)v3451.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: v3451.c,v 1.6 2001/10/24 18:38:58 millert Exp $";
+static const char rcsid[] = "$OpenBSD: v3451.c,v 1.7 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
/*
diff --git a/usr.bin/tip/aculib/v831.c b/usr.bin/tip/aculib/v831.c
index 005e5d931e5..b7f54e496fd 100644
--- a/usr.bin/tip/aculib/v831.c
+++ b/usr.bin/tip/aculib/v831.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v831.c,v 1.6 2001/11/19 19:02:16 mpech Exp $ */
+/* $OpenBSD: v831.c,v 1.7 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: v831.c,v 1.5 1996/12/29 10:42:01 cgd Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)v831.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: v831.c,v 1.6 2001/11/19 19:02:16 mpech Exp $";
+static const char rcsid[] = "$OpenBSD: v831.c,v 1.7 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
/*
diff --git a/usr.bin/tip/aculib/ventel.c b/usr.bin/tip/aculib/ventel.c
index 48035c177d2..54ed6873f89 100644
--- a/usr.bin/tip/aculib/ventel.c
+++ b/usr.bin/tip/aculib/ventel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ventel.c,v 1.7 2001/11/19 19:02:16 mpech Exp $ */
+/* $OpenBSD: ventel.c,v 1.8 2002/05/07 06:56:50 hugh Exp $ */
/* $NetBSD: ventel.c,v 1.6 1997/02/11 09:24:21 mrg Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)ventel.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: ventel.c,v 1.7 2001/11/19 19:02:16 mpech Exp $";
+static const char rcsid[] = "$OpenBSD: ventel.c,v 1.8 2002/05/07 06:56:50 hugh Exp $";
#endif /* not lint */
/*
@@ -57,6 +57,7 @@ static jmp_buf timeoutbuf;
static int gobble(), vensync();
static void echo();
+void ven_disconnect();
/*
* some sleep calls have been replaced by this macro
@@ -120,7 +121,7 @@ ven_dialer(num, acu)
cp = strchr(line, '\r');
if (cp)
*cp = '\0';
- for (cp = line; cp = strchr(cp, ' '); cp++)
+ for (cp = line; (cp = strchr(cp, ' ')) != NULL; cp++)
if (cp[1] == ' ')
break;
if (cp) {
@@ -158,22 +159,22 @@ echo(s)
{
char c;
- while (c = *s++) switch (c) {
-
- case '$':
- read(FD, &c, 1);
- s++;
- break;
+ while ((c = *s++) != NULL)
+ switch (c) {
+ case '$':
+ read(FD, &c, 1);
+ s++;
+ break;
- case '#':
- c = *s++;
- write(FD, &c, 1);
- break;
+ case '#':
+ c = *s++;
+ write(FD, &c, 1);
+ break;
- default:
- write(FD, &c, 1);
- read(FD, &c, 1);
- }
+ default:
+ write(FD, &c, 1);
+ read(FD, &c, 1);
+ }
}
static void