tweaks: rename a variable to be special and distinct

master
Benno Schulenberg 2018-09-17 20:35:13 +02:00
parent d19169c263
commit a8fa0a82c4
1 changed files with 4 additions and 5 deletions

View File

@ -499,7 +499,7 @@ void help_init(void)
/* Now add our shortcut info. */ /* Now add our shortcut info. */
for (f = allfuncs; f != NULL; f = f->next) { for (f = allfuncs; f != NULL; f = f->next) {
int scsfound = 0; int tally = 0;
if ((f->menus & currmenu) == 0) if ((f->menus & currmenu) == 0)
continue; continue;
@ -507,10 +507,9 @@ void help_init(void)
/* Let's simply show the first two shortcuts from the list. */ /* Let's simply show the first two shortcuts from the list. */
for (s = sclist; s != NULL; s = s->next) { for (s = sclist; s != NULL; s = s->next) {
if ((s->menus & currmenu) && s->func == f->func) { if ((s->menus & currmenu) && s->func == f->func) {
scsfound++;
/* Make the first column narrower (6) than the second (10), /* Make the first column narrower (6) than the second (10),
* but allow it to spill into the second, for "M-Space". */ * but allow it to spill into the second, for "M-Space". */
if (scsfound == 1) { if (++tally == 1) {
sprintf(ptr, "%s ", s->keystr); sprintf(ptr, "%s ", s->keystr);
/* Unicode arrows take three bytes instead of one. */ /* Unicode arrows take three bytes instead of one. */
ptr += (strstr(s->keystr, "\xE2") != NULL ? 8 : 6); ptr += (strstr(s->keystr, "\xE2") != NULL ? 8 : 6);
@ -521,9 +520,9 @@ void help_init(void)
} }
} }
if (scsfound == 0) if (tally == 0)
ptr += sprintf(ptr, "\t\t"); ptr += sprintf(ptr, "\t\t");
else if (scsfound == 1) else if (tally == 1)
ptr += 10; ptr += 10;
/* The shortcut's help text. */ /* The shortcut's help text. */