summaryrefslogtreecommitdiffstats
path: root/usr.bin/tip
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2001-07-26 11:02:39 +0000
committersheldonh <sheldonh@FreeBSD.org>2001-07-26 11:02:39 +0000
commit9bfb9eedcddf3ab4e79532e863cf16c5ff381090 (patch)
treebd2ac2627dbeab7d3427432bb98d2c73085b61c1 /usr.bin/tip
parent505859f37d54f23b1ebc688851be182d4e1332c8 (diff)
downloadFreeBSD-src-9bfb9eedcddf3ab4e79532e863cf16c5ff381090.zip
FreeBSD-src-9bfb9eedcddf3ab4e79532e863cf16c5ff381090.tar.gz
Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill <david@phobia.ms>
Diffstat (limited to 'usr.bin/tip')
-rw-r--r--usr.bin/tip/libacu/courier.c10
-rw-r--r--usr.bin/tip/libacu/multitech.c8
-rw-r--r--usr.bin/tip/libacu/t3000.c10
-rw-r--r--usr.bin/tip/libacu/unidialer.c3
-rw-r--r--usr.bin/tip/tip/remcap.c16
-rw-r--r--usr.bin/tip/tip/tipout.c3
6 files changed, 30 insertions, 20 deletions
diff --git a/usr.bin/tip/libacu/courier.c b/usr.bin/tip/libacu/courier.c
index 84c710f..df19573 100644
--- a/usr.bin/tip/libacu/courier.c
+++ b/usr.bin/tip/libacu/courier.c
@@ -32,8 +32,9 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)courier.c 8.1 (Berkeley) 6/6/93";
-#endif /* not lint */
+static const char rcsid[] =
+ "$FreeBSD$";
+#endif
/*
* Routines for calling up on a Courier modem.
@@ -43,6 +44,7 @@ static char sccsid[] = "@(#)courier.c 8.1 (Berkeley) 6/6/93";
#include "tip.h"
#include "acucommon.h"
#include <stdio.h>
+#include <unistd.h>
#define MAXRETRY 5
@@ -299,7 +301,7 @@ int n;
{
#ifdef notdef
if (boolean(value(VERBOSE)))
- write(1, cp, n);
+ write(STDOUT_FILENO, cp, n);
#endif
acu_flush ();
cour_nap();
@@ -322,7 +324,7 @@ cour_verbose_read()
return;
if (read(FD, buf, n) != n)
return;
- write(1, buf, n);
+ write(STDOUT_FILENO, buf, n);
}
#endif
diff --git a/usr.bin/tip/libacu/multitech.c b/usr.bin/tip/libacu/multitech.c
index 2eea101..2c3b2d9 100644
--- a/usr.bin/tip/libacu/multitech.c
+++ b/usr.bin/tip/libacu/multitech.c
@@ -32,8 +32,9 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)multitech.c 8.1 (Berkeley) 6/6/93";
-#endif /* not lint */
+static const char rcsid[] =
+ "$FreeBSD$";
+#endif
/*
* Routines for calling up on a Courier modem.
@@ -44,6 +45,7 @@ static char sccsid[] = "@(#)multitech.c 8.1 (Berkeley) 6/6/93";
#include "acucommon.h"
#include <stdio.h>
+#include <unistd.h>
/* #define DEBUG */
#define MAXRETRY 5
@@ -395,7 +397,7 @@ multitech_verbose_read()
return;
if (read(FD, buf, n) != n)
return;
- write(1, buf, n);
+ write(STDOUT_FILENO, buf, n);
}
#endif
diff --git a/usr.bin/tip/libacu/t3000.c b/usr.bin/tip/libacu/t3000.c
index 1c9f472..b8caafe 100644
--- a/usr.bin/tip/libacu/t3000.c
+++ b/usr.bin/tip/libacu/t3000.c
@@ -32,8 +32,9 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)t3000.c 8.1 (Berkeley) 6/6/93";
-#endif /* not lint */
+static const char rcsid[] =
+ "$FreeBSD$";
+#endif
/*
* Routines for calling up on a Telebit T3000 modem.
@@ -43,6 +44,7 @@ static char sccsid[] = "@(#)t3000.c 8.1 (Berkeley) 6/6/93";
#include "tip.h"
#include "acucommon.h"
#include <stdio.h>
+#include <unistd.h>
#define MAXRETRY 5
@@ -315,7 +317,7 @@ int n;
{
#ifdef notdef
if (boolean(value(VERBOSE)))
- write(1, cp, n);
+ write(STDOUT_FILENO, cp, n);
#endif
acu_flush ();
t3000_nap();
@@ -338,7 +340,7 @@ t3000_verbose_read()
return;
if (read(FD, buf, n) != n)
return;
- write(1, buf, n);
+ write(STDOUT_FILENO, buf, n);
}
#endif
diff --git a/usr.bin/tip/libacu/unidialer.c b/usr.bin/tip/libacu/unidialer.c
index 0206571..6fcec2f 100644
--- a/usr.bin/tip/libacu/unidialer.c
+++ b/usr.bin/tip/libacu/unidialer.c
@@ -53,6 +53,7 @@ static const char rcsid[] =
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include "acucommon.h"
#include "tod.h"
@@ -798,7 +799,7 @@ static void unidialer_verbose_read()
return;
if (read(FD, buf, n) != n)
return;
- write(1, buf, n);
+ write(STDOUT_FILENO, buf, n);
}
#endif
diff --git a/usr.bin/tip/tip/remcap.c b/usr.bin/tip/tip/remcap.c
index 7a7e0c2..5a0e791 100644
--- a/usr.bin/tip/tip/remcap.c
+++ b/usr.bin/tip/tip/remcap.c
@@ -32,8 +32,9 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)remcap.c 8.1 (Berkeley) 6/6/93";
-#endif /* not lint */
+static const char rcsid[] =
+ "$FreeBSD$";
+#endif
/*
* remcap - routines for dealing with the remote host data base
@@ -44,6 +45,7 @@ static char sccsid[] = "@(#)remcap.c 8.1 (Berkeley) 6/6/93";
#include <fcntl.h>
#include <ctype.h>
#include <stdlib.h>
+#include <unistd.h>
#include "pathnames.h"
#ifndef BUFSIZ
@@ -112,7 +114,7 @@ tgetent(bp, name)
while (*p++ != ':')
;
if (strlen(bp) + strlen(p) > BUFSIZ) {
- write(2, "Remcap entry too long\n", 23);
+ write(STDERR_FILENO, "Remcap entry too long\n", 23);
return (-1);
}
strcat(bp, p);
@@ -174,7 +176,7 @@ getent(bp, name, cp)
break;
}
if (cp >= bp+BUFSIZ) {
- write(2,"Remcap entry too long\n", 23);
+ write(STDERR_FILENO, "Remcap entry too long\n", 23);
break;
} else
*cp++ = c;
@@ -210,7 +212,7 @@ tnchktc()
p = tbuf + strlen(tbuf) - 2; /* before the last colon */
while (*--p != ':')
if (p<tbuf) {
- write(2, "Bad remcap entry\n", 18);
+ write(STDERR_FILENO, "Bad remcap entry\n", 18);
return (0);
}
p++;
@@ -223,7 +225,7 @@ tnchktc()
q++;
*q = 0;
if (++hopcount > MAXHOP) {
- write(2, "Infinite tc= loop\n", 18);
+ write(STDERR_FILENO, "Infinite tc= loop\n", 18);
return (0);
}
if (getent(tcbuf, tcname, remotefile) != 1) {
@@ -236,7 +238,7 @@ tnchktc()
;
l = p - holdtbuf + strlen(q);
if (l > BUFSIZ) {
- write(2, "Remcap entry too long\n", 23);
+ write(STDERR_FILENO, "Remcap entry too long\n", 23);
q[BUFSIZ - (p-holdtbuf)] = 0;
}
strcpy(p, q);
diff --git a/usr.bin/tip/tip/tipout.c b/usr.bin/tip/tip/tipout.c
index 67932f6..ac40ec7 100644
--- a/usr.bin/tip/tip/tipout.c
+++ b/usr.bin/tip/tip/tipout.c
@@ -41,6 +41,7 @@ static const char rcsid[] =
#include "tip.h"
#include <errno.h>
+#include <unistd.h>
/*
* tip
*
@@ -160,7 +161,7 @@ tipout()
omask = sigblock(ALLSIGS);
for (cp = buf; cp < buf + cnt; cp++)
*cp &= 0177;
- if (write(1, buf, cnt) < 0)
+ if (write(STDOUT_FILENO, buf, cnt) < 0)
exit(1);
if (boolean(value(SCRIPT)) && fscript != NULL) {
if (!boolean(value(BEAUTIFY))) {
OpenPOWER on IntegriCloud