diff options
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -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 */ | ||
99 | typedef 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>]] */ |
100 | typedef struct { | 120 | typedef struct { |
@@ -181,11 +201,11 @@ static char *base64dec(const char *); | |||
181 | static ssize_t xwrite(int, const char *, size_t); | 201 | static ssize_t xwrite(int, const char *, size_t); |
182 | 202 | ||
183 | /* Globals */ | 203 | /* Globals */ |
184 | Term term; | ||
185 | int cmdfd; | 204 | int cmdfd; |
186 | pid_t pid; | 205 | pid_t pid; |
187 | int oldbutton = 3; /* button event on startup: 3 = release */ | 206 | int oldbutton = 3; /* button event on startup: 3 = release */ |
188 | 207 | ||
208 | static Term term; | ||
189 | static Selection sel; | 209 | static Selection sel; |
190 | static CSIEscape csiescseq; | 210 | static CSIEscape csiescseq; |
191 | static STREscape strescseq; | 211 | static STREscape strescseq; |