Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/telnet Use terminfo and the non-standard ttytype rat...
details: https://anonhg.NetBSD.org/src/rev/854cde233a0d
branches: trunk
changeset: 770137:854cde233a0d
user: roy <roy%NetBSD.org@localhost>
date: Wed Oct 05 10:48:54 2011 +0000
description:
Use terminfo and the non-standard ttytype rather than termcap.
diffstat:
usr.bin/telnet/Makefile | 4 ++--
usr.bin/telnet/telnet.c | 11 +++++------
2 files changed, 7 insertions(+), 8 deletions(-)
diffs (70 lines):
diff -r 47f633a0d658 -r 854cde233a0d usr.bin/telnet/Makefile
--- a/usr.bin/telnet/Makefile Wed Oct 05 10:46:08 2011 +0000
+++ b/usr.bin/telnet/Makefile Wed Oct 05 10:48:54 2011 +0000
@@ -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 @@
PROG= telnet
-CPPFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK
+CPPFLAGS+=-DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK
CPPFLAGS+=-I${.CURDIR}
LDADD+= -lterminfo ${LIBTELNETDIR}/libtelnet.a
diff -r 47f633a0d658 -r 854cde233a0d usr.bin/telnet/telnet.c
--- a/usr.bin/telnet/telnet.c Wed Oct 05 10:46:08 2011 +0000
+++ b/usr.bin/telnet/telnet.c Wed Oct 05 10:48:54 2011 +0000
@@ -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 @@
#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 @@
/*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 @@
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)) {
Home |
Main Index |
Thread Index |
Old Index