From c88069e472c8d7424fc6b4cc172fc763cd10f7d2 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 31 Jan 2014 14:31:18 +1000 Subject: Stop using null terminated array. --- handlekeys.c | 13 +------------ 1 file changed, 1 insertion(+), 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[] = {"\x1B\x37", "F7"}, {"\x1B\x38", "F8"}, {"\x1B\x39", "F9"}, - {"\x1B\x30", "F10"}, - -/* TODO - Rob says - -...you don't need a NULL terminator for -an array, you can do sizeof(table)/sizeof(*table). Divide the size of -the table (in bytes) by the size of a member of the table (in bytes) to -get the number of entries. - -I should try that trick. Seems to work, let's do that everywhere. -*/ - - {NULL, NULL} + {"\x1B\x30", "F10"} }; static volatile sig_atomic_t sigWinch; -- cgit v1.1