diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2017-10-10 12:46:53 -0500 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2018-02-25 21:53:24 -0600 |
commit | a8314643b1aeaa2187dad71dc5748aaac1760c1b (patch) | |
tree | 563c3943af0790e419eae99da709b9dd5fd5cefb /st.c | |
parent | a09138afa57adb4b76dba8ca72dc7ee2642a5c8d (diff) |
Move window-manipulating functions into x.c
xresize is now internal to x.c
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 36 |
1 files changed, 0 insertions, 36 deletions
@@ -165,7 +165,6 @@ static void tnewline(int); static void tputtab(int); static void tputc(Rune); static void treset(void); -static void tresize(int, int); static void tscrollup(int, int); static void tscrolldown(int, int); static void tsetattr(int *, int); @@ -420,24 +419,6 @@ selinit(void) } int -x2col(int x) -{ - x -= borderpx; - x /= win.cw; - - return LIMIT(x, 0, term.col-1); -} - -int -y2row(int y) -{ - y -= borderpx; - y /= win.ch; - - return LIMIT(y, 0, term.row-1); -} - -int tlinelen(int y) { int i = term.col; @@ -2620,20 +2601,3 @@ kmap(KeySym k, uint state) return NULL; } - -void -cresize(int width, int height) -{ - int col, row; - - if (width != 0) - win.w = width; - if (height != 0) - win.h = height; - - col = (win.w - 2 * borderpx) / win.cw; - row = (win.h - 2 * borderpx) / win.ch; - - tresize(col, row); - xresize(col, row); -} |