nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit e0213b1a41450c2055cba4c8a5cc2bf3d0a7f653
parent e70ff87c862ffc2d96fcc3c43d15ee8aabc44573
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 26 Jan 2020 16:36:23 +0100

tweaks: drop a pointless suffix from two function names

Diffstat:
Msrc/browser.c | 2+-
Msrc/files.c | 4++--
Msrc/global.c | 16++++++++--------
Msrc/proto.h | 4++--
Msrc/rcfile.c | 4++--
5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/browser.c b/src/browser.c @@ -225,7 +225,7 @@ char *do_browser(char *path) selected = 0; } else if (func == to_last_file) { selected = filelist_len - 1; - } else if (func == goto_dir_void) { + } else if (func == goto_dir) { /* Ask for the directory to go to. */ if (do_prompt(TRUE, FALSE, MGOTODIR, "", NULL, /* TRANSLATORS: This is a prompt. */ diff --git a/src/files.c b/src/files.c @@ -1127,7 +1127,7 @@ void do_insertfile(void) } #endif #ifdef ENABLE_BROWSER - if (func == to_files_void) { + if (func == to_files) { char *chosen = do_browse_from(answer); /* 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); #ifdef ENABLE_BROWSER - if (func == to_files_void) { + if (func == to_files) { char *chosen = do_browse_from(answer); if (chosen == NULL) diff --git a/src/global.c b/src/global.c @@ -293,10 +293,10 @@ void flip_goto(void) { } #ifdef ENABLE_BROWSER -void to_files_void(void) +void to_files(void) { } -void goto_dir_void(void) +void goto_dir(void) { } #endif @@ -503,7 +503,7 @@ functionptrtype interpret(int *keycode) case '/': return do_search_forward; case 'g': - return goto_dir_void; + return goto_dir; case '?': return do_help; case 's': @@ -863,7 +863,7 @@ void shortcut_init(void) #endif #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. */ N_("Go To Dir"), WITHORSANS(gotodir_gist), TOGETHER, VIEW); @@ -1102,7 +1102,7 @@ void shortcut_init(void) #ifdef ENABLE_BROWSER /* The file browser is only available when not in restricted mode. */ 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); 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, "^Home", CONTROL_HOME, to_first_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, "M-G", 0, goto_dir_void, 0); + add_to_sclist(MBROWSER, "^_", 0, goto_dir, 0); + add_to_sclist(MBROWSER, "M-G", 0, goto_dir, 0); #endif if (ISSET(TEMP_FILE) && !ISSET(PRESERVE)) add_to_sclist(MWRITEFILE, "^Q", 0, discard_buffer, 0); @@ -1417,7 +1417,7 @@ void shortcut_init(void) #ifdef ENABLE_BROWSER /* Only when not in restricted mode, allow entering the file browser. */ 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 add_to_sclist(MHELP|MBROWSER, "^C", 0, do_exit, 0); /* Allow exiting from the file browser and the help viewer with diff --git a/src/proto.h b/src/proto.h @@ -681,8 +681,8 @@ void backwards_void(void); void flip_replace(void); void flip_goto(void); #ifdef ENABLE_BROWSER -void to_files_void(void); -void goto_dir_void(void); +void to_files(void); +void goto_dir(void); #endif #ifndef NANO_TINY void do_toggle_void(void); diff --git a/src/rcfile.c b/src/rcfile.c @@ -422,9 +422,9 @@ keystruct *strtosc(const char *input) #ifdef ENABLE_BROWSER else if (!strcmp(input, "tofiles") || !strcmp(input, "browser")) - s->func = to_files_void; + s->func = to_files; else if (!strcmp(input, "gotodir")) - s->func = goto_dir_void; + s->func = goto_dir; else if (!strcmp(input, "firstfile")) s->func = to_first_file; else if (!strcmp(input, "lastfile"))