about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/ui/inputwin.c186
1 files changed, 93 insertions, 93 deletions
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index 6ae6f329..c840baac 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -91,23 +91,23 @@ static void _inp_rl_addfuncs(void);
 static int _inp_rl_getc(FILE *stream);
 static void _inp_rl_linehandler(char *line);
 static int _inp_rl_tab_handler(int count, int key);
-static int _inp_rl_clear_handler(int count, int key);
-static int _inp_rl_win1_handler(int count, int key);
-static int _inp_rl_win2_handler(int count, int key);
-static int _inp_rl_win3_handler(int count, int key);
-static int _inp_rl_win4_handler(int count, int key);
-static int _inp_rl_win5_handler(int count, int key);
-static int _inp_rl_win6_handler(int count, int key);
-static int _inp_rl_win7_handler(int count, int key);
-static int _inp_rl_win8_handler(int count, int key);
-static int _inp_rl_win9_handler(int count, int key);
-static int _inp_rl_win0_handler(int count, int key);
-static int _inp_rl_altleft_handler(int count, int key);
-static int _inp_rl_altright_handler(int count, int key);
-static int _inp_rl_pageup_handler(int count, int key);
-static int _inp_rl_pagedown_handler(int count, int key);
-static int _inp_rl_altpageup_handler(int count, int key);
-static int _inp_rl_altpagedown_handler(int count, int key);
+static int _inp_rl_win_clear_handler(int count, int key);
+static int _inp_rl_win_1_handler(int count, int key);
+static int _inp_rl_win_2_handler(int count, int key);
+static int _inp_rl_win_3_handler(int count, int key);
+static int _inp_rl_win_4_handler(int count, int key);
+static int _inp_rl_win_5_handler(int count, int key);
+static int _inp_rl_win_6_handler(int count, int key);
+static int _inp_rl_win_7_handler(int count, int key);
+static int _inp_rl_win_8_handler(int count, int key);
+static int _inp_rl_win_9_handler(int count, int key);
+static int _inp_rl_win_0_handler(int count, int key);
+static int _inp_rl_win_prev_handler(int count, int key);
+static int _inp_rl_win_next_handler(int count, int key);
+static int _inp_rl_win_pageup_handler(int count, int key);
+static int _inp_rl_win_pagedown_handler(int count, int key);
+static int _inp_rl_subwin_pageup_handler(int count, int key);
+static int _inp_rl_subwin_pagedown_handler(int count, int key);
 static int _inp_rl_startup_hook(void);
 
 void
