aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tip
diff options
context:
space:
mode:
authorBrian S. Dean <bsd@FreeBSD.org>2000-03-15 15:01:04 +0000
committerBrian S. Dean <bsd@FreeBSD.org>2000-03-15 15:01:04 +0000
commitdcb3b3ca6b54ff7fdd44b141b1060a4ebbf29f18 (patch)
treede3a3a605b6aa3e1fb5cb89bf9bce6fd03bc8055 /usr.bin/tip
parent1d013a86edb866de00bf57761c845388c8d9a467 (diff)
Notes
Diffstat (limited to 'usr.bin/tip')
-rw-r--r--usr.bin/tip/tip/cmds.c20
-rw-r--r--usr.bin/tip/tip/tip.110
2 files changed, 26 insertions, 4 deletions
diff --git a/usr.bin/tip/tip/cmds.c b/usr.bin/tip/tip/cmds.c
index 5e827e6d8511b..ec57346b59066 100644
--- a/usr.bin/tip/tip/cmds.c
+++ b/usr.bin/tip/tip/cmds.c
@@ -48,6 +48,7 @@ static const char rcsid[] =
#include <err.h>
#include <libutil.h>
#include <stdio.h>
+#include <unistd.h>
/*
* tip
@@ -560,6 +561,21 @@ cu_put(cc)
transmit(fd, "\04", line);
}
+
+static int
+nap(msec)
+ int msec; /* milliseconds */
+{
+ if (usleep(msec*1000) != 0) {
+ fprintf ( stderr, "warning: ldelay or cdelay interrupted, "
+ "delay time cut short: %s\n",
+ strerror(errno) );
+ }
+
+ return 0;
+}
+
+
/*
* FTP - send single character
* wait for echo & handle timeout
@@ -573,15 +589,11 @@ send(c)
cc = c;
xpwrite(FD, &cc, 1);
-#ifdef notdef
if (number(value(CDELAY)) > 0 && c != '\r')
nap(number(value(CDELAY)));
-#endif
if (!boolean(value(ECHOCHECK))) {
-#ifdef notdef
if (number(value(LDELAY)) > 0 && c == '\r')
nap(number(value(LDELAY)));
-#endif
return;
}
tryagain:
diff --git a/usr.bin/tip/tip/tip.1 b/usr.bin/tip/tip/tip.1
index a9c083d6a0daf..8699cc0765418 100644
--- a/usr.bin/tip/tip/tip.1
+++ b/usr.bin/tip/tip/tip.1
@@ -269,6 +269,11 @@ abbreviated
(num) The baud rate at which the connection was established;
abbreviated
.Ar ba .
+.It Ar chardelay
+(num) Number of milliseconds to delay after the transmission of
+each character;
+abbreviated
+.Ar cdelay .
.It Ar dialtimeout
(num) When dialing a phone number, the time (in seconds)
to wait for a connection to be established; abbreviated
@@ -310,6 +315,11 @@ writes when receiving files; abbreviated
.It Ar host
(str) The name of the host to which you are connected; abbreviated
.Ar ho .
+.It Ar linedelay
+(num) Number of milliseconds to delay after the transmission of
+each line;
+abbreviated
+.Ar ldelay .
.It Ar login
(str) Pathname of a login shell script to run once connected; standard input
and output are redirected to the remote host.