summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline/vi_mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/readline/vi_mode.c')
-rw-r--r--cmd-line-utils/readline/vi_mode.c83
1 files changed, 28 insertions, 55 deletions
diff --git a/cmd-line-utils/readline/vi_mode.c b/cmd-line-utils/readline/vi_mode.c
index 9a8cfdd7200..4d1cc56117d 100644
--- a/cmd-line-utils/readline/vi_mode.c
+++ b/cmd-line-utils/readline/vi_mode.c
@@ -112,7 +112,7 @@ _rl_vi_initialize_line ()
{
register int i;
- for (i = 0; i < sizeof (vi_mark_chars) / sizeof (int); i++)
+ for (i = 0; i < (int) (sizeof (vi_mark_chars) / sizeof (int)); i++)
vi_mark_chars[i] = -1;
}
@@ -166,8 +166,7 @@ _rl_vi_stuff_insert (count)
redo a text modification command. The default for _rl_vi_last_command
puts you back into insert mode. */
int
-rl_vi_redo (count, c)
- int count, c;
+rl_vi_redo (int count, int c __attribute__((unused)))
{
int r;
@@ -205,8 +204,7 @@ rl_vi_undo (count, key)
/* Yank the nth arg from the previous line into this line at point. */
int
-rl_vi_yank_arg (count, key)
- int count, key;
+rl_vi_yank_arg (int count, int key __attribute__((unused)))
{
/* Readline thinks that the first word on a line is the 0th, while vi
thinks the first word on a line is the 1st. Compensate. */
@@ -286,8 +284,7 @@ rl_vi_search (count, key)
/* Completion, from vi's point of view. */
int
-rl_vi_complete (ignore, key)
- int ignore, key;
+rl_vi_complete (int ignore __attribute__((unused)), int key)
{
if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
{
@@ -313,8 +310,7 @@ rl_vi_complete (ignore, key)
/* Tilde expansion for vi mode. */
int
-rl_vi_tilde_expand (ignore, key)
- int ignore, key;
+rl_vi_tilde_expand (int ignore __attribute__((unused)), int key)
{
rl_tilde_expand (0, key);
rl_vi_start_inserting (key, 1, rl_arg_sign);
@@ -384,8 +380,7 @@ rl_vi_end_word (count, key)
/* Move forward a word the way that 'W' does. */
int
-rl_vi_fWord (count, ignore)
- int count, ignore;
+rl_vi_fWord (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -401,8 +396,7 @@ rl_vi_fWord (count, ignore)
}
int
-rl_vi_bWord (count, ignore)
- int count, ignore;
+rl_vi_bWord (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point > 0)
{
@@ -425,8 +419,7 @@ rl_vi_bWord (count, ignore)
}
int
-rl_vi_eWord (count, ignore)
- int count, ignore;
+rl_vi_eWord(int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -456,8 +449,7 @@ rl_vi_eWord (count, ignore)
}
int
-rl_vi_fword (count, ignore)
- int count, ignore;
+rl_vi_fword (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point < (rl_end - 1))
{
@@ -482,8 +474,7 @@ rl_vi_fword (count, ignore)
}
int
-rl_vi_bword (count, ignore)
- int count, ignore;
+rl_vi_bword (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point > 0)
{
@@ -521,8 +512,7 @@ rl_vi_bword (count, ignore)
}
int
-rl_vi_eword (count, ignore)
- int count, ignore;
+rl_vi_eword (int count, int ignore __attribute__((unused)))
{
while (count-- && rl_point < rl_end - 1)
{
@@ -546,8 +536,7 @@ rl_vi_eword (count, ignore)
}
int
-rl_vi_insert_beg (count, key)
- int count, key;
+rl_vi_insert_beg (int count __attribute__((unused)), int key)
{
rl_beg_of_line (1, key);
rl_vi_insertion_mode (1, key);
@@ -555,8 +544,7 @@ rl_vi_insert_beg (count, key)
}
int
-rl_vi_append_mode (count, key)
- int count, key;
+rl_vi_append_mode (int count __attribute__((unused)), int key)
{
if (rl_point < rl_end)
{
@@ -575,8 +563,7 @@ rl_vi_append_mode (count, key)
}
int
-rl_vi_append_eol (count, key)
- int count, key;
+rl_vi_append_eol (int count __attribute__((unused)), int key)
{
rl_end_of_line (1, key);
rl_vi_append_mode (1, key);
@@ -585,8 +572,7 @@ rl_vi_append_eol (count, key)
/* What to do in the case of C-d. */
int
-rl_vi_eof_maybe (count, c)
- int count, c;
+rl_vi_eof_maybe (int count __attribute__((unused)), int c __attribute__((unused)))
{
return (rl_newline (1, '\n'));
}
@@ -596,8 +582,7 @@ rl_vi_eof_maybe (count, c)
/* Switching from one mode to the other really just involves
switching keymaps. */
int
-rl_vi_insertion_mode (count, key)
- int count, key;
+rl_vi_insertion_mode (int count __attribute__((unused)), int key)
{
_rl_keymap = vi_insertion_keymap;
_rl_vi_last_key_before_insert = key;
@@ -659,8 +644,7 @@ _rl_vi_done_inserting ()
}
int
-rl_vi_movement_mode (count, key)
- int count, key;
+rl_vi_movement_mode (int count __attribute__((unused)), int key)
{
if (rl_point > 0)
rl_backward_char (1, key);
@@ -729,8 +713,7 @@ _rl_vi_change_mbchar_case (count)
#endif
int
-rl_vi_change_case (count, ignore)
- int count, ignore;
+rl_vi_change_case (int count, int ignore __attribute__((unused)))
{
int c, p;
@@ -959,8 +942,7 @@ rl_digit_loop1 ()
}
int
-rl_vi_delete_to (count, key)
- int count, key;
+rl_vi_delete_to (int count __attribute__((unused)), int key)
{
int c;
@@ -985,8 +967,7 @@ rl_vi_delete_to (count, key)
}
int
-rl_vi_change_to (count, key)
- int count, key;
+rl_vi_change_to (int count __attribute__((unused)), int key)
{
int c, start_pos;
@@ -1038,8 +1019,7 @@ rl_vi_change_to (count, key)
}
int
-rl_vi_yank_to (count, key)
- int count, key;
+rl_vi_yank_to (int count __attribute__((unused)), int key)
{
int c, save = rl_point;
@@ -1094,8 +1074,7 @@ rl_vi_delete (count, key)
}
int
-rl_vi_back_to_indent (count, key)
- int count, key;
+rl_vi_back_to_indent (int count __attribute__((unused)), int key)
{
rl_beg_of_line (1, key);
while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
@@ -1104,8 +1083,7 @@ rl_vi_back_to_indent (count, key)
}
int
-rl_vi_first_print (count, key)
- int count, key;
+rl_vi_first_print (int count __attribute__((unused)), int key)
{
return (rl_vi_back_to_indent (1, key));
}
@@ -1173,8 +1151,7 @@ rl_vi_char_search (count, key)
/* Match brackets */
int
-rl_vi_match (ignore, key)
- int ignore, key;
+rl_vi_match (int ignore __attribute__((unused)), int key)
{
int count = 1, brack, pos, tmp, pre;
@@ -1284,8 +1261,7 @@ rl_vi_bracktype (c)
for test against 033 or ^C. Make sure that _rl_read_mbchar does
this right. */
int
-rl_vi_change_char (count, key)
- int count, key;
+rl_vi_change_char (int count, int key __attribute__((unused)))
{
int c, p;
@@ -1389,8 +1365,7 @@ rl_vi_overstrike_delete (count, key)
}
int
-rl_vi_replace (count, key)
- int count, key;
+rl_vi_replace (int count __attribute__((unused)), int key __attribute__((unused)))
{
int i;
@@ -1450,8 +1425,7 @@ rl_vi_possible_completions()
/* Functions to save and restore marks. */
int
-rl_vi_set_mark (count, key)
- int count, key;
+rl_vi_set_mark (int count __attribute__((unused)), int key __attribute__((unused)))
{
int ch;
@@ -1470,8 +1444,7 @@ rl_vi_set_mark (count, key)
}
int
-rl_vi_goto_mark (count, key)
- int count, key;
+rl_vi_goto_mark (int count __attribute__((unused)), int key __attribute__((unused)))
{
int ch;