 /*
 |  Largely stuff for the terminal emulator
*/

#ifndef _HAVE_DEVTTY_H_
#define _HAVE_DEVTTY_H_

#define NOTERMS	(4)
#define CBSIZE	(16)
#define UP	(1)
#define DOWN	(0)
#define	SCRLEN	(20480)

/* Style/mode flags */
#define	COLLECT	(1)
#define	ITALIC	(2)
#define	BOLD	(4)
#define UNDER	(8)
#define INVER	(16)
#define NOECHO	(32)
#define CBREAK	(64)

/* Key input stuff */
#define INITDELAY	(6)
#define REPDELAY	(1)

/* ioctl requests */
#define SETNEC	(1)
#define SETCBRK	(2)

#define TTYSIZ 132

typedef struct oneterm
{
	int	id;		/* Device minor number */
	int	cur_x, cur_y;	/* Cursor position */
	char	conbuf[CBSIZE];	/* Buffer for control sequences */
	int	cbpos;		/* Position in above buffer */
	int	flags;		/* Output style etc */
	char	cmap[80][32],	/* Array of characters */
		amap[80][32];	/* Array of attributes */
	int	tab_width;	/* Size of horizontal tabs */
	int	width, height;	/* Size of terminal screen */
	char	busy;		/* No cursor flashing during output */
	char	curstate;	/* Cursor flash (visable/invisable) */
	struct s_queue	ttyinq;		/* UZI character buffer */
	char	ttyinbuf[TTYSIZ];	/* Incomming buffer */
	char	stopflag,	/* Flag for ^S/^Q */
		flshflag;	/* Flag for ^O */	
} oneterm;


#endif

