X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=madtty%2Fmadtty.h;h=c7e2a8240493b2eb79483d3c038c7e1cc672091a;hb=f5196e6e851c7d1dcf8c7e9c50f4da314c6ac238;hp=2defa716bda3b5568b10ab95568fc8a7660eaeb5;hpb=5c99ba24e74e451d0c256b46134d38ee17054565;p=apps%2Fmadtty.git diff --git a/madtty/madtty.h b/madtty/madtty.h index 2defa71..c7e2a82 100644 --- a/madtty/madtty.h +++ b/madtty/madtty.h @@ -31,28 +31,19 @@ #include #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; @@ -70,8 +61,8 @@ typedef struct { /* 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);