pull the following change from OpenBSD
and bump date of the manpage. date: 2003/09/20 18:15:32; author: millert; state: Exp; lines: +4 -2 Implement hardwareflow varable in tip(1) like Solaris and hf in /etc/remote. Based on PR 3411 from Matthew Gream Also document "tandem" variable (XON/XOFF) in tip man page.
This commit is contained in:
parent
c002406624
commit
01ef02441c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cmds.c,v 1.16 2004/04/23 22:11:44 christos Exp $ */
|
||||
/* $NetBSD: cmds.c,v 1.17 2006/03/29 12:37:59 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cmds.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: cmds.c,v 1.16 2004/04/23 22:11:44 christos Exp $");
|
||||
__RCSID("$NetBSD: cmds.c,v 1.17 2006/03/29 12:37:59 yamt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "tip.h"
|
||||
@ -804,6 +804,13 @@ variable(dummy)
|
||||
vtable[PARITY].v_access &= ~CHANGED;
|
||||
setparity(NULL); /* XXX what is the correct arg? */
|
||||
}
|
||||
if (vtable[HARDWAREFLOW].v_access&CHANGED) {
|
||||
vtable[HARDWAREFLOW].v_access &= ~CHANGED;
|
||||
if (boolean(value(HARDWAREFLOW)))
|
||||
hardwareflow("on");
|
||||
else
|
||||
hardwareflow("off");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -827,6 +834,23 @@ tandem(option)
|
||||
tcsetattr(0, TCSADRAIN, &term);
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn hardware flow control on or off for remote tty.
|
||||
*/
|
||||
void
|
||||
hardwareflow(option)
|
||||
const char *option;
|
||||
{
|
||||
struct termios rmtty;
|
||||
|
||||
tcgetattr(FD, &rmtty);
|
||||
if (strcmp(option, "on") == 0)
|
||||
rmtty.c_iflag |= CRTSCTS;
|
||||
else
|
||||
rmtty.c_iflag &= ~CRTSCTS;
|
||||
tcsetattr(FD, TCSADRAIN, &rmtty);
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a break.
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: remote.c,v 1.11 2004/04/23 22:24:34 christos Exp $ */
|
||||
/* $NetBSD: remote.c,v 1.12 2006/03/29 12:37:59 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)remote.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: remote.c,v 1.11 2004/04/23 22:24:34 christos Exp $");
|
||||
__RCSID("$NetBSD: remote.c,v 1.12 2006/03/29 12:37:59 yamt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "pathnames.h"
|
||||
@ -177,6 +177,8 @@ getremcap(host)
|
||||
setboolean(value(HALFDUPLEX), 1);
|
||||
if (cgetflag("dc"))
|
||||
DC = 1;
|
||||
if (cgetflag("hf"))
|
||||
setboolean(value(HARDWAREFLOW), 1);
|
||||
if (RE == NULL)
|
||||
RE = tiprecord;
|
||||
if (EX == NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: tip.1,v 1.21 2004/05/09 18:59:52 snj Exp $
|
||||
.\" $NetBSD: tip.1,v 1.22 2006/03/29 12:37:59 yamt Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
.\"
|
||||
.\" @(#)tip.1 8.4 (Berkeley) 4/18/94
|
||||
.\"
|
||||
.Dd April 18, 1994
|
||||
.Dd March 29, 2006
|
||||
.Dt TIP 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -405,6 +405,18 @@ beautification rules.
|
||||
default value is
|
||||
.Ar false .
|
||||
Each tab is expanded to 8 spaces.
|
||||
.It Ar tandem
|
||||
(bool) Use XON/XOFF flow control to throttle data from the remote host;
|
||||
abbreviated
|
||||
.Ar ta .
|
||||
The default value is
|
||||
.Ar true
|
||||
unless the
|
||||
.Ar nt
|
||||
capability has been specified in
|
||||
.Pa /etc/remote ,
|
||||
in which case the default value is
|
||||
.Ar false.
|
||||
.It Ar verbose
|
||||
(bool) Verbose mode; abbreviated
|
||||
.Ar verb ;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tip.c,v 1.28 2004/11/04 07:29:09 dsl Exp $ */
|
||||
/* $NetBSD: tip.c,v 1.29 2006/03/29 12:37:59 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: tip.c,v 1.28 2004/11/04 07:29:09 dsl Exp $");
|
||||
__RCSID("$NetBSD: tip.c,v 1.29 2006/03/29 12:37:59 yamt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -553,6 +553,8 @@ ttysetup(spd)
|
||||
cntrl.c_cflag |= CS8;
|
||||
if (DC)
|
||||
cntrl.c_cflag |= CLOCAL;
|
||||
if (boolean(value(HARDWAREFLOW)))
|
||||
cntrl.c_cflag |= CRTSCTS;
|
||||
cntrl.c_iflag &= ~(ISTRIP|ICRNL);
|
||||
cntrl.c_oflag &= ~OPOST;
|
||||
cntrl.c_lflag &= ~(ICANON|ISIG|IEXTEN|ECHO);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tip.h,v 1.16 2004/04/23 22:11:44 christos Exp $ */
|
||||
/* $NetBSD: tip.h,v 1.17 2006/03/29 12:37:59 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -231,6 +231,7 @@ extern value_t vtable[]; /* variable table */
|
||||
#define HALFDUPLEX 30
|
||||
#define LECHO 31
|
||||
#define PARITY 32
|
||||
#define HARDWAREFLOW 33
|
||||
|
||||
struct termios term; /* current mode of terminal */
|
||||
struct termios defterm; /* initial mode of terminal */
|
||||
@ -286,6 +287,7 @@ void finish __P((char));
|
||||
void genbrk __P((char));
|
||||
void getfl __P((char));
|
||||
char *getremote __P((char *));
|
||||
void hardwareflow __P((const char *));
|
||||
void help __P((char));
|
||||
int hunt __P((char *));
|
||||
char *interp __P((const char *));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vars.c,v 1.7 2004/04/23 22:11:44 christos Exp $ */
|
||||
/* $NetBSD: vars.c,v 1.8 2006/03/29 12:37:59 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -34,7 +34,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)vars.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: vars.c,v 1.7 2004/04/23 22:11:44 christos Exp $");
|
||||
__RCSID("$NetBSD: vars.c,v 1.8 2006/03/29 12:37:59 yamt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "tip.h"
|
||||
@ -112,5 +112,7 @@ value_t vtable[] = {
|
||||
"le", (char *)FALSE },
|
||||
{ "parity", STRING|INIT|IREMOTE, (READ|WRITE)<<PUBLIC,
|
||||
"par", (char *)&PA },
|
||||
{ "hardwareflow", BOOL, (READ|WRITE)<<PUBLIC,
|
||||
"hf", (char *)FALSE },
|
||||
{ NULL, 0, 0, NULL, NULL }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user