mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-05 07:54:24 +03:00
tweaks: rename a function, away from using an abbreviation
Also reshuffle a tiny fragment of code.
This commit is contained in:
parent
e35b6636ab
commit
c772e1cb6b
@ -1512,7 +1512,7 @@ void shortcut_init(void)
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Return the textual description that corresponds to the given flag. */
|
||||
const char *flagtostr(int flag)
|
||||
const char *epithet_of_flag(int flag)
|
||||
{
|
||||
switch (flag) {
|
||||
case NO_HELP:
|
||||
|
@ -235,7 +235,7 @@ void help_init(void)
|
||||
|
||||
for (s = sclist; s != NULL; s = s->next)
|
||||
if (s->func == do_toggle)
|
||||
allocsize += strlen(_(flagtostr(s->toggle))) + onoff_len + 9;
|
||||
allocsize += strlen(_(epithet_of_flag(s->toggle))) + onoff_len + 9;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -303,7 +303,7 @@ void help_init(void)
|
||||
for (s = sclist; s != NULL; s = s->next)
|
||||
if (s->toggle && s->ordinal == counter) {
|
||||
ptr += sprintf(ptr, "%s\t\t %s %s\n", (s->menus & MMAIN ? s->keystr : ""),
|
||||
_(flagtostr(s->toggle)), _("enable/disable"));
|
||||
_(epithet_of_flag(s->toggle)), _("enable/disable"));
|
||||
/* Add a blank like between two groups. */
|
||||
if (s->toggle == NO_SYNTAX)
|
||||
ptr += sprintf(ptr, "\n");
|
||||
|
@ -1077,6 +1077,8 @@ void toggle_this(int flag)
|
||||
case ZERO:
|
||||
window_init();
|
||||
draw_all_subwindows();
|
||||
if (flag == ZERO)
|
||||
return;
|
||||
break;
|
||||
case CONSTANT_SHOW:
|
||||
if (ISSET(ZERO) || LINES == 1) {
|
||||
@ -1114,9 +1116,6 @@ void toggle_this(int flag)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (flag == ZERO)
|
||||
return;
|
||||
|
||||
if (ISSET(STATEFLAGS) && !ISSET(ZERO) && (flag == AUTOINDENT ||
|
||||
flag == BREAK_LONG_LINES || flag == SOFTWRAP)) {
|
||||
if (ISSET(MINIBAR))
|
||||
@ -1131,7 +1130,7 @@ void toggle_this(int flag)
|
||||
if (flag == NO_HELP || flag == NO_SYNTAX)
|
||||
enabled = !enabled;
|
||||
|
||||
statusline(REMARK, "%s %s", _(flagtostr(flag)),
|
||||
statusline(REMARK, "%s %s", _(epithet_of_flag(flag)),
|
||||
enabled ? _("enabled") : _("disabled"));
|
||||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
@ -323,7 +323,7 @@ functionptrtype interpret(int *keycode);
|
||||
#endif
|
||||
int keycode_from_string(const char *keystring);
|
||||
void shortcut_init(void);
|
||||
const char *flagtostr(int flag);
|
||||
const char *epithet_of_flag(int flag);
|
||||
|
||||
/* Some functions in help.c. */
|
||||
#ifdef ENABLE_HELP
|
||||
|
Loading…
x
Reference in New Issue
Block a user