#include <ansicondef.h>

#define  NUL	  0
#define  SOH	  1
#define  STX	  2
#define  ETX	  3
#define  EOT	  4
#define  ENQ	  5
#define  ACK	  6
#define  BEL	  7
#define  BS	  8
#define  HT	  9
#define  LF	  10
#define  VT	  11
#define  FF	  12
#define  CR	  13
#define  SO	  14
#define  SI	  15
#define  DLE	  16
#define  DC1	  17
#define  DC2	  18
#define  DC3	  19
#define  DC4	  20
#define  NAK	  21
#define  SYN	  22
#define  ETB	  23
#define  CAN	  24
#define  EM	  25
#define  SS	  26
#define  ESC	  27
#define  FS	  28
#define  GS	  29
#define  RS	  30
#define  USC	  31

#define  TAB	  9
#define  NL	  10
#define  DEL	  127
#define  XON	  17
#define  XOFF	  19

#define  CSR_LEFT	0x13
#define  CSR_RIGHT	0x14
#define  CSR_UP 	0x15
#define  CSR_DOWN	0x16

#define NORM 1
#define APP 0

#define  ANSI_M	    0x3c	/* Mask of ANSI-ness */
#define  VT100_M    0x3d	/* Mask of VT- ness */
#define  ANSI_BOLD  0x30	/* ANSI Bold modes */
#define  ANSI_8COL  0x34	/* ANSI 8 colour modes */

#define  EOLLF    0
#define  EOLCR    1
#define  EOLCRLF  2

#define SNORM  0
#define SESC   1
#define SESCNO 2
#define SESCGx 3
#define SESCPM 4
#define SESCP1 5
#define SESCP2 6
#define SESCEX 7
#define SUSC   8

#define VTFONT    1
#define VIEWCHAR  2
#define VIEWGRAF  3

#define  C_TEXT   0
#define  C_GRAF   1


static short Xpos, Ypos;
static unsigned char bRXEOL = 0;
static unsigned char fCol;
static unsigned char bCol;
static unsigned char sState;
static unsigned char lastpr;
static unsigned char lastch;
static char EscBuf[80];
static char cSet[2];
static char *pEscBuf;
static char vtMode;
static char sCount;
static char bInsert;
static char bWrap;
static char csr;

