From 80b8b39899a09c7516920cda5fd343b3086d4824 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 25 Jun 2007 10:55:35 +0000 Subject: Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms ) --- editors/vi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'editors/vi.c') diff --git a/editors/vi.c b/editors/vi.c index b961ca5b8..01d45e50e 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2230,8 +2230,7 @@ static char readit(void) // read (maybe cursor) key from stdin {"[13~", VI_K_FUN3}, // Function Key F3 {"[14~", VI_K_FUN4}, // Function Key F4 }; - -#define ESCCMDS_COUNT (sizeof(esccmds)/sizeof(struct esc_cmds)) + enum { ESCCMDS_COUNT = ARRAY_SIZE(esccmds) }; alarm(0); // turn alarm OFF while we wait for input fflush(stdout); -- cgit v1.2.3