summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-05-08 16:18:05 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-05-08 16:18:05 +0000
commit902f6d5660e979b6e39b913997012d44a17380a8 (patch)
treed60cbf7d5970325d4251de3fe5e3707e763ac13a /usr.bin/tmux/tmux.h
parent44b6c6df3a1c814d9e7f6fc3ee7e3bdae103407d (diff)
Move input parser structs into input.c (removing fairly useless
saved_cursor_[xy] formats as a side-effect).
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r--usr.bin/tmux/tmux.h56
1 files changed, 5 insertions, 51 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 798707ebf0b..5e09f9fd719 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.506 2015/05/07 08:08:54 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.507 2015/05/08 16:18:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -785,55 +785,6 @@ struct screen_write_ctx {
#define screen_hsize(s) ((s)->grid->hsize)
#define screen_hlimit(s) ((s)->grid->hlimit)
-/* Input parser cell. */
-struct input_cell {
- struct grid_cell cell;
- int set;
- int g0set; /* 1 if ACS */
- int g1set; /* 1 if ACS */
-};
-
-/* Input parser context. */
-struct input_ctx {
- struct window_pane *wp;
- struct screen_write_ctx ctx;
-
- struct input_cell cell;
-
- struct input_cell old_cell;
- u_int old_cx;
- u_int old_cy;
-
- u_char interm_buf[4];
- size_t interm_len;
-
- u_char param_buf[64];
- size_t param_len;
-
-#define INPUT_BUF_START 32
-#define INPUT_BUF_LIMIT 1048576
- u_char *input_buf;
- size_t input_len;
- size_t input_space;
-
- int param_list[24]; /* -1 not present */
- u_int param_list_len;
-
- struct utf8_data utf8data;
-
- int ch;
- int flags;
-#define INPUT_DISCARD 0x1
-
- const struct input_state *state;
-
- /*
- * All input received since we were last in the ground state. Sent to
- * control clients on connection.
- */
- struct evbuffer *since_ground;
-};
-
/*
* Window mode. Windows can be in several modes and this is used to call the
* right function to handle input and output.
@@ -881,6 +832,7 @@ struct window_choose_mode_item {
};
/* Child window structure. */
+struct input_ctx;
struct window_pane {
u_int id;
u_int active_point;
@@ -920,7 +872,7 @@ struct window_pane {
int fd;
struct bufferevent *event;
- struct input_ctx ictx;
+ struct input_ctx *ictx;
struct grid_cell colgc;
@@ -1983,6 +1935,8 @@ void recalculate_sizes(void);
/* input.c */
void input_init(struct window_pane *);
void input_free(struct window_pane *);
+void input_reset(struct window_pane *);
+struct evbuffer *input_pending(struct window_pane *);
void input_parse(struct window_pane *);
/* input-key.c */