@@ -346,23 +346,23 @@ _inp_win_handle_scroll(void)
 static void
 _inp_rl_addfuncs(void)
 {
-    rl_add_funmap_entry("prof_win_1", _inp_rl_win1_handler);
-    rl_add_funmap_entry("prof_win_2", _inp_rl_win2_handler);
-    rl_add_funmap_entry("prof_win_3", _inp_rl_win3_handler);
-    rl_add_funmap_entry("prof_win_4", _inp_rl_win4_handler);
-    rl_add_funmap_entry("prof_win_5", _inp_rl_win5_handler);
-    rl_add_funmap_entry("prof_win_6", _inp_rl_win6_handler);
-    rl_add_funmap_entry("prof_win_7", _inp_rl_win7_handler);
-    rl_add_funmap_entry("prof_win_8", _inp_rl_win8_handler);
-    rl_add_funmap_entry("prof_win_9", _inp_rl_win9_handler);
-    rl_add_funmap_entry("prof_win_0", _inp_rl_win0_handler);
-    rl_add_funmap_entry("prof_win_prev", _inp_rl_altleft_handler);
-    rl_add_funmap_entry("prof_win_next", _inp_rl_altright_handler);
-    rl_add_funmap_entry("prof_win_pageup", _inp_rl_pageup_handler);
-    rl_add_funmap_entry("prof_win_pagedown", _inp_rl_pagedown_handler);
-    rl_add_funmap_entry("prof_subwin_pageup", _inp_rl_altpageup_handler);
-    rl_add_funmap_entry("prof_subwin_pagedown", _inp_rl_altpagedown_handler);
-    rl_add_funmap_entry("prof_win_clear", _inp_rl_clear_handler);
+    rl_add_funmap_entry("prof_win_1", _inp_rl_win_1_handler);
+    rl_add_funmap_entry("prof_win_2", _inp_rl_win_2_handler);
+    rl_add_funmap_entry("prof_win_3", _inp_rl_win_3_handler);
+    rl_add_funmap_entry("prof_win_4", _inp_rl_win_4_handler);
+    rl_add_funmap_entry("prof_win_5", _inp_rl_win_5_handler);
+    rl_add_funmap_entry("prof_win_6", _inp_rl_win_6_handler);
+    rl_add_funmap_entry("prof_win_7", _inp_rl_win_7_handler);
+    rl_add_funmap_entry("prof_win_8", _inp_rl_win_8_handler);
+    rl_add_funmap_entry("prof_win_9", _inp_rl_win_9_handler);
+    rl_add_funmap_entry("prof_win_0", _inp_rl_win_0_handler);
+    rl_add_funmap_entry("prof_win_prev", _inp_rl_win_prev_handler);
+    rl_add_funmap_entry("prof_win_next", _inp_rl_win_next_handler);
+    rl_add_funmap_entry("prof_win_pageup", _inp_rl_win_pageup_handler);
+    rl_add_funmap_entry("prof_win_pagedown", _inp_rl_win_pagedown_handler);
+    rl_add_funmap_entry("prof_subwin_pageup", _inp_rl_subwin_pageup_handler);
+    rl_add_funmap_entry("prof_subwin_pagedown", _inp_rl_subwin_pagedown_handler);
+    rl_add_funmap_entry("prof_win_clear", _inp_rl_win_clear_handler);
 }
 
 // Readline callbacks
