aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-08 13:29:27 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-08 13:29:27 +0000
commit5e01b6d663abc086847c9bec145edeb9cd91530a (patch)
treea8708ca5f4a199352452945133a6fc11af807e08 /tmux.h
parente89e70e71575417195285a3ea55c430654f9fc21 (diff)
downloadrtmux-5e01b6d663abc086847c9bec145edeb9cd91530a.tar.gz
rtmux-5e01b6d663abc086847c9bec145edeb9cd91530a.tar.bz2
rtmux-5e01b6d663abc086847c9bec145edeb9cd91530a.zip
Change the way the grid is stored, previously it was:
- a two-dimensional array of cells; - a two-dimensional array of utf8 data; - an array of line lengths. Now it is a single array of a new struct grid_line each of which represents a line and containts the length and an array of cells and an array of utf8 data. This will make it easier to add additional per-line members, such as flags.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/tmux.h b/tmux.h
index c2568907..82099e8e 100644
--- a/tmux.h
+++ b/tmux.h
@@ -500,6 +500,15 @@ struct grid_utf8 {
u_char data[UTF8_SIZE];
} __packed;
+/* Grid line. */
+struct grid_line {
+ u_int cellsize;
+ struct grid_cell *celldata;
+
+ u_int utf8size;
+ struct grid_utf8 *utf8data;
+} __packed;
+
/* Entire grid of cells. */
struct grid {
int flags;
@@ -511,11 +520,7 @@ struct grid {
u_int hsize;
u_int hlimit;
- u_int *size;
- struct grid_cell **data;
-
- u_int *usize;
- struct grid_utf8 **udata;
+ struct grid_line *linedata;
};
/* Option data structures. */