Make emitting the full termcap entry an option otherwise csh breaks.
This commit is contained in:
parent
8d5520dccf
commit
8500b4e751
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.7 1999/10/04 23:33:24 lukem Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.8 2000/05/31 05:50:05 blymn Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -45,7 +45,7 @@ extern int erasechar, intrchar, killchar;
|
|||
|
||||
void add_mapping __P((const char *, char *));
|
||||
void cat __P((char *));
|
||||
const char *get_termcap_entry __P((const char *, char **));
|
||||
const char *get_termcap_entry __P((const char *, char **, int));
|
||||
const char *mapped __P((const char *));
|
||||
int outc __P((int));
|
||||
void reset_mode __P((void));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: term.c,v 1.13 2000/05/25 12:53:55 blymn Exp $ */
|
||||
/* $NetBSD: term.c,v 1.14 2000/05/31 05:50:06 blymn Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)term.c 8.1 (Berkeley) 6/9/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: term.c,v 1.13 2000/05/25 12:53:55 blymn Exp $");
|
||||
__RCSID("$NetBSD: term.c,v 1.14 2000/05/31 05:50:06 blymn Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -62,9 +62,10 @@ char *ttys __P((char *));
|
|||
* its termcap entry.
|
||||
*/
|
||||
const char *
|
||||
get_termcap_entry(userarg, tcapbufp)
|
||||
get_termcap_entry(userarg, tcapbufp, extended)
|
||||
const char *userarg;
|
||||
char **tcapbufp;
|
||||
int extended;
|
||||
{
|
||||
struct ttyent *t;
|
||||
int rval;
|
||||
|
@ -134,10 +135,10 @@ found: if ((p = getenv("TERMCAP")) != NULL && *p != '/')
|
|||
}
|
||||
|
||||
/* check if we get a truncated termcap entry, fish back the full
|
||||
* one if need be
|
||||
* one if need be and the user has asked for it.
|
||||
*/
|
||||
zz_ptr = zz;
|
||||
if (tgetstr("ZZ", &zz_ptr) != NULL) {
|
||||
if ((extended == 1) && (tgetstr("ZZ", &zz_ptr) != NULL)) {
|
||||
/* it was, fish back the full termcap */
|
||||
sscanf(zz, "%p", &ext_tc);
|
||||
if ((newptr = (char *) realloc(tbuf, strlen(ext_tc) + 1))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: tset.1,v 1.9 1999/03/22 18:16:45 garbled Exp $
|
||||
.\" $NetBSD: tset.1,v 1.10 2000/05/31 05:50:06 blymn Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1985, 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -42,7 +42,7 @@
|
|||
.Nd terminal initialization
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl IQrSs
|
||||
.Op Fl EIQrSs
|
||||
.Op Fl
|
||||
.Op Fl e Ar ch
|
||||
.Op Fl i Ar ch
|
||||
|
@ -51,7 +51,7 @@
|
|||
.Op Ar terminal
|
||||
.br
|
||||
.Nm reset
|
||||
.Op Fl IQrSs
|
||||
.Op Fl EIQrSs
|
||||
.Op Fl
|
||||
.Op Fl e Ar ch
|
||||
.Op Fl i Ar ch
|
||||
|
@ -123,6 +123,11 @@ not initialized in any way.
|
|||
.It Fl e
|
||||
Set the erase character to
|
||||
.Ar ch .
|
||||
.It Fl E
|
||||
Emit the extended termcap entry. By default the termcap entry is
|
||||
truncated to 1024 bytes, this flag specifies the untruncated termcap
|
||||
entry is to be output. Using this flag may cause problems with some
|
||||
shells.
|
||||
.It Fl I
|
||||
Do not send the terminal or tab initialization strings to the terminal.
|
||||
.It Fl i
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tset.c,v 1.9 1999/12/20 14:36:11 kleink Exp $ */
|
||||
/* $NetBSD: tset.c,v 1.10 2000/05/31 05:50:06 blymn Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993
|
||||
|
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993\n\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)tset.c 8.1 (Berkeley) 6/9/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: tset.c,v 1.9 1999/12/20 14:36:11 kleink Exp $");
|
||||
__RCSID("$NetBSD: tset.c,v 1.10 2000/05/31 05:50:06 blymn Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -80,7 +80,8 @@ main(argc, argv)
|
|||
#ifdef TIOCGWINSZ
|
||||
struct winsize win;
|
||||
#endif
|
||||
int ch, noinit, noset, quiet, Sflag, sflag, showterm, usingupper;
|
||||
int ch, extended, noinit, noset, quiet, Sflag, sflag, showterm;
|
||||
int usingupper;
|
||||
char savech, *p, *t, *tcapbuf;
|
||||
const char *ttype;
|
||||
|
||||
|
@ -101,8 +102,8 @@ main(argc, argv)
|
|||
}
|
||||
|
||||
obsolete(argv);
|
||||
noinit = noset = quiet = Sflag = sflag = showterm = 0;
|
||||
while ((ch = getopt(argc, argv, "-a:d:e:Ii:k:m:np:QSrs")) != -1) {
|
||||
noinit = noset = quiet = Sflag = sflag = showterm = extended = 0;
|
||||
while ((ch = getopt(argc, argv, "-a:d:e:EIi:k:m:np:QSrs")) != -1) {
|
||||
switch (ch) {
|
||||
case '-': /* display term only */
|
||||
noset = 1;
|
||||
|
@ -118,6 +119,9 @@ main(argc, argv)
|
|||
optarg[1] == '?' ? '\177' : CTRL(optarg[1]) :
|
||||
optarg[0];
|
||||
break;
|
||||
case 'E':
|
||||
extended = 1;
|
||||
break;
|
||||
case 'I': /* no initialization strings */
|
||||
noinit = 1;
|
||||
break;
|
||||
|
@ -162,7 +166,7 @@ main(argc, argv)
|
|||
if (argc > 1)
|
||||
usage();
|
||||
|
||||
ttype = get_termcap_entry(*argv, &tcapbuf);
|
||||
ttype = get_termcap_entry(*argv, &tcapbuf, extended);
|
||||
|
||||
if (!noset) {
|
||||
columns = tgetnum("co");
|
||||
|
|
Loading…
Reference in New Issue