aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-01-31 14:31:18 +1000
committerDavid Walter Seikel2014-01-31 14:31:18 +1000
commitc88069e472c8d7424fc6b4cc172fc763cd10f7d2 (patch)
treec2ae11d16b39061457b97a21383b1099684cf292
parentDocument my use of camelCaseNames v underscore_names. (diff)
downloadboxes-c88069e472c8d7424fc6b4cc172fc763cd10f7d2.zip
boxes-c88069e472c8d7424fc6b4cc172fc763cd10f7d2.tar.gz
boxes-c88069e472c8d7424fc6b4cc172fc763cd10f7d2.tar.bz2
boxes-c88069e472c8d7424fc6b4cc172fc763cd10f7d2.tar.xz
Stop using null terminated array.
Diffstat (limited to '')
-rw-r--r--handlekeys.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/handlekeys.c b/handlekeys.c
index e07e234..205f94a 100644
--- a/handlekeys.c
+++ b/handlekeys.c
@@ -174,18 +174,7 @@ static struct key keys[] =
174 {"\x1B\x37", "F7"}, 174 {"\x1B\x37", "F7"},
175 {"\x1B\x38", "F8"}, 175 {"\x1B\x38", "F8"},
176 {"\x1B\x39", "F9"}, 176 {"\x1B\x39", "F9"},
177 {"\x1B\x30", "F10"}, 177 {"\x1B\x30", "F10"}
178
179/* TODO - Rob says -
180...you don't need a NULL terminator for
181an array, you can do sizeof(table)/sizeof(*table). Divide the size of
182the table (in bytes) by the size of a member of the table (in bytes) to
183get the number of entries.
184
185I should try that trick. Seems to work, let's do that everywhere.
186*/
187
188 {NULL, NULL}
189}; 178};
190 179
191static volatile sig_atomic_t sigWinch; 180static volatile sig_atomic_t sigWinch;