diff options
author | David Walter Seikel | 2014-01-31 14:31:18 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-31 14:31:18 +1000 |
commit | c88069e472c8d7424fc6b4cc172fc763cd10f7d2 (patch) | |
tree | c2ae11d16b39061457b97a21383b1099684cf292 | |
parent | Document my use of camelCaseNames v underscore_names. (diff) | |
download | boxes-c88069e472c8d7424fc6b4cc172fc763cd10f7d2.zip boxes-c88069e472c8d7424fc6b4cc172fc763cd10f7d2.tar.gz boxes-c88069e472c8d7424fc6b4cc172fc763cd10f7d2.tar.bz2 boxes-c88069e472c8d7424fc6b4cc172fc763cd10f7d2.tar.xz |
Stop using null terminated array.
-rw-r--r-- | handlekeys.c | 13 |
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 | ||
181 | an array, you can do sizeof(table)/sizeof(*table). Divide the size of | ||
182 | the table (in bytes) by the size of a member of the table (in bytes) to | ||
183 | get the number of entries. | ||
184 | |||
185 | I should try that trick. Seems to work, let's do that everywhere. | ||
186 | */ | ||
187 | |||
188 | {NULL, NULL} | ||
189 | }; | 178 | }; |
190 | 179 | ||
191 | static volatile sig_atomic_t sigWinch; | 180 | static volatile sig_atomic_t sigWinch; |