--- xinu/h/tty.h 2018/04/24 17:39:02 1.1.1.1 +++ xinu/h/tty.h 2018/04/24 17:39:05 1.1.1.2 @@ -1,6 +1,8 @@ /* tty.h */ -#define OBMINSP 20 /* min space in buffer before */ +#define IOCHERR 0200 /* bit set on when an error */ + /* occurred reading the char. */ +#define OBMINSP 40 /* min space in buffer before */ /* processes awakened to write */ #define EBUFLEN 20 /* size of echo queue */ @@ -10,10 +12,10 @@ #define Ntty 1 /* number of serial tty lines */ #endif #ifndef IBUFLEN -#define IBUFLEN 128 /* num. chars in input queue */ +#define IBUFLEN 256 /* num. chars in input queue */ #endif #ifndef OBUFLEN -#define OBUFLEN 64 /* num. chars in output queue */ +#define OBUFLEN 128 /* num. chars in output queue */ #endif /* mode constants */ @@ -43,14 +45,9 @@ struct tty { /* tty line control block Bool ecrlf; /* echo CR-LF for newline? */ Bool icrlf; /* map '\r' to '\n' on input? */ Bool ierase; /* honor erase character? */ - char ierasec; /* erase character (backspace) */ + char ierasec; /* erases character, usu. backsp*/ Bool ikill; /* honor line kill character? */ char ikillc; /* line kill character */ - Bool iintr; /* is interrupt char honored? */ - char iintrc; /* interrupt character */ - int iintpid; /* interrupt process id */ - Bool ieof; /* honor end-of-file char? */ - char ieofc; /* end-of-file character */ int icursor; /* current cursor position */ Bool oflow; /* honor ostop/ostart? */ Bool oheld; /* output currently being held? */ @@ -59,20 +56,19 @@ struct tty { /* tty line control block Bool ocrlf; /* echo CR/LF for LF ? */ char ifullc; /* char to send when input full */ struct csr *ioaddr; /* device address of this unit */ + int intrstate; /* device interrupt state */ }; extern struct tty tty[]; -#define BACKSP '\b' /* backspace one character pos. */ -#define BELL '\007' /* usually an audiable tone */ -#define BLANK ' ' /* used to print a "space" */ -#define EOFC '\004' /* end-of-file character (^D) */ -#define KILLCH '\025' /* line kill character (^U) */ -#define NEWLINE '\n' /* line feed */ -#define RETURN '\r' /* carriage return */ +#define BACKSP '\b' +#define BELL '\07' +#define ATSIGN '@' +#define BLANK ' ' +#define NEWLINE '\n' +#define RETURN '\r' #define STOPCH '\023' /* control-S stops output */ #define STRTCH '\021' /* control-Q restarts output */ -#define INTRCH '\002' /* control-B is interrupt */ -#define UPARROW '^' /* usually for visuals like ^X */ +#define UPARROW '^' /* ttycontrol function codes */ @@ -85,7 +81,4 @@ extern struct tty tty[]; #define TCICHARS 8 /* return number of input chars */ #define TCECHO 9 /* turn on echo */ #define TCNOECHO 10 /* turn off echo */ -#define TCINT 11 /* set input interrupt pid */ -#define TCINTCH 12 /* set input interrupt char */ -#define TCNOINT 13 /* turn off input interrupt */ #define TFULLC BELL /* char to echo when buffer full*/