Module Name: src
Committed By: roy
Date: Wed Oct 5 10:48:54 UTC 2011
Modified Files:
src/usr.bin/telnet: Makefile telnet.c
Log Message:
Use terminfo and the non-standard ttytype rather than termcap.
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/usr.bin/telnet/Makefile
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/telnet/telnet.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/telnet/Makefile
diff -u src/usr.bin/telnet/Makefile:1.47 src/usr.bin/telnet/Makefile:1.48
--- src/usr.bin/telnet/Makefile:1.47 Mon Jun 20 07:44:01 2011
+++ src/usr.bin/telnet/Makefile Wed Oct 5 10:48:54 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2011/06/20 07:44:01 mrg Exp $
+# $NetBSD: Makefile,v 1.48 2011/10/05 10:48:54 roy Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -43,7 +43,7 @@ USE_FORT?= yes # network client
PROG= telnet
-CPPFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK
+CPPFLAGS+=-DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK
CPPFLAGS+=-I${.CURDIR}
LDADD+= -lterminfo ${LIBTELNETDIR}/libtelnet.a
Index: src/usr.bin/telnet/telnet.c
diff -u src/usr.bin/telnet/telnet.c:1.31 src/usr.bin/telnet/telnet.c:1.32
--- src/usr.bin/telnet/telnet.c:1.31 Thu Feb 2 19:33:12 2006
+++ src/usr.bin/telnet/telnet.c Wed Oct 5 10:48:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: telnet.c,v 1.31 2006/02/02 19:33:12 he Exp $ */
+/* $NetBSD: telnet.c,v 1.32 2011/10/05 10:48:54 roy Exp $ */
/*
* Copyright (c) 1988, 1990, 1993
@@ -34,14 +34,14 @@
#if 0
static char sccsid[] = "@(#)telnet.c 8.4 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: telnet.c,v 1.31 2006/02/02 19:33:12 he Exp $");
+__RCSID("$NetBSD: telnet.c,v 1.32 2011/10/05 10:48:54 roy Exp $");
#endif
#endif /* not lint */
#include <sys/param.h>
#include <signal.h>
-#include <termcap.h>
+#include <term.h>
#include <unistd.h>
/* By the way, we need to include curses.h before telnet.h since,
* among other things, telnet.h #defines 'DO', which is a variable
@@ -66,7 +66,6 @@ __RCSID("$NetBSD: telnet.c,v 1.31 2006/0
#include <libtelnet/encrypt.h>
#endif
-
#define strip(x) ((my_want_state_is_wont(TELOPT_BINARY)) ? ((x)&0x7f) : (x))
static unsigned char subbuffer[SUBBUFSIZE],
@@ -750,7 +749,7 @@ char *termbuf;
/*ARGSUSED*/
int
-setup_term(char *tname, int fd, int *errp)
+setupterm(char *tname, int fd, int *errp)
{
char zz[1024], *zz_ptr;
char *ext_tc, *newptr;
@@ -803,7 +802,7 @@ gettermname(void)
if (tnamep && tnamep != unknown)
free(tnamep);
if ((tname = (char *)env_getvalue((unsigned char *)"TERM")) &&
- (setup_term(tname, 1, &err) == 0)) {
+ (setupterm(tname, 1, &err) == 0)) {
tnamep = mklist(termbuf, tname);
} else {
if (tname && ((int)strlen(tname) <= 40)) {