Discarding a now useless function.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5403 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2015-11-11 19:56:35 +00:00
parent 7be493047c
commit bde996db67
7 changed files with 14 additions and 20 deletions

View File

@ -4,6 +4,7 @@
will behave differently depending on the setting of autoindent.
This addresses Debian bug #793053 reported by Clancy.
* src/text.c (do_enter): Chop the now unused parameter 'undoing'.
* src/text.c (do_enter_void): Discard this now useless function.
2015-11-10 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (edit_draw): Skip a zero-length match only when there

View File

@ -158,7 +158,7 @@ char *do_browser(char *path, DIR *dir)
/* If we selected the same filename as last time,
* put back the Enter key so that it's read in. */
if (old_selected == selected)
unget_kbinput(sc_seq_or(do_enter_void, 0), FALSE, FALSE);
unget_kbinput(sc_seq_or(do_enter, 0), FALSE, FALSE);
}
}
#endif /* !DISABLE_MOUSE */
@ -285,7 +285,7 @@ char *do_browser(char *path, DIR *dir)
} else if (func == do_right) {
if (selected < filelist_len - 1)
selected++;
} else if (func == do_enter_void) {
} else if (func == do_enter) {
/* We can't move up from "/". */
if (strcmp(filelist[selected], "/..") == 0) {
statusbar(_("Can't move up a directory"));
@ -538,7 +538,7 @@ functionptrtype parse_browser_input(int *kbinput)
return goto_dir_void;
case 'S':
case 's':
return do_enter_void;
return do_enter;
case 'W':
case 'w':
return do_search;

View File

@ -888,7 +888,7 @@ void shortcut_init(void)
add_to_funcs(do_tab, MMAIN,
N_("Tab"), IFSCHELP(nano_tab_msg), TOGETHER, NOVIEW);
add_to_funcs(do_enter_void, MMAIN,
add_to_funcs(do_enter, MMAIN,
N_("Enter"), IFSCHELP(nano_enter_msg), BLANKAFTER, NOVIEW);
add_to_funcs(do_delete, MMAIN,
@ -1217,8 +1217,8 @@ void shortcut_init(void)
add_to_sclist(MHELP, "End", do_last_line, 0);
#endif
add_to_sclist(MMOST, "^I", do_tab, 0);
add_to_sclist(MMOST, "^M", do_enter_void, 0);
add_to_sclist(MMOST, "Enter", do_enter_void, 0);
add_to_sclist(MMOST, "^M", do_enter, 0);
add_to_sclist(MMOST, "Enter", do_enter, 0);
add_to_sclist(MMOST, "^D", do_delete, 0);
add_to_sclist(MMOST, "Del", do_delete, 0);
add_to_sclist(MMOST, "^H", do_backspace, 0);
@ -1448,7 +1448,7 @@ sc *strtosc(char *input)
else if (!strcasecmp(input, "tab"))
s->scfunc = do_tab;
else if (!strcasecmp(input, "enter"))
s->scfunc = do_enter_void;
s->scfunc = do_enter;
else if (!strcasecmp(input, "delete"))
s->scfunc = do_delete;
else if (!strcasecmp(input, "backspace"))

View File

@ -145,7 +145,7 @@ int do_statusbar_input(bool *ran_func, bool *finished,
}
if (have_shortcut) {
if (s->scfunc == do_tab || s->scfunc == do_enter_void)
if (s->scfunc == do_tab || s->scfunc == do_enter)
;
else if (s->scfunc == total_refresh)
total_statusbar_refresh(refresh_func);
@ -186,7 +186,7 @@ int do_statusbar_input(bool *ran_func, bool *finished,
* set finished to TRUE to indicate that we're done. */
if (got_enter) {
get_input(NULL, 1);
input = sc_seq_or(do_enter_void, 0);
input = sc_seq_or(do_enter, 0);
*finished = TRUE;
}
}
@ -809,7 +809,7 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
func = func_from_key(&kbinput);
if (func == do_cancel || func == do_enter_void)
if (func == do_cancel || func == do_enter)
break;
#ifndef DISABLE_TABCOMP
@ -927,7 +927,7 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
* we've finished putting in an answer, reset the statusbar cursor
* position too. */
if (func) {
if (func == do_cancel || func == do_enter_void || ran_func) {
if (func == do_cancel || func == do_enter || ran_func) {
statusbar_x = old_statusbar_x;
statusbar_pww = old_pww;
@ -1010,7 +1010,7 @@ int do_prompt(bool allow_tabs,
* properly. */
if (func == do_cancel)
retval = -1;
else if (func == do_enter_void)
else if (func == do_enter)
retval = (*answer == '\0') ? -2 : 0;
blank_statusbar();

View File

@ -659,7 +659,6 @@ void do_undo(void);
void do_redo(void);
#endif
void do_enter(void);
void do_enter_void(void);
#ifndef NANO_TINY
RETSIGTYPE cancel_command(int signal);
bool execute_command(const char *command);

View File

@ -815,12 +815,6 @@ void do_enter()
edit_refresh_needed = TRUE;
}
/* Need this again... */
void do_enter_void(void)
{
do_enter();
}
#ifndef NANO_TINY
/* Send a SIGKILL (unconditional kill) to the forked process in
* execute_command(). */

View File

@ -565,7 +565,7 @@ int parse_kbinput(WINDOW *win)
retval = sc_seq_or(do_page_up, *kbinput);
break;
case KEY_ENTER:
retval = sc_seq_or(do_enter_void, *kbinput);
retval = sc_seq_or(do_enter, *kbinput);
break;
case KEY_B2: /* Center (5) on numeric keypad with
* NumLock off. */