@@ -370,48 +370,48 @@ _inp_rl_addfuncs(void)
 static int
 _inp_rl_startup_hook(void)
 {
-    rl_bind_keyseq("\\e1", _inp_rl_win1_handler);
-    rl_bind_keyseq("\\e2", _inp_rl_win2_handler);
-    rl_bind_keyseq("\\e3", _inp_rl_win3_handler);
-    rl_bind_keyseq("\\e4", _inp_rl_win4_handler);
-    rl_bind_keyseq("\\e5", _inp_rl_win5_handler);
-    rl_bind_keyseq("\\e6", _inp_rl_win6_handler);
-    rl_bind_keyseq("\\e7", _inp_rl_win7_handler);
-    rl_bind_keyseq("\\e8", _inp_rl_win8_handler);
-    rl_bind_keyseq("\\e9", _inp_rl_win9_handler);
-    rl_bind_keyseq("\\e0", _inp_rl_win0_handler);
-
-    rl_bind_keyseq("\\eOP", _inp_rl_win1_handler);
-    rl_bind_keyseq("\\eOQ", _inp_rl_win2_handler);
-    rl_bind_keyseq("\\eOR", _inp_rl_win3_handler);
-    rl_bind_keyseq("\\eOS", _inp_rl_win4_handler);
-    rl_bind_keyseq("\\e[15~", _inp_rl_win5_handler);
-    rl_bind_keyseq("\\e[17~", _inp_rl_win6_handler);
-    rl_bind_keyseq("\\e[18~", _inp_rl_win7_handler);
-    rl_bind_keyseq("\\e[19~", _inp_rl_win8_handler);
-    rl_bind_keyseq("\\e[20~", _inp_rl_win9_handler);
-    rl_bind_keyseq("\\e[21~", _inp_rl_win0_handler);
-
-    rl_bind_keyseq("\\e[1;9D", _inp_rl_altleft_handler);
-    rl_bind_keyseq("\\e[1;3D", _inp_rl_altleft_handler);
-    rl_bind_keyseq("\\e\\e[D", _inp_rl_altleft_handler);
-
-    rl_bind_keyseq("\\e[1;9C", _inp_rl_altright_handler);
-    rl_bind_keyseq("\\e[1;3C", _inp_rl_altright_handler);
-    rl_bind_keyseq("\\e\\e[C", _inp_rl_altright_handler);
-
-    rl_bind_keyseq("\\e\\e[5~", _inp_rl_altpageup_handler);
-    rl_bind_keyseq("\\e[5;3~", _inp_rl_altpageup_handler);
-    rl_bind_keyseq("\\e\\eOy", _inp_rl_altpageup_handler);
-
-    rl_bind_keyseq("\\e\\e[6~", _inp_rl_altpagedown_handler);
-    rl_bind_keyseq("\\e[6;3~", _inp_rl_altpagedown_handler);
-    rl_bind_keyseq("\\e\\eOs", _inp_rl_altpagedown_handler);
-
-    rl_bind_keyseq("\\e[5~", _inp_rl_pageup_handler);
-    rl_bind_keyseq("\\eOy", _inp_rl_pageup_handler);
-    rl_bind_keyseq("\\e[6~", _inp_rl_pagedown_handler);
-    rl_bind_keyseq("\\eOs", _inp_rl_pagedown_handler);
+    rl_bind_keyseq("\\e1", _inp_rl_win_1_handler);
+    rl_bind_keyseq("\\e2", _inp_rl_win_2_handler);
+    rl_bind_keyseq("\\e3", _inp_rl_win_3_handler);
+    rl_bind_keyseq("\\e4", _inp_rl_win_4_handler);
+    rl_bind_keyseq("\\e5", _inp_rl_win_5_handler);
+    rl_bind_keyseq("\\e6", _inp_rl_win_6_handler);
+    rl_bind_keyseq("\\e7", _inp_rl_win_7_handler);
+    rl_bind_keyseq("\\e8", _inp_rl_win_8_handler);
+    rl_bind_keyseq("\\e9", _inp_rl_win_9_handler);
+    rl_bind_keyseq("\\e0", _inp_rl_win_0_handler);
+
+    rl_bind_keyseq("\\eOP", _inp_rl_win_1_handler);
+    rl_bind_keyseq("\\eOQ", _inp_rl_win_2_handler);
+    rl_bind_keyseq("\\eOR", _inp_rl_win_3_handler);
+    rl_bind_keyseq("\\eOS", _inp_rl_win_4_handler);
+    rl_bind_keyseq("\\e[15~", _inp_rl_win_5_handler);
+    rl_bind_keyseq("\\e[17~", _inp_rl_win_6_handler);
+    rl_bind_keyseq("\\e[18~", _inp_rl_win_7_handler);
+    rl_bind_keyseq("\\e[19~", _inp_rl_win_8_handler);
+    rl_bind_keyseq("\\e[20~", _inp_rl_win_9_handler);
+    rl_bind_keyseq("\\e[21~", _inp_rl_win_0_handler);
+
+    rl_bind_keyseq("\\e[1;9D", _inp_rl_win_prev_handler);
+    rl_bind_keyseq("\\e[1;3D", _inp_rl_win_prev_handler);
+    rl_bind_keyseq("\\e\\e[D", _inp_rl_win_prev_handler);
+
+    rl_bind_keyseq("\\e[1;9C", _inp_rl_win_next_handler);
+    rl_bind_keyseq("\\e[1;3C", _inp_rl_win_next_handler);
+    rl_bind_keyseq("\\e\\e[C", _inp_rl_win_next_handler);
+
+    rl_bind_keyseq("\\e\\e[5~", _inp_rl_subwin_pageup_handler);
+    rl_bind_keyseq("\\e[5;3~", _inp_rl_subwin_pageup_handler);
+    rl_bind_keyseq("\\e\\eOy", _inp_rl_subwin_pageup_handler);
+
+    rl_bind_keyseq("\\e\\e[6~", _inp_rl_subwin_pagedown_handler);
+    rl_bind_keyseq("\\e[6;3~", _inp_rl_subwin_pagedown_handler);
+    rl_bind_keyseq("\\e\\eOs", _inp_rl_subwin_pagedown_handler);
+
+    rl_bind_keyseq("\\e[5~", _inp_rl_win_pageup_handler);
+    rl_bind_keyseq("\\eOy", _inp_rl_win_pageup_handler);
+    rl_bind_keyseq("\\e[6~", _inp_rl_win_pagedown_handler);
+    rl_bind_keyseq("\\eOs", _inp_rl_win_pagedown_handler);
 
     rl_bind_key('\t', _inp_rl_tab_handler);
 
@@ -447,7 +447,7 @@ _inp_rl_getc(FILE *stream)
 }
 
 static int
