#include <wchar.h>
#define MAX_CSI_ES_PARAMS 32
-#define ESEQ_BUF_SIZE 128 /* size of escape sequence buffer */
-typedef struct mtty_row_t {
- wchar_t *text;
- uint16_t *attr;
-} mtty_row_t;
-
-/* Represents each of the text cells in the terminal screen */
-typedef struct {
- char s[4];
- char len;
- int16_t attrs;
-} RoteCell;
+typedef struct mtty_row_t mtty_row_t;
typedef struct {
int pty;
pid_t childpid;
/* flags */
- unsigned insert : 1;
- unsigned escaped : 1;
- unsigned graphmode : 1;
+ unsigned seen_input : 1;
+ unsigned insert : 1;
+ unsigned escaped : 1;
+ unsigned graphmode : 1;
+ unsigned curshid : 1;
/* geometry */
int rows, cols;
/* buffers and parsing state */
mbstate_t ps;
char rbuf[BUFSIZ];
- char esbuf[ESEQ_BUF_SIZE];
- int rbuf_len, esbuf_len;
+ char ebuf[BUFSIZ];
+ int rlen, elen;
} madtty_t;
void madtty_initialize(void);