summaryrefslogtreecommitdiff
path: root/cmd-line-utils
diff options
context:
space:
mode:
authorunknown <monty@nosik.monty.fi>2006-11-22 14:11:36 +0200
committerunknown <monty@nosik.monty.fi>2006-11-22 14:11:36 +0200
commitb8fe9fb47f6b30aa72c16642ca51d84650169817 (patch)
treebd11d4efaf1d6469e7f29237347f12cdf71e605a /cmd-line-utils
parent7463704e1c706ea8e76e4d0022383dfd776e458e (diff)
parent886965303155d1c2fbd90e3606fd192d4ba7741b (diff)
downloadmariadb-git-b8fe9fb47f6b30aa72c16642ca51d84650169817.tar.gz
Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1 BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-my_lread.c: Auto merged BitKeeper/deleted/.del-my_lwrite.c: Auto merged client/mysqlbinlog.cc: Auto merged client/mysqldump.c: Auto merged cmd-line-utils/readline/complete.c: Auto merged extra/yassl/src/ssl.cpp: Auto merged libmysql/libmysql.c: Auto merged libmysqld/libmysqld.c: Auto merged mysql-test/mysql-test-run-shell.sh: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/csv.test: Auto merged mysql-test/t/ctype_cp1250_ch.test: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/func_sapdb.test: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/group_min_max.test: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/join.test: Auto merged mysql-test/t/select.test: Auto merged mysql-test/t/sp-prelocking.test: Auto merged mysql-test/t/strict.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/type_newdecimal.test: Auto merged mysql-test/t/view_grant.test: Auto merged mysys/default.c: Auto merged mysys/mf_iocache.c: Auto merged mysys/mf_keycache.c: Auto merged mysys/my_alloc.c: Auto merged mysys/my_dup.c: Auto merged mysys/my_getwd.c: Auto merged mysys/my_handler.c: Auto merged mysys/my_lib.c: Auto merged mysys/my_malloc.c: Auto merged mysys/my_pread.c: Auto merged mysys/my_seek.c: Auto merged mysys/safemalloc.c: Auto merged sql/Makefile.am: Auto merged sql/filesort.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_subselect.cc: Auto merged sql/log_event.cc: Auto merged sql/net_serv.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_repl.cc: Auto merged sql-common/client.c: Auto merged sql-common/my_time.c: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged sql/strfunc.cc: Auto merged sql/tztime.cc: Auto merged sql/unireg.cc: Auto merged storage/heap/_check.c: Auto merged storage/heap/hp_delete.c: Auto merged storage/heap/hp_hash.c: Auto merged storage/heap/hp_open.c: Auto merged storage/heap/hp_rkey.c: Auto merged storage/heap/hp_rrnd.c: Auto merged storage/heap/hp_write.c: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/mi_close.c: Auto merged storage/myisam/mi_delete.c: Auto merged storage/myisam/mi_dynrec.c: Auto merged storage/myisam/mi_keycache.c: Auto merged storage/myisam/mi_page.c: Auto merged storage/myisam/mi_statrec.c: Auto merged storage/myisam/mi_test2.c: Auto merged storage/myisam/mi_write.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged storage/myisammrg/myrg_extra.c: Auto merged storage/ndb/include/logger/LogHandler.hpp: Auto merged storage/ndb/include/util/OutputStream.hpp: Auto merged storage/ndb/src/common/debugger/EventLogger.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp: Auto merged storage/ndb/src/common/logger/LogHandler.cpp: Auto merged storage/ndb/src/common/portlib/NdbMutex.c: Auto merged storage/ndb/src/common/portlib/NdbThread.c: Auto merged storage/ndb/src/common/transporter/Transporter.cpp: Auto merged storage/ndb/src/cw/cpcd/CPCD.hpp: Auto merged storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp: Auto merged storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.cpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.hpp: Auto merged storage/ndb/src/kernel/error/ndbd_exit_codes.c: Auto merged storage/ndb/src/kernel/vm/TransporterCallback.cpp: Auto merged storage/ndb/src/mgmapi/mgmapi.cpp: Auto merged storage/ndb/src/mgmclient/CommandInterpreter.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged storage/ndb/src/mgmsrv/Services.cpp: Auto merged storage/ndb/src/ndbapi/ClusterMgr.cpp: Auto merged storage/ndb/src/ndbapi/DictCache.cpp: Auto merged storage/ndb/src/ndbapi/Ndb.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationExec.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationInt.cpp: Auto merged storage/ndb/src/ndbapi/NdbTransaction.cpp: Auto merged storage/ndb/src/ndbapi/Ndbif.cpp: Auto merged storage/ndb/tools/drop_index.cpp: Auto merged storage/ndb/tools/drop_tab.cpp: Auto merged storage/ndb/tools/ndb_condig.cpp: Auto merged tests/mysql_client_test.c: Auto merged vio/viossl.c: Auto merged vio/viosslfactories.c: Auto merged BUILD/SETUP.sh: Use local version client/client_priv.h: Manual merge mysql-test/mysql-test-run.pl: Manual merge mysql-test/r/ctype_cp1250_ch.result: Manual merge mysql-test/t/disabled.def: Manual merge mysys/hash.c: Manual merge mysys/thr_lock.c: Manual merge server-tools/instance-manager/mysql_connection.cc: Manual merge sql/ha_ndbcluster.cc: Manual merge sql/handler.cc: Manual merge sql/item_timefunc.cc: Manual merge sql/mysqld.cc: Manual merge sql/opt_range.cc: Manual merge sql/slave.cc: Manual merge sql/sql_parse.cc: Manual merge sql/sql_prepare.cc: Manual merge sql/sql_view.cc: Manual merge sql/table.cc: Manual merge storage/archive/ha_archive.cc: Manual merge storage/federated/ha_federated.cc: Manual merge storage/federated/ha_federated.h: Manual merge storage/innobase/handler/ha_innodb.cc: Manual merge storage/ndb/include/ndb_global.h.in: Manual merge storage/ndb/include/util/InputStream.hpp: Manual merge storage/ndb/include/util/SimpleProperties.hpp: Manual merge storage/ndb/src/kernel/blocks/backup/Backup.cpp: Manual merge storage/ndb/src/ndbapi/NdbOperationDefine.cpp: Manual merge storage/ndb/src/ndbapi/NdbOperationSearch.cpp: Manual merge storage/ndb/src/ndbapi/Ndbinit.cpp: Manual merge storage/ndb/src/ndbapi/ndb_cluster_connection.cpp: Manual merge strings/decimal.c: Manual merge vio/viosocket.c: Manual merge
Diffstat (limited to 'cmd-line-utils')
-rw-r--r--cmd-line-utils/readline/bind.c40
-rw-r--r--cmd-line-utils/readline/chardefs.h4
-rw-r--r--cmd-line-utils/readline/complete.c22
-rw-r--r--cmd-line-utils/readline/display.c17
-rw-r--r--cmd-line-utils/readline/histexpand.c6
-rw-r--r--cmd-line-utils/readline/input.c2
-rw-r--r--cmd-line-utils/readline/isearch.c10
-rw-r--r--cmd-line-utils/readline/kill.c31
-rw-r--r--cmd-line-utils/readline/macro.c10
-rw-r--r--cmd-line-utils/readline/misc.c31
-rw-r--r--cmd-line-utils/readline/nls.c2
-rw-r--r--cmd-line-utils/readline/readline.c4
-rw-r--r--cmd-line-utils/readline/rltty.c7
-rw-r--r--cmd-line-utils/readline/search.c14
-rw-r--r--cmd-line-utils/readline/terminal.c10
-rw-r--r--cmd-line-utils/readline/text.c61
-rw-r--r--cmd-line-utils/readline/tilde.c2
-rw-r--r--cmd-line-utils/readline/undo.c8
-rw-r--r--cmd-line-utils/readline/util.c9
-rw-r--r--cmd-line-utils/readline/vi_mode.c83
20 files changed, 153 insertions, 220 deletions
diff --git a/cmd-line-utils/readline/bind.c b/cmd-line-utils/readline/bind.c
index 17f61d1df08..ab1136c7da5 100644
--- a/cmd-line-utils/readline/bind.c
+++ b/cmd-line-utils/readline/bind.c
@@ -434,7 +434,7 @@ rl_translate_keyseq (seq, array, len)
{
register int i, c, l, temp;
- for (i = l = 0; c = seq[i]; i++)
+ for (i = l = 0; (c = seq[i]); i++)
{
if (c == '\\')
{
@@ -765,8 +765,8 @@ _rl_read_file (filename, sizep)
/* Re-read the current keybindings file. */
int
-rl_re_read_init_file (count, ignore)
- int count, ignore;
+rl_re_read_init_file (int count __attribute__((unused)),
+ int ignore __attribute__((unused)))
{
int r;
r = rl_read_init_file ((const char *)NULL);
@@ -987,8 +987,7 @@ parser_if (args)
/* Invert the current parser state if there is anything on the stack. */
static int
-parser_else (args)
- char *args;
+parser_else (char *args __attribute__((unused)))
{
register int i;
@@ -1018,8 +1017,7 @@ parser_else (args)
/* Terminate a conditional, popping the value of
_rl_parsing_conditionalized_out from the stack. */
static int
-parser_endif (args)
- char *args;
+parser_endif (char *args __attribute__((unused)))
{
if (if_stack_depth)
_rl_parsing_conditionalized_out = if_stack[--if_stack_depth];
@@ -1142,7 +1140,7 @@ rl_parse_and_bind (string)
{
int passc = 0;
- for (i = 1; c = string[i]; i++)
+ for (i = 1; (c = string[i]); i++)
{
if (passc)
{
@@ -1218,7 +1216,7 @@ rl_parse_and_bind (string)
{
int delimiter = string[i++], passc;
- for (passc = 0; c = string[i]; i++)
+ for (passc = 0; (c = string[i]); i++)
{
if (passc)
{
@@ -1377,7 +1375,7 @@ static struct {
#if defined (VISIBLE_STATS)
{ "visible-stats", &rl_visible_stats, 0 },
#endif /* VISIBLE_STATS */
- { (char *)NULL, (int *)NULL }
+ { (char *)NULL, (int *)NULL, 0 }
};
static int
@@ -1446,7 +1444,7 @@ static struct {
{ "editing-mode", V_STRING, sv_editmode },
{ "isearch-terminators", V_STRING, sv_isrchterm },
{ "keymap", V_STRING, sv_keymap },
- { (char *)NULL, 0 }
+ { (char *)NULL, 0, 0 }
};
static int
@@ -1466,7 +1464,7 @@ find_string_var (name)
values result in 0 (false). */
static int
bool_to_int (value)
- char *value;
+const char *value;
{
return (value == 0 || *value == '\0' ||
(_rl_stricmp (value, "on") == 0) ||
@@ -1725,13 +1723,13 @@ char *
rl_get_keymap_name_from_edit_mode ()
{
if (rl_editing_mode == emacs_mode)
- return "emacs";
+ return (char*) "emacs";
#if defined (VI_MODE)
else if (rl_editing_mode == vi_mode)
- return "vi";
+ return (char*) "vi";
#endif /* VI_MODE */
else
- return "none";
+ return (char*) "none";
}
/* **************************************************************** */
@@ -1966,7 +1964,7 @@ rl_function_dumper (print_readably)
fprintf (rl_outstream, "\n");
- for (i = 0; name = names[i]; i++)
+ for (i = 0; (name = names[i]); i++)
{
rl_command_func_t *function;
char **invokers;
@@ -2025,8 +2023,8 @@ rl_function_dumper (print_readably)
rl_outstream. If an explicit argument is given, then print
the output in such a way that it can be read back in. */
int
-rl_dump_functions (count, key)
- int count, key;
+rl_dump_functions (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2105,8 +2103,7 @@ rl_macro_dumper (print_readably)
}
int
-rl_dump_macros (count, key)
- int count, key;
+rl_dump_macros(int count __attribute__((unused)), int key __attribute__((unused)))
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
@@ -2195,8 +2192,7 @@ rl_variable_dumper (print_readably)
rl_outstream. If an explicit argument is given, then print
the output in such a way that it can be read back in. */
int
-rl_dump_variables (count, key)
- int count, key;
+rl_dump_variables(int count __attribute__((unused)), int key __attribute__((unused)))
{
if (rl_dispatching)
fprintf (rl_outstream, "\r\n");
diff --git a/cmd-line-utils/readline/chardefs.h b/cmd-line-utils/readline/chardefs.h
index cb04c982343..04a3b7a8e9c 100644
--- a/cmd-line-utils/readline/chardefs.h
+++ b/cmd-line-utils/readline/chardefs.h
@@ -59,7 +59,11 @@
#define largest_char 255 /* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
+#if largest_char >= 255
+#define META_CHAR(c) ((c) > meta_character_threshold)
+#else
#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
+#endif
#define CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit)
diff --git a/cmd-line-utils/readline/complete.c b/cmd-line-utils/readline/complete.c
index ea459b2118c..526c1edb33d 100644
--- a/cmd-line-utils/readline/complete.c
+++ b/cmd-line-utils/readline/complete.c
@@ -361,15 +361,15 @@ rl_complete (ignore, invoking_key)
/* List the possible completions. See description of rl_complete (). */
int
-rl_possible_completions (ignore, invoking_key)
- int ignore, invoking_key;
+rl_possible_completions (int ignore __attribute__((unused)),
+ int invoking_key __attribute__((unused)))
{
return (rl_complete_internal ('?'));
}
int
-rl_insert_completions (ignore, invoking_key)
- int ignore, invoking_key;
+rl_insert_completions (int ignore __attribute__((unused)),
+ int invoking_key __attribute__((unused)))
{
return (rl_complete_internal ('*'));
}
@@ -761,10 +761,7 @@ print_filename (to_print, full_pathname)
}
static char *
-rl_quote_filename (s, rtype, qcp)
- char *s;
- int rtype;
- char *qcp;
+rl_quote_filename (char *s, int rtype __attribute__((unused)), char *qcp)
{
char *r;
@@ -872,7 +869,7 @@ _rl_find_completion_word (fp, dp)
completion, so use the word break characters to find the
substring on which to complete. */
#if defined (HANDLE_MULTIBYTE)
- while (rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY))
+ while ((rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY)))
#else
while (--rl_point)
#endif
@@ -1806,7 +1803,7 @@ rl_completion_matches (text, entry_function)
match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
match_list[1] = (char *)NULL;
- while (string = (*entry_function) (text, matches))
+ while ((string = (*entry_function) (text, matches)))
{
if (matches + 1 == match_list_size)
match_list = (char **)xrealloc
@@ -1856,7 +1853,7 @@ rl_username_completion_function (text, state)
setpwent ();
}
- while (entry = getpwent ())
+ while ((entry = getpwent ()))
{
/* Null usernames should result in all users as possible completions. */
if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
@@ -2092,8 +2089,7 @@ rl_filename_completion_function (text, state)
hit the end of the match list, we restore the original unmatched text,
ring the bell, and reset the counter to zero. */
int
-rl_menu_complete (count, ignore)
- int count, ignore;
+rl_menu_complete (int count, int ignore __attribute__((unused)))
{
rl_compentry_func_t *our_func;
int matching_filenames, found_quote;
diff --git a/cmd-line-utils/readline/display.c b/cmd-line-utils/readline/display.c
index 06eaa5e4be2..46b57325e33 100644
--- a/cmd-line-utils/readline/display.c
+++ b/cmd-line-utils/readline/display.c
@@ -218,7 +218,7 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
if (niflp)
*niflp = 0;
if (vlp)
- *vlp = lp ? *lp : strlen (r);
+ *vlp = lp ? *lp : (int) strlen (r);
return r;
}
@@ -435,7 +435,7 @@ rl_redisplay ()
return;
if (!rl_display_prompt)
- rl_display_prompt = "";
+ rl_display_prompt = (char*) "";
if (invisible_line == 0)
{
@@ -757,7 +757,7 @@ rl_redisplay ()
c_pos = out;
lb_linenum = newlines;
}
- for (i = in; i < in+wc_bytes; i++)
+ for (i = in; i < (int) (in+wc_bytes); i++)
line[out++] = rl_line_buffer[i];
for (i = 0; i < wc_width; i++)
CHECK_LPOS();
@@ -835,7 +835,7 @@ rl_redisplay ()
#define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
#define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l])
#define VIS_CHARS(line) (visible_line + vis_lbreaks[line])
-#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line)
+#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? (char*) "" : VIS_CHARS(line)
#define INV_LINE(line) (invisible_line + inv_lbreaks[line])
/* For each line in the buffer, do the updating display. */
@@ -876,7 +876,7 @@ rl_redisplay ()
_rl_move_vert (linenum);
_rl_move_cursor_relative (0, tt);
_rl_clear_to_eol
- ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth);
+ ((linenum == _rl_vis_botlin) ? (int) strlen (tt) : _rl_screenwidth);
}
}
_rl_vis_botlin = inv_botlin;
@@ -1086,7 +1086,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin)
int col_lendiff, col_temp;
#if defined (HANDLE_MULTIBYTE)
mbstate_t ps_new, ps_old;
- int new_offset, old_offset, tmp;
+ int new_offset, old_offset;
#endif
/* If we're at the right edge of a terminal that supports xn, we're
@@ -1837,7 +1837,7 @@ rl_reset_line_state ()
{
rl_on_new_line ();
- rl_display_prompt = rl_prompt ? rl_prompt : "";
+ rl_display_prompt = rl_prompt ? rl_prompt : (char*) "";
forced_display = 1;
return 0;
}
@@ -2212,7 +2212,7 @@ _rl_col_width (str, start, end)
int start, end;
{
wchar_t wc;
- mbstate_t ps = {0};
+ mbstate_t ps;
int tmp, point, width, max;
if (end <= start)
@@ -2221,6 +2221,7 @@ _rl_col_width (str, start, end)
point = 0;
max = end;
+ memset (&ps, 0, sizeof(ps));
while (point < start)
{
tmp = mbrlen (str + point, max, &ps);
diff --git a/cmd-line-utils/readline/histexpand.c b/cmd-line-utils/readline/histexpand.c
index 47f97e9a6f7..a09be00a859 100644
--- a/cmd-line-utils/readline/histexpand.c
+++ b/cmd-line-utils/readline/histexpand.c
@@ -87,14 +87,14 @@ char history_comment_char = '\0';
/* The list of characters which inhibit the expansion of text if found
immediately following history_expansion_char. */
-char *history_no_expand_chars = " \t\n\r=";
+char *history_no_expand_chars = (char*) " \t\n\r=";
/* If set to a non-zero value, single quotes inhibit history expansion.
The default is 0. */
int history_quotes_inhibit_expansion = 0;
/* Used to split words by history_tokenize_internal. */
-char *history_word_delimiters = HISTORY_WORD_DELIMITERS;
+char *history_word_delimiters = (char*) HISTORY_WORD_DELIMITERS;
/* If set, this points to a function that is called to verify that a
particular history expansion should be performed. */
@@ -203,7 +203,7 @@ get_history_event (string, caller_index, delimiting_quote)
}
/* Only a closing `?' or a newline delimit a substring search string. */
- for (local_index = i; c = string[i]; i++)
+ for (local_index = i; (c = string[i]); i++)
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
{
diff --git a/cmd-line-utils/readline/input.c b/cmd-line-utils/readline/input.c
index 1981061eac6..b2f8016050d 100644
--- a/cmd-line-utils/readline/input.c
+++ b/cmd-line-utils/readline/input.c
@@ -405,7 +405,7 @@ rl_read_key ()
else
{
/* If input is coming from a macro, then use that. */
- if (c = _rl_next_macro_key ())
+ if ((c= _rl_next_macro_key ()))
return (c);
/* If the user has an event function, then call it periodically. */
diff --git a/cmd-line-utils/readline/isearch.c b/cmd-line-utils/readline/isearch.c
index f7b0f1404e9..9071695dda8 100644
--- a/cmd-line-utils/readline/isearch.c
+++ b/cmd-line-utils/readline/isearch.c
@@ -68,7 +68,7 @@ static char *prev_line_found;
static char *last_isearch_string;
static int last_isearch_string_len;
-static char *default_isearch_terminators = "\033\012";
+static char *default_isearch_terminators = (char*) "\033\012";
/* Search backwards through the history looking for a string which is typed
interactively. Start with the current line. */
@@ -94,9 +94,8 @@ rl_forward_search_history (sign, key)
WHERE is the history list number of the current line. If it is
-1, then this line is the starting one. */
static void
-rl_display_search (search_string, reverse_p, where)
- char *search_string;
- int reverse_p, where;
+rl_display_search (char *search_string, int reverse_p,
+ int where __attribute__((unused)))
{
char *message;
int msglen, searchlen;
@@ -143,8 +142,7 @@ rl_display_search (search_string, reverse_p, where)
DIRECTION is which direction to search; >= 0 means forward, < 0 means
backwards. */
static int
-rl_search_history (direction, invoking_key)
- int direction, invoking_key;
+rl_search_history (int direction, int invoking_key __attribute__((unused)))
{
/* The string that the user types in to search for. */
char *search_string;
diff --git a/cmd-line-utils/readline/kill.c b/cmd-line-utils/readline/kill.c
index 061bdafcf9a..4d31a8ff170 100644
--- a/cmd-line-utils/readline/kill.c
+++ b/cmd-line-utils/readline/kill.c
@@ -76,8 +76,7 @@ static int rl_yank_nth_arg_internal PARAMS((int, int, int));
/* How to say that you only want to save a certain amount
of kill material. */
int
-rl_set_retained_kills (num)
- int num;
+rl_set_retained_kills (int num __attribute__((unused)))
{
return 0;
}
@@ -293,8 +292,8 @@ rl_backward_kill_line (direction, ignore)
/* Kill the whole line, no matter where point is. */
int
-rl_kill_full_line (count, ignore)
- int count, ignore;
+rl_kill_full_line (int count __attribute__((unused)),
+ int ignore __attribute__((unused)))
{
rl_begin_undo_group ();
rl_point = 0;
@@ -311,8 +310,7 @@ rl_kill_full_line (count, ignore)
/* This does what C-w does in Unix. We can't prevent people from
using behaviour that they expect. */
int
-rl_unix_word_rubout (count, key)
- int count, key;
+rl_unix_word_rubout (int count, int key __attribute__((unused)))
{
int orig_point;
@@ -344,8 +342,7 @@ rl_unix_word_rubout (count, key)
/* This deletes one filename component in a Unix pathname. That is, it
deletes backward to directory separator (`/') or whitespace. */
int
-rl_unix_filename_rubout (count, key)
- int count, key;
+rl_unix_filename_rubout (int count, int key __attribute__((unused)))
{
int orig_point, c;
@@ -388,8 +385,8 @@ rl_unix_filename_rubout (count, key)
into the line at all, and if you aren't, then you know what you are
doing. */
int
-rl_unix_line_discard (count, key)
- int count, key;
+rl_unix_line_discard (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (rl_point == 0)
rl_ding ();
@@ -425,16 +422,16 @@ region_kill_internal (delete)
/* Copy the text in the region to the kill ring. */
int
-rl_copy_region_to_kill (count, ignore)
- int count, ignore;
+rl_copy_region_to_kill (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
return (region_kill_internal (0));
}
/* Kill the text between the point and mark. */
int
-rl_kill_region (count, ignore)
- int count, ignore;
+rl_kill_region (int count __attribute__((unused)),
+ int ignore __attribute__((unused)))
{
int r, npoint;
@@ -498,8 +495,7 @@ rl_copy_backward_word (count, key)
/* Yank back the last killed text. This ignores arguments. */
int
-rl_yank (count, ignore)
- int count, ignore;
+rl_yank (int count __attribute__((unused)), int ignore __attribute__((unused)))
{
if (rl_kill_ring == 0)
{
@@ -517,8 +513,7 @@ rl_yank (count, ignore)
delete that text from the line, rotate the index down, and
yank back some other text. */
int
-rl_yank_pop (count, key)
- int count, key;
+rl_yank_pop (int count __attribute__((unused)), int key __attribute__((unused)))
{
int l, n;
diff --git a/cmd-line-utils/readline/macro.c b/cmd-line-utils/readline/macro.c
index f7b77a831b8..8727285e181 100644
--- a/cmd-line-utils/readline/macro.c
+++ b/cmd-line-utils/readline/macro.c
@@ -189,8 +189,8 @@ _rl_kill_kbd_macro ()
definition to the end of the existing macro, and start by
re-executing the existing macro. */
int
-rl_start_kbd_macro (ignore1, ignore2)
- int ignore1, ignore2;
+rl_start_kbd_macro (int ignore1 __attribute__((unused)),
+ int ignore2 __attribute__((unused)))
{
if (RL_ISSTATE (RL_STATE_MACRODEF))
{
@@ -214,8 +214,7 @@ rl_start_kbd_macro (ignore1, ignore2)
A numeric argument says to execute the macro right now,
that many times, counting the definition as the first time. */
int
-rl_end_kbd_macro (count, ignore)
- int count, ignore;
+rl_end_kbd_macro (int count, int ignore __attribute__((unused)))
{
if (RL_ISSTATE (RL_STATE_MACRODEF) == 0)
{
@@ -234,8 +233,7 @@ rl_end_kbd_macro (count, ignore)
/* Execute the most recently defined keyboard macro.
COUNT says how many times to execute it. */
int
-rl_call_last_kbd_macro (count, ignore)
- int count, ignore;
+rl_call_last_kbd_macro (int count, int ignore __attribute__((unused)))
{
if (current_macro == 0)
_rl_abort_internal ();
diff --git a/cmd-line-utils/readline/misc.c b/cmd-line-utils/readline/misc.c
index 810b940edab..c8739d0d750 100644
--- a/cmd-line-utils/readline/misc.c
+++ b/cmd-line-utils/readline/misc.c
@@ -154,8 +154,7 @@ rl_digit_loop ()
/* Add the current digit to the argument in progress. */
int
-rl_digit_argument (ignore, key)
- int ignore, key;
+rl_digit_argument (int ignore __attribute__((unused)), int key)
{
rl_execute_next (key);
return (rl_digit_loop ());
@@ -184,8 +183,8 @@ _rl_init_argument ()
Read a key. If the key has nothing to do with arguments, then
dispatch on it. If the key is the abort character then abort. */
int
-rl_universal_argument (count, key)
- int count, key;
+rl_universal_argument (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
rl_numeric_arg *= 4;
return (rl_digit_loop ());
@@ -314,9 +313,7 @@ _rl_history_set_point ()
}
void
-rl_replace_from_history (entry, flags)
- HIST_ENTRY *entry;
- int flags; /* currently unused */
+rl_replace_from_history (HIST_ENTRY *entry, int flags __attribute__((unused)))
{
/* Can't call with `1' because rl_undo_list might point to an undo list
from a history entry, just like we're setting up here. */
@@ -342,16 +339,15 @@ rl_replace_from_history (entry, flags)
/* Meta-< goes to the start of the history. */
int
-rl_beginning_of_history (count, key)
- int count, key;
+rl_beginning_of_history (int count __attribute__((unused)), int key)
{
return (rl_get_previous_history (1 + where_history (), key));
}
/* Meta-> goes to the end of the history. (The current line). */
int
-rl_end_of_history (count, key)
- int count, key;
+rl_end_of_history (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
rl_maybe_replace_line ();
using_history ();
@@ -455,8 +451,7 @@ rl_get_previous_history (count, key)
/* **************************************************************** */
/* How to toggle back and forth between editing modes. */
int
-rl_vi_editing_mode (count, key)
- int count, key;
+rl_vi_editing_mode (int count __attribute__((unused)), int key)
{
#if defined (VI_MODE)
_rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */
@@ -468,8 +463,8 @@ rl_vi_editing_mode (count, key)
}
int
-rl_emacs_editing_mode (count, key)
- int count, key;
+rl_emacs_editing_mode (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
rl_editing_mode = emacs_mode;
_rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */
@@ -479,8 +474,7 @@ rl_emacs_editing_mode (count, key)
/* Function for the rest of the library to use to set insert/overwrite mode. */
void
-_rl_set_insert_mode (im, force)
- int im, force;
+_rl_set_insert_mode (int im, int force __attribute__((unused)))
{
#ifdef CURSOR_MODE
_rl_set_cursor (im, force);
@@ -492,8 +486,7 @@ _rl_set_insert_mode (im, force)
/* Toggle overwrite mode. A positive explicit argument selects overwrite
mode. A negative or zero explicit argument selects insert mode. */
int
-rl_overwrite_mode (count, key)
- int count, key;
+rl_overwrite_mode (int count, int key __attribute__((unused)))
{
if (rl_explicit_arg == 0)
_rl_set_insert_mode (rl_insert_mode ^ 1, 0);
diff --git a/cmd-line-utils/readline/nls.c b/cmd-line-utils/readline/nls.c
index 4f28152f316..73ad0227195 100644
--- a/cmd-line-utils/readline/nls.c
+++ b/cmd-line-utils/readline/nls.c
@@ -111,7 +111,7 @@ _rl_init_eightbit ()
if (lspec == 0 || *lspec == 0)
lspec = setlocale (LC_CTYPE, (char *)NULL);
if (lspec == 0)
- lspec = "";
+ lspec = (char*) "";
t = setlocale (LC_CTYPE, lspec);
if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
diff --git a/cmd-line-utils/readline/readline.c b/cmd-line-utils/readline/readline.c
index e82db84c9dc..dd3724a86d7 100644
--- a/cmd-line-utils/readline/readline.c
+++ b/cmd-line-utils/readline/readline.c
@@ -83,7 +83,9 @@ static void bind_arrow_keys_internal PARAMS((Keymap));
static void bind_arrow_keys PARAMS((void));
static void readline_default_bindings PARAMS((void));
+#ifdef NOT_USED
static void reset_default_bindings PARAMS((void));
+#endif
/* **************************************************************** */
/* */
@@ -866,12 +868,14 @@ readline_default_bindings ()
/* Reset the default bindings for the terminal special characters we're
interested in back to rl_insert and read the new ones. */
+#ifdef NOT_USED
static void
reset_default_bindings ()
{
rl_tty_unset_default_bindings (_rl_keymap);
rl_tty_set_default_bindings (_rl_keymap);
}
+#endif
/* Bind some common arrow key sequences in MAP. */
static void
diff --git a/cmd-line-utils/readline/rltty.c b/cmd-line-utils/readline/rltty.c
index 3e9c71c8df1..ffbae1e08af 100644
--- a/cmd-line-utils/readline/rltty.c
+++ b/cmd-line-utils/readline/rltty.c
@@ -716,8 +716,7 @@ rl_deprep_terminal ()
/* **************************************************************** */
int
-rl_restart_output (count, key)
- int count, key;
+rl_restart_output(int count __attribute__((unused)), int key __attribute__((unused)))
{
int fildes = fileno (rl_outstream);
#if defined (TIOCSTART)
@@ -749,8 +748,7 @@ rl_restart_output (count, key)
}
int
-rl_stop_output (count, key)
- int count, key;
+rl_stop_output(int count __attribute__((unused)), int key __attribute__((unused)))
{
int fildes = fileno (rl_instream);
@@ -867,7 +865,6 @@ rltty_set_default_bindings (kmap)
{
TIOTYPE ttybuff;
int tty;
- static int called = 0;
tty = fileno (rl_instream);
diff --git a/cmd-line-utils/readline/search.c b/cmd-line-utils/readline/search.c
index 1878d2bf031..6479427be2f 100644
--- a/cmd-line-utils/readline/search.c
+++ b/cmd-line-utils/readline/search.c
@@ -303,8 +303,7 @@ noninc_search (dir, pchar)
/* Search forward through the history list for a string. If the vi-mode
code calls this, KEY will be `?'. */
int
-rl_noninc_forward_search (count, key)
- int count, key;
+rl_noninc_forward_search (int count __attribute__((unused)), int key)
{
noninc_search (1, (key == '?') ? '?' : 0);
return 0;
@@ -313,8 +312,7 @@ rl_noninc_forward_search (count, key)
/* Reverse search the history list for a string. If the vi-mode code
calls this, KEY will be `/'. */
int
-rl_noninc_reverse_search (count, key)
- int count, key;
+rl_noninc_reverse_search (int count __attribute__((unused)), int key)
{
noninc_search (-1, (key == '/') ? '/' : 0);
return 0;
@@ -323,8 +321,8 @@ rl_noninc_reverse_search (count, key)
/* Search forward through the history list for the last string searched
for. If there is no saved search string, abort. */
int
-rl_noninc_forward_search_again (count, key)
- int count, key;
+rl_noninc_forward_search_again (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (!noninc_search_string)
{
@@ -338,8 +336,8 @@ rl_noninc_forward_search_again (count, key)
/* Reverse search in the history list for the last string searched
for. If there is no saved search string, abort. */
int
-rl_noninc_reverse_search_again (count, key)
- int count, key;
+rl_noninc_reverse_search_again (int count __attribute__((unused)),
+ int key __attribute__((unused)))
{
if (!noninc_search_string)
{
diff --git a/cmd-line-utils/readline/terminal.c b/cmd-line-utils/readline/terminal.c
index 3545fce5b85..4b900c5d860 100644
--- a/cmd-line-utils/readline/terminal.c
+++ b/cmd-line-utils/readline/terminal.c
@@ -344,7 +344,7 @@ get_term_capabilities (bp)
#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */
register int i;
- for (i = 0; i < NUM_TC_STRINGS; i++)
+ for (i = 0; i < (int) NUM_TC_STRINGS; i++)
*(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
#endif
tcap_initialized = 1;
@@ -410,7 +410,7 @@ _rl_init_terminal_io (terminal_name)
/* Everything below here is used by the redisplay code (tputs). */
_rl_screenchars = _rl_screenwidth * _rl_screenheight;
- _rl_term_cr = "\r";
+ _rl_term_cr = (char*) "\r";
_rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL;
_rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL;
_rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL;
@@ -427,7 +427,7 @@ _rl_init_terminal_io (terminal_name)
tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we
change that later... */
PC = '\0';
- BC = _rl_term_backspace = "\b";
+ BC = _rl_term_backspace = (char*) "\b";
UP = _rl_term_up;
return 0;
@@ -442,7 +442,7 @@ _rl_init_terminal_io (terminal_name)
UP = _rl_term_up;
if (!_rl_term_cr)
- _rl_term_cr = "\r";
+ _rl_term_cr = (char*) "\r";
_rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
@@ -502,7 +502,7 @@ rl_get_termcap (cap)
if (tcap_initialized == 0)
return ((char *)NULL);
- for (i = 0; i < NUM_TC_STRINGS; i++)
+ for (i = 0; i < (int) NUM_TC_STRINGS; i++)
{
if (tc_strings[i].tc_var[0] == cap[0] && strcmp (tc_strings[i].tc_var, cap) == 0)
return *(tc_strings[i].tc_value);
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;
diff --git a/cmd-line-utils/readline/tilde.c b/cmd-line-utils/readline/tilde.c
index c44357ffbea..91eead0d9e2 100644
--- a/cmd-line-utils/readline/tilde.c
+++ b/cmd-line-utils/readline/tilde.c
@@ -190,7 +190,7 @@ tilde_expand (string)
int result_size, result_index;
result_index = result_size = 0;
- if (result = strchr (string, '~'))
+ if ((result = strchr (string, '~')))
result = (char *)xmalloc (result_size = (strlen (string) + 16));
else
result = (char *)xmalloc (result_size = (strlen (string) + 1));
diff --git a/cmd-line-utils/readline/undo.c b/cmd-line-utils/readline/undo.c
index 48baded332a..b4b5a6511ba 100644
--- a/cmd-line-utils/readline/undo.c
+++ b/cmd-line-utils/readline/undo.c
@@ -175,7 +175,7 @@ _rl_fix_last_undo_of_type (type, start, end)
for (rl = rl_undo_list; rl; rl = rl->next)
{
- if (rl->what == type)
+ if (rl->what == (uint) type)
{
rl->start = start;
rl->end = end;
@@ -226,8 +226,7 @@ rl_modifying (start, end)
/* Revert the current line to its previous state. */
int
-rl_revert_line (count, key)
- int count, key;
+rl_revert_line (int count __attribute__((unused)), int key __attribute__((unused)))
{
if (!rl_undo_list)
rl_ding ();
@@ -241,8 +240,7 @@ rl_revert_line (count, key)
/* Do some undoing of things that were done. */
int
-rl_undo_command (count, key)
- int count, key;
+rl_undo_command (int count, int key __attribute__((unused)))
{
if (count < 0)
return 0; /* Nothing to do. */
diff --git a/cmd-line-utils/readline/util.c b/cmd-line-utils/readline/util.c
index 43478aaf1ac..d5fe51a7bf2 100644
--- a/cmd-line-utils/readline/util.c
+++ b/cmd-line-utils/readline/util.c
@@ -95,15 +95,13 @@ _rl_abort_internal ()
}
int
-rl_abort (count, key)
- int count, key;
+rl_abort (int count __attribute__((unused)), int key __attribute__((unused)))
{
return (_rl_abort_internal ());
}
int
-rl_tty_status (count, key)
- int count, key;
+rl_tty_status (int count __attribute__((unused)), int key __attribute__((unused)))
{
#if defined (TIOCSTAT)
ioctl (1, TIOCSTAT, (char *)0);
@@ -152,8 +150,7 @@ rl_extend_line_buffer (len)
/* A function for simple tilde expansion. */
int
-rl_tilde_expand (ignore, key)
- int ignore, key;
+rl_tilde_expand (int ignore __attribute__((unused)), int key __attribute__((unused)))
{
register int start, end;
char *homedir, *temp;
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;