-_inp_rl_clear_handler(int count, int key)
+_inp_rl_win_clear_handler(int count, int key)
 {
     ProfWin *win = wins_get_current();
     win_clear(win);
@@ -492,77 +492,77 @@ _go_to_win(int i)
 }
 
 static int
-_inp_rl_win1_handler(int count, int key)
+_inp_rl_win_1_handler(int count, int key)
 {
     _go_to_win(1);
     return 0;
 }
 
 static int
-_inp_rl_win2_handler(int count, int key)
+_inp_rl_win_2_handler(int count, int key)
 {
     _go_to_win(2);
     return 0;
 }
 
 static int
-_inp_rl_win3_handler(int count, int key)
+_inp_rl_win_3_handler(int count, int key)
 {
     _go_to_win(3);
     return 0;
 }
 
 static int
-_inp_rl_win4_handler(int count, int key)
+_inp_rl_win_4_handler(int count, int key)
 {
     _go_to_win(4);
     return 0;
 }
 
 static int
-_inp_rl_win5_handler(int count, int key)
+_inp_rl_win_5_handler(int count, int key)
 {
     _go_to_win(5);
     return 0;
 }
 
 static int
-_inp_rl_win6_handler(int count, int key)
+_inp_rl_win_6_handler(int count, int key)
 {
     _go_to_win(6);
     return 0;
 }
 
 static int
-_inp_rl_win7_handler(int count, int key)
+_inp_rl_win_7_handler(int count, int key)
 {
     _go_to_win(7);
     return 0;
 }
 
 static int
-_inp_rl_win8_handler(int count, int key)
+_inp_rl_win_8_handler(int count, int key)
 {
     _go_to_win(8);
     return 0;
 }
 
 static int
-_inp_rl_win9_handler(int count, int key)
+_inp_rl_win_9_handler(int count, int key)
 {
     _go_to_win(9);
     return 0;
 }
 
 static int
-_inp_rl_win0_handler(int count, int key)
+_inp_rl_win_0_handler(int count, int key)
 {
     _go_to_win(0);
     return 0;
 }
 
 static int
-_inp_rl_altleft_handler(int count, int key)
+_inp_rl_win_prev_handler(int count, int key)
 {
     ProfWin *window = wins_get_previous();
     if (window) {
@@ -572,7 +572,7 @@ _inp_rl_altleft_handler(int count, int key)
 }
 
 static int
-_inp_rl_altright_handler(int count, int key)
+_inp_rl_win_next_handler(int count, int key)
 {
     ProfWin *window = wins_get_next();
     if (window) {
@@ -582,7 +582,7 @@ _inp_rl_altright_handler(int count, int key)
 }
 
 static int
-_inp_rl_pageup_handler(int count, int key)
+_inp_rl_win_pageup_handler(int count, int key)
 {
     ProfWin *current = wins_get_current();
     win_page_up(current);
@@ -590,7 +590,7 @@ _inp_rl_pageup_handler(int count, int key)
 }
 
 static int
-_inp_rl_pagedown_handler(int count, int key)
+_inp_rl_win_pagedown_handler(int count, int key)
 {
     ProfWin *current = wins_get_current();
     win_page_down(current);
@@ -598,7 +598,7 @@ _inp_rl_pagedown_handler(int count, int key)
 }
 
 static int
-_inp_rl_altpageup_handler(int count, int key)
+_inp_rl_subwin_pageup_handler(int count, int key)
 {
     ProfWin *current = wins_get_current();
     win_sub_page_up(current);
@@ -606,7 +606,7 @@ _inp_rl_altpageup_handler(int count, int key)
 }
 
 static int
-_inp_rl_altpagedown_handler(int count, int key)
+_inp_rl_subwin_pagedown_handler(int count, int key)
 {
     ProfWin *current = wins_get_current();
     win_sub_page_down(current);