tweaks: rename a function, to get rid of a useless suffix

master
Benno Schulenberg 2019-12-15 19:47:05 +01:00
parent d3a8d81afb
commit 413b9cb774
8 changed files with 14 additions and 15 deletions

View File

@ -153,9 +153,9 @@ char *do_browser(char *path)
/* Simulate a window resize to force a directory reread. */
kbinput = KEY_WINCH;
#endif
} else if (func == do_help_void) {
} else if (func == do_help) {
#ifdef ENABLE_HELP
do_help_void();
do_help();
#ifndef NANO_TINY
/* The window dimensions might have changed, so act as if. */
kbinput = KEY_WINCH;
@ -469,7 +469,7 @@ functionptrtype parse_browser_input(int *kbinput)
case 'g':
return goto_dir_void;
case '?':
return do_help_void;
return do_help;
case 'S':
case 's':
return do_enter;

View File

@ -2074,7 +2074,7 @@ int do_writeout(bool exiting, bool withprompt)
continue;
}
#endif /* !NANO_TINY */
if (func == do_help_void) {
if (func == do_help) {
continue;
}
#ifdef ENABLE_EXTRA

View File

@ -691,7 +691,7 @@ void shortcut_init(void)
/* Start populating the different menus with functions. */
add_to_funcs(do_help_void, (MMOST | MBROWSER) & ~MFINDINHELP,
add_to_funcs(do_help, (MMOST | MBROWSER) & ~MFINDINHELP,
/* TRANSLATORS: Try to keep the next eleven strings at most 10 characters. */
N_("Get Help"), WITHORSANS(help_gist), TOGETHER, VIEW);
@ -1094,7 +1094,7 @@ void shortcut_init(void)
add_to_sclist(MMOST, "Del", 0, do_delete, 0);
add_to_sclist(MMOST, "^I", 0, do_tab, 0);
add_to_sclist(MMOST, "Tab", TAB_CODE, do_tab, 0);
add_to_sclist((MMOST|MBROWSER) & ~MFINDINHELP, "^G", 0, do_help_void, 0);
add_to_sclist((MMOST|MBROWSER) & ~MFINDINHELP, "^G", 0, do_help, 0);
add_to_sclist(MMAIN|MHELP|MBROWSER, "^X", 0, do_exit, 0);
if (!ISSET(PRESERVE))
add_to_sclist(MMAIN, "^S", 0, do_savefile, 0);
@ -1380,7 +1380,7 @@ void shortcut_init(void)
#ifdef ENABLE_COLOR
add_to_sclist(MLINTER, "^X", 0, do_cancel, 0);
#endif
add_to_sclist(MMOST & ~MFINDINHELP, "F1", 0, do_help_void, 0);
add_to_sclist(MMOST & ~MFINDINHELP, "F1", 0, do_help, 0);
add_to_sclist(MMAIN|MHELP|MBROWSER, "F2", 0, do_exit, 0);
add_to_sclist(MMAIN, "F3", 0, do_writeout_void, 0);
#ifdef ENABLE_JUSTIFY

View File

@ -604,7 +604,7 @@ size_t help_line_len(const char *ptr)
#endif /* ENABLE_HELP */
/* Start the help viewer, or indicate that there is no help. */
void do_help_void(void)
void do_help(void)
{
#ifdef ENABLE_HELP
show_help();

View File

@ -543,9 +543,9 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
}
} else
#endif /* ENABLE_HISTORIES */
if (func == do_help_void) {
if (func == do_help) {
/* This key has a shortcut-list entry when it's used to go to
* the help browser or display a message indicating that help
* the help viewer or display a message indicating that help
* is disabled, which means that finished has been set to TRUE.
* Set it back to FALSE here, so that we aren't kicked out of
* the statusbar prompt. */

View File

@ -332,12 +332,11 @@ const char *flagtostr(int flag);
/* All functions in help.c. */
#ifdef ENABLE_HELP
void wrap_help_text_into_buffer(void);
void do_help(void);
void help_init(void);
functionptrtype parse_help_input(int *kbinput);
size_t help_line_len(const char *ptr);
#endif
void do_help_void(void);
void do_help(void);
/* Most functions in history.c. */
#ifdef ENABLE_HISTORIES

View File

@ -226,7 +226,7 @@ keystruct *strtosc(const char *input)
s->func = do_cancel;
#ifdef ENABLE_HELP
else if (!strcmp(input, "help"))
s->func = do_help_void;
s->func = do_help;
#endif
else if (!strcmp(input, "exit"))
s->func = do_exit;

View File

@ -2983,9 +2983,9 @@ void do_linter(void)
if (func == do_cancel || func == do_enter) {
wipe_statusbar();
break;
} else if (func == do_help_void) {
} else if (func == do_help) {
tmplint = NULL;
do_help_void();
do_help();
} else if (func == do_page_up || func == do_prev_block) {
if (curlint->prev != NULL)
curlint = curlint->prev;