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-d3aeb78583b8master
parent
cfa297622b
commit
d0e234db08
|
@ -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>
|
2014-05-27 Chris Allegretta <chrisa@asty.org>
|
||||||
* src/winio.c (edit_refresh): wredrawln() is not supported under
|
* src/winio.c (edit_refresh): wredrawln() is not supported under
|
||||||
slang.
|
slang.
|
||||||
|
|
28
src/nano.c
28
src/nano.c
|
@ -1564,15 +1564,10 @@ void terminal_init(void)
|
||||||
|
|
||||||
/* Read in a character, interpret it as a shortcut or toggle if
|
/* 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
|
* 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
|
* meta sequence, set func_key to TRUE if the character is a function key.
|
||||||
* key, set s_or_t to TRUE if the character is a shortcut or toggle
|
* If allow_funcs is FALSE, don't actually run any functions associated
|
||||||
* 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
|
|
||||||
* with shortcut keys. */
|
* with shortcut keys. */
|
||||||
int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
|
int do_input(bool *meta_key, bool *func_key, bool allow_funcs)
|
||||||
*ran_func, bool *finished, bool allow_funcs)
|
|
||||||
{
|
{
|
||||||
int input;
|
int input;
|
||||||
/* The character we read in. */
|
/* 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;
|
const sc *s;
|
||||||
bool have_shortcut;
|
bool have_shortcut;
|
||||||
|
|
||||||
*s_or_t = FALSE;
|
|
||||||
*ran_func = FALSE;
|
|
||||||
*finished = FALSE;
|
|
||||||
|
|
||||||
/* Read in a character. */
|
/* Read in a character. */
|
||||||
input = get_kbinput(edit, meta_key, func_key);
|
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) {
|
if (have_shortcut) {
|
||||||
switch (input) {
|
switch (input) {
|
||||||
/* Handle the normal edit window shortcuts, setting
|
/* Handle the normal edit-window shortcuts. */
|
||||||
* 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. */
|
|
||||||
default:
|
default:
|
||||||
/* If the function associated with this shortcut is
|
/* If the function associated with this shortcut is
|
||||||
* cutting or copying text, indicate this. */
|
* 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) {
|
if (s->scfunc != 0) {
|
||||||
const subnfunc *f = sctofunc((sc *) s);
|
const subnfunc *f = sctofunc((sc *) s);
|
||||||
*ran_func = TRUE;
|
|
||||||
if (ISSET(VIEW_MODE) && f && !f->viewok)
|
if (ISSET(VIEW_MODE) && f && !f->viewok)
|
||||||
print_view_warning();
|
print_view_warning();
|
||||||
else {
|
else {
|
||||||
|
@ -1726,7 +1712,6 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*finished = TRUE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2779,7 +2764,7 @@ int main(int argc, char **argv)
|
||||||
display_buffer();
|
display_buffer();
|
||||||
|
|
||||||
while (TRUE) {
|
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. */
|
/* Make sure the cursor is in the edit window. */
|
||||||
reset_cursor();
|
reset_cursor();
|
||||||
|
@ -2809,8 +2794,7 @@ int main(int argc, char **argv)
|
||||||
currmenu = MMAIN;
|
currmenu = MMAIN;
|
||||||
|
|
||||||
/* Read in and interpret characters. */
|
/* Read in and interpret characters. */
|
||||||
do_input(&meta_key, &func_key, &s_or_t, &ran_func, &finished,
|
do_input(&meta_key, &func_key, TRUE);
|
||||||
TRUE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We should never get here. */
|
/* We should never get here. */
|
||||||
|
|
|
@ -477,8 +477,7 @@ void enable_signals(void);
|
||||||
void disable_flow_control(void);
|
void disable_flow_control(void);
|
||||||
void enable_flow_control(void);
|
void enable_flow_control(void);
|
||||||
void terminal_init(void);
|
void terminal_init(void);
|
||||||
int do_input(bool *meta_key, bool *func_key, bool *have_shortcut, bool
|
int do_input(bool *meta_key, bool *func_key, bool allow_funcs);
|
||||||
*ran_func, bool *finished, bool allow_funcs);
|
|
||||||
#ifndef DISABLE_MOUSE
|
#ifndef DISABLE_MOUSE
|
||||||
int do_mouse(void);
|
int do_mouse(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1970,7 +1970,7 @@ void do_justify(bool full_justify)
|
||||||
bool modified_save = openfile->modified;
|
bool modified_save = openfile->modified;
|
||||||
|
|
||||||
int kbinput;
|
int kbinput;
|
||||||
bool meta_key, func_key, s_or_t, ran_func, finished;
|
bool meta_key, func_key;
|
||||||
const sc *s;
|
const sc *s;
|
||||||
|
|
||||||
/* Move to the beginning of the current line, so that justifying at
|
/* 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
|
/* Now get a keystroke and see if it's unjustify. If not, put back
|
||||||
* the keystroke and return. */
|
* the keystroke and return. */
|
||||||
kbinput = do_input(&meta_key, &func_key, &s_or_t, &ran_func,
|
kbinput = do_input(&meta_key, &func_key, FALSE);
|
||||||
&finished, FALSE);
|
|
||||||
s = get_shortcut(MMAIN, &kbinput, &meta_key);
|
s = get_shortcut(MMAIN, &kbinput, &meta_key);
|
||||||
|
|
||||||
if (s && s->scfunc == do_uncut_text) {
|
if (s && s->scfunc == do_uncut_text) {
|
||||||
|
|
Loading…
Reference in New Issue