Commit 25e58962 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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
parent 051c9ba4
Showing with 28 additions and 25 deletions
+28 -25
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> 2014-04-22 Benno Schulenberg <bensberg@justemail.net>
* src/global.c (shortcut_init): Put the movement keys in the * src/global.c (shortcut_init): Put the movement keys in the
help viewer in the order of increasing stride. help viewer in the order of increasing stride.
...@@ -12,6 +16,7 @@ ...@@ -12,6 +16,7 @@
* src/global.c (shortcut_init): List function key after meta key. * src/global.c (shortcut_init): List function key after meta key.
* src/help.c (help_init): Show just two shortcuts per function -- * src/help.c (help_init): Show just two shortcuts per function --
only three functions showed three, but who has an F13, F14, F15? 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, * src/help.c (help_init): Split the toggles into three groups,
and do not show toggle keys that have been rebound. and do not show toggle keys that have been rebound.
......
...@@ -561,7 +561,6 @@ void parse_browser_input(int *kbinput, bool *meta_key) ...@@ -561,7 +561,6 @@ void parse_browser_input(int *kbinput, bool *meta_key)
*kbinput = sc_seq_or(do_help_void, 0); *kbinput = sc_seq_or(do_help_void, 0);
#endif #endif
break; break;
/* Cancel equivalent to Exit here. */
case 'E': case 'E':
case 'e': case 'e':
*kbinput = sc_seq_or(do_exit, 0); *kbinput = sc_seq_or(do_exit, 0);
......
...@@ -497,12 +497,11 @@ void parse_help_input(int *kbinput, bool *meta_key) ...@@ -497,12 +497,11 @@ void parse_help_input(int *kbinput, bool *meta_key)
*kbinput = sc_seq_or(do_page_down, 0); *kbinput = sc_seq_or(do_page_down, 0);
break; break;
case '-': case '-':
*kbinput = sc_seq_or(do_page_up, 0);; *kbinput = sc_seq_or(do_page_up, 0);
break; break;
/* Cancel is equivalent to Exit here. */
case 'E': case 'E':
case 'e': case 'e':
*kbinput = sc_seq_or(do_exit, 0);; *kbinput = sc_seq_or(do_exit, 0);
break; break;
} }
} }
......
...@@ -1025,7 +1025,7 @@ void update_undo(undo_type action) ...@@ -1025,7 +1025,7 @@ void update_undo(undo_type action)
} }
data = charalloc(len); data = charalloc(len);
strcpy(data, u->strdata); 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'; data[len-1] = '\0';
free(u->strdata); free(u->strdata);
u->strdata = data; u->strdata = data;
......
...@@ -761,12 +761,12 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len) ...@@ -761,12 +761,12 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
retval = sc_seq_or(do_end, 0); retval = sc_seq_or(do_end, 0);
break; break;
case 'H': /* Esc O H == Home on xterm/Terminal. */ case 'H': /* Esc O H == Home on xterm/Terminal. */
retval = sc_seq_or(do_home, 0);; retval = sc_seq_or(do_home, 0);
break; break;
case 'M': /* Esc O M == Enter on numeric keypad with case 'M': /* Esc O M == Enter on numeric keypad with
* NumLock off on VT100/VT220/VT320/xterm/ * NumLock off on VT100/VT220/VT320/xterm/
* rxvt/Eterm. */ * rxvt/Eterm. */
retval = sc_seq_or(do_home, 0);; retval = sc_seq_or(do_home, 0);
break; break;
case 'P': /* Esc O P == F1 on VT100/VT220/VT320/Mach case 'P': /* Esc O P == F1 on VT100/VT220/VT320/Mach
* console. */ * console. */
...@@ -831,7 +831,7 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len) ...@@ -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 case 'n': /* Esc O n == Delete (.) on numeric keypad
* with NumLock off on VT100/VT220/VT320/ * with NumLock off on VT100/VT220/VT320/
* xterm/rxvt/Eterm/Terminal. */ * xterm/rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_delete, 0);; retval = sc_seq_or(do_delete, 0);
break; break;
case 'o': /* Esc O o == '/' on numeric keypad with case 'o': /* Esc O o == '/' on numeric keypad with
* NumLock off on VT100/VT220/VT320/xterm/ * NumLock off on VT100/VT220/VT320/xterm/
...@@ -841,27 +841,27 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len) ...@@ -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 case 'p': /* Esc O p == Insert (0) on numeric keypad
* with NumLock off on VT100/VT220/VT320/ * with NumLock off on VT100/VT220/VT320/
* rxvt/Eterm/Terminal. */ * rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_insertfile_void, 0);; retval = sc_seq_or(do_insertfile_void, 0);
break; break;
case 'q': /* Esc O q == End (1) on numeric keypad case 'q': /* Esc O q == End (1) on numeric keypad
* with NumLock off on VT100/VT220/VT320/ * with NumLock off on VT100/VT220/VT320/
* rxvt/Eterm/Terminal. */ * rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_end, 0);; retval = sc_seq_or(do_end, 0);
break; break;
case 'r': /* Esc O r == Down (2) on numeric keypad case 'r': /* Esc O r == Down (2) on numeric keypad
* with NumLock off on VT100/VT220/VT320/ * with NumLock off on VT100/VT220/VT320/
* rxvt/Eterm/Terminal. */ * rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_down_void, 0);; retval = sc_seq_or(do_down_void, 0);
break; break;
case 's': /* Esc O s == PageDown (3) on numeric case 's': /* Esc O s == PageDown (3) on numeric
* keypad with NumLock off on VT100/VT220/ * keypad with NumLock off on VT100/VT220/
* VT320/rxvt/Eterm/Terminal. */ * VT320/rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_page_down, 0);; retval = sc_seq_or(do_page_down, 0);
break; break;
case 't': /* Esc O t == Left (4) on numeric keypad case 't': /* Esc O t == Left (4) on numeric keypad
* with NumLock off on VT100/VT220/VT320/ * with NumLock off on VT100/VT220/VT320/
* rxvt/Eterm/Terminal. */ * rxvt/Eterm/Terminal. */
retval = sc_seq_or(do_left, 0);; retval = sc_seq_or(do_left, 0);
break; break;
case 'u': /* Esc O u == Center (5) on numeric keypad case 'u': /* Esc O u == Center (5) on numeric keypad
* with NumLock off on VT100/VT220/VT320/ * with NumLock off on VT100/VT220/VT320/
...@@ -980,7 +980,7 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len) ...@@ -980,7 +980,7 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
break; break;
default: /* Esc [ 1 ~ == Home on default: /* Esc [ 1 ~ == Home on
* VT320/Linux console. */ * VT320/Linux console. */
retval = sc_seq_or(do_home, 0);; retval = sc_seq_or(do_home, 0);
break; break;
} }
} }
...@@ -1031,28 +1031,28 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len) ...@@ -1031,28 +1031,28 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
default: /* Esc [ 2 ~ == Insert on default: /* Esc [ 2 ~ == Insert on
* VT220/VT320/Linux console/ * VT220/VT320/Linux console/
* xterm/Terminal. */ * xterm/Terminal. */
retval = sc_seq_or(do_insertfile_void, 0);; retval = sc_seq_or(do_insertfile_void, 0);
break; break;
} }
} }
break; break;
case '3': /* Esc [ 3 ~ == Delete on VT220/VT320/ case '3': /* Esc [ 3 ~ == Delete on VT220/VT320/
* Linux console/xterm/Terminal. */ * Linux console/xterm/Terminal. */
retval = sc_seq_or(do_delete, 0);; retval = sc_seq_or(do_delete, 0);
break; break;
case '4': /* Esc [ 4 ~ == End on VT220/VT320/Linux case '4': /* Esc [ 4 ~ == End on VT220/VT320/Linux
* console/xterm. */ * console/xterm. */
retval = sc_seq_or(do_end, 0);; retval = sc_seq_or(do_end, 0);
break; break;
case '5': /* Esc [ 5 ~ == PageUp on VT220/VT320/ case '5': /* Esc [ 5 ~ == PageUp on VT220/VT320/
* Linux console/xterm/Terminal; * Linux console/xterm/Terminal;
* Esc [ 5 ^ == PageUp on Eterm. */ * Esc [ 5 ^ == PageUp on Eterm. */
retval = sc_seq_or(do_page_up, 0);; retval = sc_seq_or(do_page_up, 0);
break; break;
case '6': /* Esc [ 6 ~ == PageDown on VT220/VT320/ case '6': /* Esc [ 6 ~ == PageDown on VT220/VT320/
* Linux console/xterm/Terminal; * Linux console/xterm/Terminal;
* Esc [ 6 ^ == PageDown on Eterm. */ * Esc [ 6 ^ == PageDown on Eterm. */
retval = sc_seq_or(do_page_down, 0);; retval = sc_seq_or(do_page_down, 0);
break; break;
case '7': /* Esc [ 7 ~ == Home on rxvt. */ case '7': /* Esc [ 7 ~ == Home on rxvt. */
retval = sc_seq_or(do_home, 0); retval = sc_seq_or(do_home, 0);
...@@ -1061,10 +1061,10 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len) ...@@ -1061,10 +1061,10 @@ int get_escape_seq_kbinput(const int *seq, size_t seq_len)
retval = sc_seq_or(do_end, 0); retval = sc_seq_or(do_end, 0);
break; break;
case '9': /* Esc [ 9 == Delete on Mach console. */ case '9': /* Esc [ 9 == Delete on Mach console. */
retval = sc_seq_or(do_delete, 0);; retval = sc_seq_or(do_delete, 0);
break; break;
case '@': /* Esc [ @ == Insert on Mach console. */ case '@': /* Esc [ @ == Insert on Mach console. */
retval = sc_seq_or(do_insertfile_void, 0);; retval = sc_seq_or(do_insertfile_void, 0);
break; break;
case 'A': /* Esc [ A == Up on ANSI/VT220/Linux case 'A': /* Esc [ A == Up on ANSI/VT220/Linux
* console/FreeBSD console/Mach console/ * console/FreeBSD console/Mach console/
...@@ -1220,13 +1220,13 @@ int get_escape_seq_abcd(int kbinput) ...@@ -1220,13 +1220,13 @@ int get_escape_seq_abcd(int kbinput)
{ {
switch (tolower(kbinput)) { switch (tolower(kbinput)) {
case 'a': case 'a':
return sc_seq_or(do_up_void, 0);; return sc_seq_or(do_up_void, 0);
case 'b': case 'b':
return sc_seq_or(do_down_void, 0);; return sc_seq_or(do_down_void, 0);
case 'c': case 'c':
return sc_seq_or(do_right, 0);; return sc_seq_or(do_right, 0);
case 'd': case 'd':
return sc_seq_or(do_left, 0);; return sc_seq_or(do_left, 0);
default: default:
return ERR; return ERR;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment