Removeing several unneeded double semicolons plus two relic comments.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4809 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-04-23 19:33:03 +00:00
parent 051c9ba418
commit 25e5896219
5 changed files with 28 additions and 25 deletions

View File

@ -1,3 +1,7 @@
2014-04-23 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c, src/help.c, src/text.c, src/browser.c: Remove
several unneeded double semicolons, and two relic comments.
2014-04-22 Benno Schulenberg <bensberg@justemail.net>
* src/global.c (shortcut_init): Put the movement keys in the
help viewer in the order of increasing stride.
@ -12,6 +16,7 @@
* src/global.c (shortcut_init): List function key after meta key.
* src/help.c (help_init): Show just two shortcuts per function --
only three functions showed three, but who has an F13, F14, F15?
This also fixes Savannah bug #41889: misalignment of help text.
* src/help.c (help_init): Split the toggles into three groups,
and do not show toggle keys that have been rebound.

View File

@ -561,7 +561,6 @@ void parse_browser_input(int *kbinput, bool *meta_key)
*kbinput = sc_seq_or(do_help_void, 0);
#endif
break;
/* Cancel equivalent to Exit here. */
case 'E':
case 'e':
*kbinput = sc_seq_or(do_exit, 0);

View File

@ -497,12 +497,11 @@ void parse_help_input(int *kbinput, bool *meta_key)
*kbinput = sc_seq_or(do_page_down, 0);
break;
case '-':
*kbinput = sc_seq_or(do_page_up, 0);;
*kbinput = sc_seq_or(do_page_up, 0);
break;
/* Cancel is equivalent to Exit here. */
case 'E':
case 'e':
*kbinput = sc_seq_or(do_exit, 0);;
*kbinput = sc_seq_or(do_exit, 0);
break;
}
}

View File

@ -1025,7 +1025,7 @@ void update_undo(undo_type action)
}
data = charalloc(len);
strcpy(data, u->strdata);
data[len-2] = fs->current->data[fs->current_x];;
data[len-2] = fs->current->data[fs->current_x];
data[len-1] = '\0';
free(u->strdata);
u->strdata = data;

View File

@ -761,12 +761,12 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
retval = sc_seq_or(do_end, 0);
break;
case 'H': /* Esc O H == Home on xterm/Terminal. */
retval = sc_seq_or(do_home, 0);;
retval = sc_seq_or(do_home, 0);
break;
case 'M': /* Esc O M == Enter on numeric keypad with
* NumLock off on VT100/VT220/VT320/xterm/
* rxvt/Eterm. */
retval = sc_seq_or(do_home, 0);;
retval = sc_seq_or(do_home, 0);
break;
case 'P': /* Esc O P == F1 on VT100/VT220/VT320/Mach
* console. */
@ -831,7 +831,7 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
case 'n': /* Esc O n == Delete (.) on numeric keypad
* with NumLock off on VT100/VT220/VT320/
* xterm/rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_delete, 0);;
retval = sc_seq_or(do_delete, 0);
break;
case 'o': /* Esc O o == '/' on numeric keypad with
* NumLock off on VT100/VT220/VT320/xterm/
@ -841,27 +841,27 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
case 'p': /* Esc O p == Insert (0) on numeric keypad
* with NumLock off on VT100/VT220/VT320/
* rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_insertfile_void, 0);;
retval = sc_seq_or(do_insertfile_void, 0);
break;
case 'q': /* Esc O q == End (1) on numeric keypad
* with NumLock off on VT100/VT220/VT320/
* rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_end, 0);;
retval = sc_seq_or(do_end, 0);
break;
case 'r': /* Esc O r == Down (2) on numeric keypad
* with NumLock off on VT100/VT220/VT320/
* rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_down_void, 0);;
retval = sc_seq_or(do_down_void, 0);
break;
case 's': /* Esc O s == PageDown (3) on numeric
* keypad with NumLock off on VT100/VT220/
* VT320/rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_page_down, 0);;
retval = sc_seq_or(do_page_down, 0);
break;
case 't': /* Esc O t == Left (4) on numeric keypad
* with NumLock off on VT100/VT220/VT320/
* rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_left, 0);;
retval = sc_seq_or(do_left, 0);
break;
case 'u': /* Esc O u == Center (5) on numeric keypad
* with NumLock off on VT100/VT220/VT320/
@ -980,7 +980,7 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
break;
default: /* Esc [ 1 ~ == Home on
* VT320/Linux console. */
retval = sc_seq_or(do_home, 0);;
retval = sc_seq_or(do_home, 0);
break;
}
}
@ -1031,28 +1031,28 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
default: /* Esc [ 2 ~ == Insert on
* VT220/VT320/Linux console/
* xterm/Terminal. */
retval = sc_seq_or(do_insertfile_void, 0);;
retval = sc_seq_or(do_insertfile_void, 0);
break;
}
}
break;
case '3': /* Esc [ 3 ~ == Delete on VT220/VT320/
* Linux console/xterm/Terminal. */
retval = sc_seq_or(do_delete, 0);;
retval = sc_seq_or(do_delete, 0);
break;
case '4': /* Esc [ 4 ~ == End on VT220/VT320/Linux
* console/xterm. */
retval = sc_seq_or(do_end, 0);;
retval = sc_seq_or(do_end, 0);
break;
case '5': /* Esc [ 5 ~ == PageUp on VT220/VT320/
* Linux console/xterm/Terminal;
* Esc [ 5 ^ == PageUp on Eterm. */
retval = sc_seq_or(do_page_up, 0);;
retval = sc_seq_or(do_page_up, 0);
break;
case '6': /* Esc [ 6 ~ == PageDown on VT220/VT320/
* Linux console/xterm/Terminal;
* Esc [ 6 ^ == PageDown on Eterm. */
retval = sc_seq_or(do_page_down, 0);;
retval = sc_seq_or(do_page_down, 0);
break;
case '7': /* Esc [ 7 ~ == Home on rxvt. */
retval = sc_seq_or(do_home, 0);
@ -1061,10 +1061,10 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
retval = sc_seq_or(do_end, 0);
break;
case '9': /* Esc [ 9 == Delete on Mach console. */
retval = sc_seq_or(do_delete, 0);;
retval = sc_seq_or(do_delete, 0);
break;
case '@': /* Esc [ @ == Insert on Mach console. */
retval = sc_seq_or(do_insertfile_void, 0);;
retval = sc_seq_or(do_insertfile_void, 0);
break;
case 'A': /* Esc [ A == Up on ANSI/VT220/Linux
* console/FreeBSD console/Mach console/
@ -1220,13 +1220,13 @@ int get_escape_seq_abcd(int kbinput)
{
switch (tolower(kbinput)) {
case 'a':
return sc_seq_or(do_up_void, 0);;
return sc_seq_or(do_up_void, 0);
case 'b':
return sc_seq_or(do_down_void, 0);;
return sc_seq_or(do_down_void, 0);
case 'c':
return sc_seq_or(do_right, 0);;
return sc_seq_or(do_right, 0);
case 'd':
return sc_seq_or(do_left, 0);;
return sc_seq_or(do_left, 0);
default:
return ERR;
}