Obtained from: partly from ancient patches of mine via 1.1.5
Move static termioschars() from a couple of drivers to tty.c. Now there is only one copy of ttydefchars[].
This commit is contained in:
parent
6644e30617
commit
2ce42987d3
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.7 1995/05/30 08:01:34 rgrimes Exp $
|
||||
* $Id: cy.c,v 1.8 1995/07/05 12:15:52 bde Exp $
|
||||
*/
|
||||
|
||||
#include "cy.h"
|
||||
@ -75,9 +75,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/ioctl.h>
|
||||
#define TTYDEFCHARS /* XXX TK2.0 */
|
||||
#include <sys/tty.h>
|
||||
#undef TTYDEFCHARS
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
@ -159,14 +157,6 @@
|
||||
#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq)
|
||||
#define TSA_OCOMPLETE(tp) ((void *)&(tp)->t_outq)
|
||||
#define TSA_OLOWAT(tp) ((void *)&(tp)->t_outq)
|
||||
static void termioschars __P((struct termios *t));
|
||||
static void
|
||||
termioschars(t)
|
||||
struct termios *t;
|
||||
{
|
||||
|
||||
bcopy(ttydefchars, t->c_cc, sizeof t->c_cc);
|
||||
}
|
||||
|
||||
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
|
||||
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
|
||||
|
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.7 1995/05/30 08:01:34 rgrimes Exp $
|
||||
* $Id: cy.c,v 1.8 1995/07/05 12:15:52 bde Exp $
|
||||
*/
|
||||
|
||||
#include "cy.h"
|
||||
@ -75,9 +75,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/ioctl.h>
|
||||
#define TTYDEFCHARS /* XXX TK2.0 */
|
||||
#include <sys/tty.h>
|
||||
#undef TTYDEFCHARS
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
@ -159,14 +157,6 @@
|
||||
#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq)
|
||||
#define TSA_OCOMPLETE(tp) ((void *)&(tp)->t_outq)
|
||||
#define TSA_OLOWAT(tp) ((void *)&(tp)->t_outq)
|
||||
static void termioschars __P((struct termios *t));
|
||||
static void
|
||||
termioschars(t)
|
||||
struct termios *t;
|
||||
{
|
||||
|
||||
bcopy(ttydefchars, t->c_cc, sizeof t->c_cc);
|
||||
}
|
||||
|
||||
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
|
||||
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.101 1995/06/28 17:58:14 ache Exp $
|
||||
* $Id: sio.c,v 1.102 1995/07/05 14:30:07 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sio.h"
|
||||
@ -46,9 +46,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/ioctl.h>
|
||||
#define TTYDEFCHARS /* XXX TK2.0 */
|
||||
#include <sys/tty.h>
|
||||
#undef TTYDEFCHARS
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
@ -74,14 +72,6 @@
|
||||
#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq)
|
||||
#define TSA_OCOMPLETE(tp) ((void *)&(tp)->t_outq)
|
||||
#define TSA_OLOWAT(tp) ((void *)&(tp)->t_outq)
|
||||
static void termioschars __P((struct termios *t));
|
||||
static void
|
||||
termioschars(t)
|
||||
struct termios *t;
|
||||
{
|
||||
|
||||
bcopy(ttydefchars, t->c_cc, sizeof t->c_cc);
|
||||
}
|
||||
|
||||
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
|
||||
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
|
||||
|
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.7 1995/05/30 08:01:34 rgrimes Exp $
|
||||
* $Id: cy.c,v 1.8 1995/07/05 12:15:52 bde Exp $
|
||||
*/
|
||||
|
||||
#include "cy.h"
|
||||
@ -75,9 +75,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/ioctl.h>
|
||||
#define TTYDEFCHARS /* XXX TK2.0 */
|
||||
#include <sys/tty.h>
|
||||
#undef TTYDEFCHARS
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
@ -159,14 +157,6 @@
|
||||
#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq)
|
||||
#define TSA_OCOMPLETE(tp) ((void *)&(tp)->t_outq)
|
||||
#define TSA_OLOWAT(tp) ((void *)&(tp)->t_outq)
|
||||
static void termioschars __P((struct termios *t));
|
||||
static void
|
||||
termioschars(t)
|
||||
struct termios *t;
|
||||
{
|
||||
|
||||
bcopy(ttydefchars, t->c_cc, sizeof t->c_cc);
|
||||
}
|
||||
|
||||
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
|
||||
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.101 1995/06/28 17:58:14 ache Exp $
|
||||
* $Id: sio.c,v 1.102 1995/07/05 14:30:07 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sio.h"
|
||||
@ -46,9 +46,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/ioctl.h>
|
||||
#define TTYDEFCHARS /* XXX TK2.0 */
|
||||
#include <sys/tty.h>
|
||||
#undef TTYDEFCHARS
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
@ -74,14 +72,6 @@
|
||||
#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq)
|
||||
#define TSA_OCOMPLETE(tp) ((void *)&(tp)->t_outq)
|
||||
#define TSA_OLOWAT(tp) ((void *)&(tp)->t_outq)
|
||||
static void termioschars __P((struct termios *t));
|
||||
static void
|
||||
termioschars(t)
|
||||
struct termios *t;
|
||||
{
|
||||
|
||||
bcopy(ttydefchars, t->c_cc, sizeof t->c_cc);
|
||||
}
|
||||
|
||||
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
|
||||
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.101 1995/06/28 17:58:14 ache Exp $
|
||||
* $Id: sio.c,v 1.102 1995/07/05 14:30:07 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sio.h"
|
||||
@ -46,9 +46,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/ioctl.h>
|
||||
#define TTYDEFCHARS /* XXX TK2.0 */
|
||||
#include <sys/tty.h>
|
||||
#undef TTYDEFCHARS
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/conf.h>
|
||||
@ -74,14 +72,6 @@
|
||||
#define TSA_CARR_ON(tp) ((void *)&(tp)->t_rawq)
|
||||
#define TSA_OCOMPLETE(tp) ((void *)&(tp)->t_outq)
|
||||
#define TSA_OLOWAT(tp) ((void *)&(tp)->t_outq)
|
||||
static void termioschars __P((struct termios *t));
|
||||
static void
|
||||
termioschars(t)
|
||||
struct termios *t;
|
||||
{
|
||||
|
||||
bcopy(ttydefchars, t->c_cc, sizeof t->c_cc);
|
||||
}
|
||||
|
||||
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
|
||||
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty.c 8.8 (Berkeley) 1/21/94
|
||||
* $Id: tty.c,v 1.53 1995/07/21 17:30:12 bde Exp $
|
||||
* $Id: tty.c,v 1.54 1995/07/21 20:52:38 bde Exp $
|
||||
*/
|
||||
|
||||
/*-
|
||||
@ -1157,11 +1157,22 @@ ttyflush(tp, rw)
|
||||
* Copy in the default termios characters.
|
||||
*/
|
||||
void
|
||||
termioschars(t)
|
||||
struct termios *t;
|
||||
{
|
||||
|
||||
bcopy(ttydefchars, t->c_cc, sizeof t->c_cc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Old interface.
|
||||
*/
|
||||
void
|
||||
ttychars(tp)
|
||||
struct tty *tp;
|
||||
{
|
||||
|
||||
bcopy(ttydefchars, tp->t_cc, sizeof(ttydefchars));
|
||||
termioschars(&tp->t_termios);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty.h 8.6 (Berkeley) 1/21/94
|
||||
* $Id: tty.h,v 1.20 1995/07/21 17:47:08 bde Exp $
|
||||
* $Id: tty.h,v 1.21 1995/07/21 20:57:15 bde Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_TTY_H_
|
||||
@ -201,7 +201,6 @@ struct speedtab {
|
||||
|
||||
#ifdef KERNEL
|
||||
extern struct tty *constty; /* Temporary virtual console. */
|
||||
extern struct ttychars ttydefaults;
|
||||
|
||||
int b_to_q __P((char *cp, int cc, struct clist *q));
|
||||
void catq __P((struct clist *from, struct clist *to));
|
||||
@ -220,6 +219,7 @@ int ttcompat __P((struct tty *tp, int com, caddr_t data, int flag));
|
||||
int ttsetcompat __P((struct tty *tp, int *com, caddr_t data, struct termios *term));
|
||||
|
||||
int nullmodem __P((struct tty *tp, int flag));
|
||||
void termioschars __P((struct termios *t));
|
||||
int tputchar __P((int c, struct tty *tp));
|
||||
int ttioctl __P((struct tty *tp, int com, void *data, int flag));
|
||||
int ttread __P((struct tty *tp, struct uio *uio, int flag));
|
||||
|
Loading…
x
Reference in New Issue
Block a user