aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-09 17:28:24 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-09 17:28:24 +0000
commit37b0bcd7c15b6dac69ac8cb1c0d9d6a4fd5c54c0 (patch)
tree7422f55fe913126e060f60cf8c8d892236bc3dd6 /tmux.h
parent5b56ea181649793918779dd2684c671072ce4bc9 (diff)
downloadrtmux-37b0bcd7c15b6dac69ac8cb1c0d9d6a4fd5c54c0.tar.gz
rtmux-37b0bcd7c15b6dac69ac8cb1c0d9d6a4fd5c54c0.tar.bz2
rtmux-37b0bcd7c15b6dac69ac8cb1c0d9d6a4fd5c54c0.zip
Sync OpenBSD patchset 226:
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 contains 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.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/tmux.h b/tmux.h
index 5dbd06f8..e5fdc2cc 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.405 2009-08-09 17:19:18 tcunha Exp $ */
+/* $Id: tmux.h,v 1.406 2009-08-09 17:28:23 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -499,6 +499,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;
@@ -510,11 +519,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. */