aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tcp.c24
-rw-r--r--tcp.h1
2 files changed, 0 insertions, 25 deletions
diff --git a/tcp.c b/tcp.c
index 2cca739..5bf09cc 100644
--- a/tcp.c
+++ b/tcp.c
@@ -280,30 +280,6 @@ static int tcp_addIAC __P3 (char *,dest, char *,txt, int,len)
}
/*
- * read from an fd, protecting ASCII 255 as IAC IAC while we read.
- * the buffer is assumed to be big enough to hold the whole file
- */
-int tcp_read_addIAC __P3 (int,fd, char *,data, int,len)
-{
- char *s = data;
- char buf[BUFSIZE];
- int i;
-
- while (len > 0) {
- while ((i = read(fd, buf, MIN2(len, BUFSIZE))) < 0 && errno == EINTR)
- ;
- if (i < 0) {
- errmsg("read from file");
- return -1;
- } else if (i == 0)
- break;
- s += tcp_addIAC(s, buf, i);
- len -= i;
- }
- return s - data;
-}
-
-/*
* read a maximum of size chars from remote host
* using the telnet protocol. return chars read.
*/
diff --git a/tcp.h b/tcp.h
index 56389b9..8fbec30 100644
--- a/tcp.h
+++ b/tcp.h
@@ -73,7 +73,6 @@ void tcp_close __P ((char *id));
void tcp_togglesnoop __P ((char *id));
void tcp_spawn __P ((char *id, char *cmd));
int tcp_unIAC __P ((char *data, int len));
-int tcp_read_addIAC __P ((int fd, char *data, int len));
#endif /* _TCP_H_ */