tweaks: drop a pointless suffix from two function names

This commit is contained in:
Benno Schulenberg 2020-01-26 16:36:23 +01:00
parent e70ff87c86
commit e0213b1a41
5 changed files with 15 additions and 15 deletions

View File

@ -225,7 +225,7 @@ char *do_browser(char *path)
selected = 0; selected = 0;
} else if (func == to_last_file) { } else if (func == to_last_file) {
selected = filelist_len - 1; selected = filelist_len - 1;
} else if (func == goto_dir_void) { } else if (func == goto_dir) {
/* Ask for the directory to go to. */ /* Ask for the directory to go to. */
if (do_prompt(TRUE, FALSE, MGOTODIR, "", NULL, if (do_prompt(TRUE, FALSE, MGOTODIR, "", NULL,
/* TRANSLATORS: This is a prompt. */ /* TRANSLATORS: This is a prompt. */

View File

@ -1127,7 +1127,7 @@ void do_insertfile(void)
} }
#endif #endif
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
if (func == to_files_void) { if (func == to_files) {
char *chosen = do_browse_from(answer); char *chosen = do_browse_from(answer);
/* If no file was chosen, go back to the prompt. */ /* If no file was chosen, go back to the prompt. */
@ -2061,7 +2061,7 @@ int do_writeout(bool exiting, bool withprompt)
given = mallocstrcpy(given, answer); given = mallocstrcpy(given, answer);
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
if (func == to_files_void) { if (func == to_files) {
char *chosen = do_browse_from(answer); char *chosen = do_browse_from(answer);
if (chosen == NULL) if (chosen == NULL)

View File

@ -293,10 +293,10 @@ void flip_goto(void)
{ {
} }
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
void to_files_void(void) void to_files(void)
{ {
} }
void goto_dir_void(void) void goto_dir(void)
{ {
} }
#endif #endif
@ -503,7 +503,7 @@ functionptrtype interpret(int *keycode)
case '/': case '/':
return do_search_forward; return do_search_forward;
case 'g': case 'g':
return goto_dir_void; return goto_dir;
case '?': case '?':
return do_help; return do_help;
case 's': case 's':
@ -863,7 +863,7 @@ void shortcut_init(void)
#endif #endif
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
add_to_funcs(goto_dir_void, MBROWSER, add_to_funcs(goto_dir, MBROWSER,
/* TRANSLATORS: Try to keep the next seven strings at most 10 characters. */ /* TRANSLATORS: Try to keep the next seven strings at most 10 characters. */
N_("Go To Dir"), WITHORSANS(gotodir_gist), TOGETHER, VIEW); N_("Go To Dir"), WITHORSANS(gotodir_gist), TOGETHER, VIEW);
@ -1102,7 +1102,7 @@ void shortcut_init(void)
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
/* The file browser is only available when not in restricted mode. */ /* The file browser is only available when not in restricted mode. */
if (!ISSET(RESTRICTED)) if (!ISSET(RESTRICTED))
add_to_funcs(to_files_void, MWRITEFILE|MINSERTFILE, add_to_funcs(to_files, MWRITEFILE|MINSERTFILE,
N_("To Files"), WITHORSANS(tofiles_gist), TOGETHER, VIEW); N_("To Files"), WITHORSANS(tofiles_gist), TOGETHER, VIEW);
add_to_funcs(do_page_up, MBROWSER, add_to_funcs(do_page_up, MBROWSER,
@ -1387,8 +1387,8 @@ void shortcut_init(void)
add_to_sclist(MBROWSER, "End", KEY_END, to_last_file, 0); add_to_sclist(MBROWSER, "End", KEY_END, to_last_file, 0);
add_to_sclist(MBROWSER, "^Home", CONTROL_HOME, to_first_file, 0); add_to_sclist(MBROWSER, "^Home", CONTROL_HOME, to_first_file, 0);
add_to_sclist(MBROWSER, "^End", CONTROL_END, to_last_file, 0); add_to_sclist(MBROWSER, "^End", CONTROL_END, to_last_file, 0);
add_to_sclist(MBROWSER, "^_", 0, goto_dir_void, 0); add_to_sclist(MBROWSER, "^_", 0, goto_dir, 0);
add_to_sclist(MBROWSER, "M-G", 0, goto_dir_void, 0); add_to_sclist(MBROWSER, "M-G", 0, goto_dir, 0);
#endif #endif
if (ISSET(TEMP_FILE) && !ISSET(PRESERVE)) if (ISSET(TEMP_FILE) && !ISSET(PRESERVE))
add_to_sclist(MWRITEFILE, "^Q", 0, discard_buffer, 0); add_to_sclist(MWRITEFILE, "^Q", 0, discard_buffer, 0);
@ -1417,7 +1417,7 @@ void shortcut_init(void)
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
/* Only when not in restricted mode, allow entering the file browser. */ /* Only when not in restricted mode, allow entering the file browser. */
if (!ISSET(RESTRICTED)) if (!ISSET(RESTRICTED))
add_to_sclist(MWRITEFILE|MINSERTFILE, "^T", 0, to_files_void, 0); add_to_sclist(MWRITEFILE|MINSERTFILE, "^T", 0, to_files, 0);
#endif #endif
add_to_sclist(MHELP|MBROWSER, "^C", 0, do_exit, 0); add_to_sclist(MHELP|MBROWSER, "^C", 0, do_exit, 0);
/* Allow exiting from the file browser and the help viewer with /* Allow exiting from the file browser and the help viewer with

View File

@ -681,8 +681,8 @@ void backwards_void(void);
void flip_replace(void); void flip_replace(void);
void flip_goto(void); void flip_goto(void);
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
void to_files_void(void); void to_files(void);
void goto_dir_void(void); void goto_dir(void);
#endif #endif
#ifndef NANO_TINY #ifndef NANO_TINY
void do_toggle_void(void); void do_toggle_void(void);

View File

@ -422,9 +422,9 @@ keystruct *strtosc(const char *input)
#ifdef ENABLE_BROWSER #ifdef ENABLE_BROWSER
else if (!strcmp(input, "tofiles") || else if (!strcmp(input, "tofiles") ||
!strcmp(input, "browser")) !strcmp(input, "browser"))
s->func = to_files_void; s->func = to_files;
else if (!strcmp(input, "gotodir")) else if (!strcmp(input, "gotodir"))
s->func = goto_dir_void; s->func = goto_dir;
else if (!strcmp(input, "firstfile")) else if (!strcmp(input, "firstfile"))
s->func = to_first_file; s->func = to_first_file;
else if (!strcmp(input, "lastfile")) else if (!strcmp(input, "lastfile"))