Removing three unused parameters from do_input(),

as they are only ever set and never referenced.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-05-28 13:24:05 +00:00
parent cfa297622b
commit d0e234db08
4 changed files with 14 additions and 27 deletions

View File

@ -1,3 +1,8 @@
2014-05-28 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (do_input): Remove the three unused parameters 's_or_t',
'ran_func', and 'finished'. They are only ever set and never used.
* src/text.c (do_justify): Adjust a call of do_input().
2014-05-27 Chris Allegretta <chrisa@asty.org>
* src/winio.c (edit_refresh): wredrawln() is not supported under
slang.

View File

@ -1564,15 +1564,10 @@ void terminal_init(void)
/* Read in a character, interpret it as a shortcut or toggle if
* necessary, and return it. Set meta_key to TRUE if the character is a
* meta sequence, set func_key to TRUE if the character is a function
* key, set s_or_t to TRUE if the character is a shortcut or toggle
* key, set ran_func to TRUE if we ran a function associated with a
* shortcut key, and set finished to TRUE if we're done after running
* or trying to run a function associated with a shortcut key. If
* allow_funcs is FALSE, don't actually run any functions associated
* meta sequence, set func_key to TRUE if the character is a function key.
* If allow_funcs is FALSE, don't actually run any functions associated
* with shortcut keys. */
int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
*ran_func, bool *finished, bool allow_funcs)
int do_input(bool *meta_key, bool *func_key, bool allow_funcs)
{
int input;
/* The character we read in. */
@ -1585,10 +1580,6 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
const sc *s;
bool have_shortcut;
*s_or_t = FALSE;
*ran_func = FALSE;
*finished = FALSE;
/* Read in a character. */
input = get_kbinput(edit, meta_key, func_key);
@ -1681,11 +1672,7 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
if (have_shortcut) {
switch (input) {
/* Handle the normal edit window shortcuts, setting
* ran_func to TRUE if we try to run their associated
* functions and setting finished to TRUE to indicate
* that we're done after running or trying to run their
* associated functions. */
/* Handle the normal edit-window shortcuts. */
default:
/* If the function associated with this shortcut is
* cutting or copying text, indicate this. */
@ -1699,7 +1686,6 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
if (s->scfunc != 0) {
const subnfunc *f = sctofunc((sc *) s);
*ran_func = TRUE;
if (ISSET(VIEW_MODE) && f && !f->viewok)
print_view_warning();
else {
@ -1726,7 +1712,6 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
}
}
}
*finished = TRUE;
break;
}
}
@ -2779,7 +2764,7 @@ int main(int argc, char **argv)
display_buffer();
while (TRUE) {
bool meta_key, func_key, s_or_t, ran_func, finished;
bool meta_key, func_key;
/* Make sure the cursor is in the edit window. */
reset_cursor();
@ -2809,8 +2794,7 @@ int main(int argc, char **argv)
currmenu = MMAIN;
/* Read in and interpret characters. */
do_input(&meta_key, &func_key, &s_or_t, &ran_func, &finished,
TRUE);
do_input(&meta_key, &func_key, TRUE);
}
/* We should never get here. */

View File

@ -477,8 +477,7 @@ void enable_signals(void);
void disable_flow_control(void);
void enable_flow_control(void);
void terminal_init(void);
int do_input(bool *meta_key, bool *func_key, bool *have_shortcut, bool
*ran_func, bool *finished, bool allow_funcs);
int do_input(bool *meta_key, bool *func_key, bool allow_funcs);
#ifndef DISABLE_MOUSE
int do_mouse(void);
#endif

View File

@ -1970,7 +1970,7 @@ void do_justify(bool full_justify)
bool modified_save = openfile->modified;
int kbinput;
bool meta_key, func_key, s_or_t, ran_func, finished;
bool meta_key, func_key;
const sc *s;
/* Move to the beginning of the current line, so that justifying at
@ -2289,8 +2289,7 @@ void do_justify(bool full_justify)
/* Now get a keystroke and see if it's unjustify. If not, put back
* the keystroke and return. */
kbinput = do_input(&meta_key, &func_key, &s_or_t, &ran_func,
&finished, FALSE);
kbinput = do_input(&meta_key, &func_key, FALSE);
s = get_shortcut(MMAIN, &kbinput, &meta_key);
if (s && s->scfunc == do_uncut_text) {