aboutsummaryrefslogtreecommitdiff
path: root/st.h
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2018-02-24 16:32:20 -0600
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:56:26 -0600
commite0215d53770a9b6bc6e5d7b9a603ecd34dbd7100 (patch)
treeb696b3fa2c69270a198c3bcc1e0a289b12b3538c /st.h
parent30683c70ab62fd37b5921cf72077b9aef2cb842e (diff)
downloadst-e0215d53770a9b6bc6e5d7b9a603ecd34dbd7100.tar.gz
st-e0215d53770a9b6bc6e5d7b9a603ecd34dbd7100.tar.bz2
Reduce visibility wherever possible
When possible, declare functions/variables static and move struct definitions out of headers. In order to allow utf8decode to become internal, use codepoint for DECSCUSR extension directly. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.h')
-rw-r--r--st.h40
1 files changed, 0 insertions, 40 deletions
diff --git a/st.h b/st.h
index 0a7472b..1015fc6 100644
--- a/st.h
+++ b/st.h
@@ -1,8 +1,5 @@
/* See LICENSE for license details. */
-/* Arbitrary sizes */
-#define UTF_SIZ 4
-
/* macros */
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) < (b) ? (b) : (a))
@@ -69,41 +66,6 @@ typedef struct {
typedef Glyph *Line;
-typedef struct {
- Glyph attr; /* current char attributes */
- int x;
- int y;
- char state;
-} TCursor;
-
-/* Purely graphic info */
-typedef struct {
- int tw, th; /* tty width and height */
- int w, h; /* window width and height */
- int ch; /* char height */
- int cw; /* char width */
- int mode; /* window state/mode flags */
- int cursor; /* cursor style */
-} TermWindow;
-
-typedef struct {
- int mode;
- int type;
- int snap;
- /*
- * Selection variables:
- * nb – normalized coordinates of the beginning of the selection
- * ne – normalized coordinates of the end of the selection
- * ob – original coordinates of the beginning of the selection
- * oe – original coordinates of the end of the selection
- */
- struct {
- int x, y;
- } nb, ne, ob, oe;
-
- int alt;
-} Selection;
-
typedef union {
int i;
uint ui;
@@ -137,11 +99,9 @@ void selclear(void);
void selinit(void);
void selstart(int, int, int);
void selextend(int, int, int, int);
-void selnormalize(void);
int selected(int, int);
char *getsel(void);
-size_t utf8decode(const char *, Rune *, size_t);
size_t utf8encode(Rune, char *);
void *xmalloc(size_t);