aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/st.c b/st.c
index 4bf6378..da832ed 100644
--- a/st.c
+++ b/st.c
@@ -95,6 +95,26 @@ enum escape_state {
95 ESC_DCS =128, 95 ESC_DCS =128,
96}; 96};
97 97
98/* Internal representation of the screen */
99typedef struct {
100 int row; /* nb row */
101 int col; /* nb col */
102 Line *line; /* screen */
103 Line *alt; /* alternate screen */
104 int *dirty; /* dirtyness of lines */
105 TCursor c; /* cursor */
106 int ocx; /* old cursor col */
107 int ocy; /* old cursor row */
108 int top; /* top scroll limit */
109 int bot; /* bottom scroll limit */
110 int mode; /* terminal mode flags */
111 int esc; /* escape state flags */
112 char trantbl[4]; /* charset table translation */
113 int charset; /* current charset */
114 int icharset; /* selected charset for sequence */
115 int *tabs;
116} Term;
117
98/* CSI Escape sequence structs */ 118/* CSI Escape sequence structs */
99/* ESC '[' [[ [<priv>] <arg> [;]] <mode> [<mode>]] */ 119/* ESC '[' [[ [<priv>] <arg> [;]] <mode> [<mode>]] */
100typedef struct { 120typedef struct {
@@ -181,11 +201,11 @@ static char *base64dec(const char *);
181static ssize_t xwrite(int, const char *, size_t); 201static ssize_t xwrite(int, const char *, size_t);
182 202
183/* Globals */ 203/* Globals */
184Term term;
185int cmdfd; 204int cmdfd;
186pid_t pid; 205pid_t pid;
187int oldbutton = 3; /* button event on startup: 3 = release */ 206int oldbutton = 3; /* button event on startup: 3 = release */
188 207
208static Term term;
189static Selection sel; 209static Selection sel;
190static CSIEscape csiescseq; 210static CSIEscape csiescseq;
191static STREscape strescseq; 211static STREscape strescseq;