aboutsummaryrefslogtreecommitdiff
path: root/st.h
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2018-02-24 15:32:48 -0600
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:56:26 -0600
commita3beb626d2dae9d4d0883c7c8cb6ba58b0609105 (patch)
tree2b375342df7c33c98ab070ee38b40bbb0da4acf1 /st.h
parenta5dc1b46976b2252f9d7bb68f126c4b0f351dd1a (diff)
downloadst-patched-a3beb626d2dae9d4d0883c7c8cb6ba58b0609105.tar.bz2
st-patched-a3beb626d2dae9d4d0883c7c8cb6ba58b0609105.tar.xz
st-patched-a3beb626d2dae9d4d0883c7c8cb6ba58b0609105.zip
Remove x.c dependency on term
The xinit function only needs to the rows/cols, so pass those in rather than accessing term directly. With a bit of arithmetic, we are able to avoid the need for term.row and term.col in x2col, y2row, and xdrawglyphfontspecs as well, completing the removal. Term is now fully internal to st.c. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.h')
-rw-r--r--st.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/st.h b/st.h
index 27c48cf..b5bc1b5 100644
--- a/st.h
+++ b/st.h
@@ -76,26 +76,6 @@ typedef struct {
76 char state; 76 char state;
77} TCursor; 77} TCursor;
78 78
79/* Internal representation of the screen */
80typedef struct {
81 int row; /* nb row */
82 int col; /* nb col */
83 Line *line; /* screen */
84 Line *alt; /* alternate screen */
85 int *dirty; /* dirtyness of lines */
86 TCursor c; /* cursor */
87 int ocx; /* old cursor col */
88 int ocy; /* old cursor row */
89 int top; /* top scroll limit */
90 int bot; /* bottom scroll limit */
91 int mode; /* terminal mode flags */
92 int esc; /* escape state flags */
93 char trantbl[4]; /* charset table translation */
94 int charset; /* current charset */
95 int icharset; /* selected charset for sequence */
96 int *tabs;
97} Term;
98
99/* Purely graphic info */ 79/* Purely graphic info */
100typedef struct { 80typedef struct {
101 int tw, th; /* tty width and height */ 81 int tw, th; /* tty width and height */
@@ -168,7 +148,6 @@ void *xrealloc(void *, size_t);
168char *xstrdup(char *); 148char *xstrdup(char *);
169 149
170/* Globals */ 150/* Globals */
171extern Term term;
172extern int cmdfd; 151extern int cmdfd;
173extern pid_t pid; 152extern pid_t pid;
174extern int oldbutton; 153extern int oldbutton;