summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/readline/text.c')
-rw-r--r--cmd-line-utils/readline/text.c61
1 files changed, 23 insertions, 38 deletions
diff --git a/cmd-line-utils/readline/text.c b/cmd-line-utils/readline/text.c
index ad7b53ec422..89457be37cd 100644
--- a/cmd-line-utils/readline/text.c
+++ b/cmd-line-utils/readline/text.c
@@ -402,8 +402,7 @@ rl_backward (count, key)
/* Move to the beginning of the line. */
int
-rl_beg_of_line (count, key)
- int count, key;
+rl_beg_of_line (int count __attribute__((unused)), int key __attribute__((unused)))
{
rl_point = 0;
return 0;
@@ -411,8 +410,7 @@ rl_beg_of_line (count, key)
/* Move to the end of the line. */
int
-rl_end_of_line (count, key)
- int count, key;
+rl_end_of_line (int count __attribute__((unused)), int key __attribute__((unused)))
{
rl_point = rl_end;
return 0;
@@ -508,8 +506,7 @@ rl_backward_word (count, key)
/* Clear the current line. Numeric argument to C-l does this. */
int
-rl_refresh_line (ignore1, ignore2)
- int ignore1, ignore2;
+rl_refresh_line (int count __attribute__((unused)), int key __attribute__((unused)))
{
int curr_line;
@@ -547,8 +544,7 @@ rl_clear_screen (count, key)
}
int
-rl_arrow_keys (count, c)
- int count, c;
+rl_arrow_keys (int count, int c __attribute__((unused)))
{
int ch;
@@ -596,7 +592,7 @@ rl_arrow_keys (count, c)
#ifdef HANDLE_MULTIBYTE
static char pending_bytes[MB_LEN_MAX];
static int pending_bytes_length = 0;
-static mbstate_t ps = {0};
+static mbstate_t ps;
#endif
/* Insert the character C at the current location, moving point forward.
@@ -832,8 +828,7 @@ rl_insert (count, c)
/* Insert the next typed character verbatim. */
int
-rl_quoted_insert (count, key)
- int count, key;
+rl_quoted_insert (int count, int key __attribute__((unused)))
{
int c;
@@ -854,8 +849,7 @@ rl_quoted_insert (count, key)
/* Insert a tab character. */
int
-rl_tab_insert (count, key)
- int count, key;
+rl_tab_insert (int count, int key __attribute__((unused)))
{
return (_rl_insert_char (count, '\t'));
}
@@ -864,8 +858,7 @@ rl_tab_insert (count, key)
KEY is the key that invoked this command. I guess it could have
meaning in the future. */
int
-rl_newline (count, key)
- int count, key;
+rl_newline (int count __attribute__((unused)), int key __attribute__((unused)))
{
rl_done = 1;
@@ -898,8 +891,8 @@ rl_newline (count, key)
is just a stub, you bind keys to it and the code in _rl_dispatch ()
is special cased. */
int
-rl_do_lowercase_version (ignore1, ignore2)
- int ignore1, ignore2;
+rl_do_lowercase_version (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
return 0;
}
@@ -1093,8 +1086,8 @@ rl_rubout_or_delete (count, key)
/* Delete all spaces and tabs around point. */
int
-rl_delete_horizontal_space (count, ignore)
- int count, ignore;
+rl_delete_horizontal_space (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
int start = rl_point;
@@ -1134,14 +1127,13 @@ rl_delete_or_show_completions (count, key)
/* Turn the current line into a comment in shell history.
A K*rn shell style function. */
int
-rl_insert_comment (count, key)
- int count, key;
+rl_insert_comment (int count __attribute__((unused)), int key)
{
char *rl_comment_text;
int rl_comment_len;
rl_beg_of_line (1, key);
- rl_comment_text = _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT;
+ rl_comment_text = _rl_comment_begin ? _rl_comment_begin : (char*) RL_COMMENT_BEGIN_DEFAULT;
if (rl_explicit_arg == 0)
rl_insert_text (rl_comment_text);
@@ -1173,24 +1165,21 @@ rl_insert_comment (count, key)
/* Uppercase the word at point. */
int
-rl_upcase_word (count, key)
- int count, key;
+rl_upcase_word (int count, int key __attribute__((unused)))
{
return (rl_change_case (count, UpCase));
}
/* Lowercase the word at point. */
int
-rl_downcase_word (count, key)
- int count, key;
+rl_downcase_word (int count, int key __attribute__((unused)))
{
return (rl_change_case (count, DownCase));
}
/* Upcase the first letter, downcase the rest. */
int
-rl_capitalize_word (count, key)
- int count, key;
+rl_capitalize_word (int count, int key __attribute__((unused)))
{
return (rl_change_case (count, CapCase));
}
@@ -1314,8 +1303,7 @@ rl_transpose_words (count, key)
/* Transpose the characters at point. If point is at the end of the line,
then transpose the characters before point. */
int
-rl_transpose_chars (count, key)
- int count, key;
+rl_transpose_chars (int count, int key __attribute__((unused)))
{
#if defined (HANDLE_MULTIBYTE)
char *dummy;
@@ -1486,15 +1474,13 @@ _rl_char_search (count, fdir, bdir)
#endif /* !HANDLE_MULTIBYTE */
int
-rl_char_search (count, key)
- int count, key;
+rl_char_search (int count, int key __attribute__((unused)))
{
return (_rl_char_search (count, FFIND, BFIND));
}
int
-rl_backward_char_search (count, key)
- int count, key;
+rl_backward_char_search (int count, int key __attribute__((unused)))
{
return (_rl_char_search (count, BFIND, FFIND));
}
@@ -1519,16 +1505,15 @@ _rl_set_mark_at_pos (position)
/* A bindable command to set the mark. */
int
-rl_set_mark (count, key)
- int count, key;
+rl_set_mark (int count, int key __attribute__((unused)))
{
return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point));
}
/* Exchange the position of mark and point. */
int
-rl_exchange_point_and_mark (count, key)
- int count, key;
+rl_exchange_point_and_mark (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (rl_mark > rl_end)
rl_mark = -1;