aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/awk.c4
-rw-r--r--editors/vi.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/editors/awk.c b/editors/awk.c
index 90ba64348..940a7948e 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -390,7 +390,7 @@ static const char vValues[] =
390/* hash size may grow to these values */ 390/* hash size may grow to these values */
391#define FIRST_PRIME 61; 391#define FIRST_PRIME 61;
392static const unsigned PRIMES[] = { 251, 1021, 4093, 16381, 65521 }; 392static const unsigned PRIMES[] = { 251, 1021, 4093, 16381, 65521 };
393enum { NPRIMES = sizeof(PRIMES) / sizeof(PRIMES[0]) }; 393
394 394
395 395
396/* Globals. Split in two parts so that first one is addressed 396/* Globals. Split in two parts so that first one is addressed
@@ -570,7 +570,7 @@ static void hash_rebuild(xhash *hash)
570 unsigned newsize, i, idx; 570 unsigned newsize, i, idx;
571 hash_item **newitems, *hi, *thi; 571 hash_item **newitems, *hi, *thi;
572 572
573 if (hash->nprime == NPRIMES) 573 if (hash->nprime == ARRAY_SIZE(PRIMES))
574 return; 574 return;
575 575
576 newsize = PRIMES[hash->nprime++]; 576 newsize = PRIMES[hash->nprime++];
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
2230 {"[13~", VI_K_FUN3}, // Function Key F3 2230 {"[13~", VI_K_FUN3}, // Function Key F3
2231 {"[14~", VI_K_FUN4}, // Function Key F4 2231 {"[14~", VI_K_FUN4}, // Function Key F4
2232 }; 2232 };
2233 2233 enum { ESCCMDS_COUNT = ARRAY_SIZE(esccmds) };
2234#define ESCCMDS_COUNT (sizeof(esccmds)/sizeof(struct esc_cmds))
2235 2234
2236 alarm(0); // turn alarm OFF while we wait for input 2235 alarm(0); // turn alarm OFF while we wait for input
2237 fflush(stdout); 2236 fflush(stdout);