Merge from 5.0-bt
This commit is contained in:
parent
5e0c653f03
commit
19dfaa5824
@ -1974,7 +1974,7 @@ static COMMANDS *find_command(char *name,char cmd_char)
|
||||
(uchar*)commands[i].name,len) &&
|
||||
!commands[i].name[len] &&
|
||||
(!end || (end && commands[i].takes_params))) ||
|
||||
!name && commands[i].cmd_char == cmd_char))
|
||||
(!name && commands[i].cmd_char == cmd_char)))
|
||||
{
|
||||
DBUG_PRINT("exit",("found command: %s", commands[i].name));
|
||||
DBUG_RETURN(&commands[i]);
|
||||
@ -2132,7 +2132,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
|
||||
buffer.length(0);
|
||||
}
|
||||
else if (!*ml_comment && (!*in_string && (inchar == '#' ||
|
||||
inchar == '-' && pos[1] == '-' &&
|
||||
(inchar == '-' && pos[1] == '-' &&
|
||||
/*
|
||||
The third byte is either whitespace or is the
|
||||
end of the line -- which would occur only
|
||||
@ -2140,7 +2140,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
|
||||
itself whitespace and should also match.
|
||||
*/
|
||||
(my_isspace(charset_info,pos[2]) ||
|
||||
!pos[2]))))
|
||||
!pos[2])))))
|
||||
{
|
||||
// Flush previously accepted characters
|
||||
if (out != line)
|
||||
|
@ -527,8 +527,8 @@ int process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
Format events are not concerned by --offset and such, we always need to
|
||||
read them to be able to process the wanted events.
|
||||
*/
|
||||
if ((rec_count >= offset) &&
|
||||
((my_time_t)(ev->when) >= start_datetime) ||
|
||||
if (((rec_count >= offset) &&
|
||||
((my_time_t)(ev->when) >= start_datetime)) ||
|
||||
(ev_type == FORMAT_DESCRIPTION_EVENT))
|
||||
{
|
||||
if (ev_type != FORMAT_DESCRIPTION_EVENT)
|
||||
|
@ -1682,7 +1682,7 @@ void check_result(DYNAMIC_STRING* ds)
|
||||
dynstr_set(ds, NULL); /* Don't create a .log file */
|
||||
|
||||
show_diff(NULL, result_file_name, reject_file);
|
||||
die(mess);
|
||||
die("%s", mess);
|
||||
break;
|
||||
}
|
||||
default: /* impossible */
|
||||
|
@ -79,7 +79,7 @@ static int _rl_read_init_file PARAMS((const char *, int));
|
||||
static int glean_key_from_name PARAMS((char *));
|
||||
static int find_boolean_var PARAMS((const char *));
|
||||
|
||||
static char *_rl_get_string_variable_value PARAMS((const char *));
|
||||
static const char *_rl_get_string_variable_value PARAMS((const char *));
|
||||
static int substring_member_of_array PARAMS((char *, const char **));
|
||||
|
||||
static int currently_reading_init_file;
|
||||
@ -442,7 +442,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 == '\\')
|
||||
{
|
||||
@ -776,7 +776,8 @@ _rl_read_file (filename, sizep)
|
||||
file_size = (size_t)finfo.st_size;
|
||||
|
||||
/* check for overflow on very large files */
|
||||
if (file_size != finfo.st_size || file_size + 1 < file_size)
|
||||
if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
|
||||
file_size + 1 < file_size)
|
||||
{
|
||||
if (file >= 0)
|
||||
close (file);
|
||||
@ -807,7 +808,7 @@ _rl_read_file (filename, sizep)
|
||||
/* Re-read the current keybindings file. */
|
||||
int
|
||||
rl_re_read_init_file (count, ignore)
|
||||
int count, ignore;
|
||||
int count __attribute__((unused)), ignore __attribute__((unused));
|
||||
{
|
||||
int r;
|
||||
r = rl_read_init_file ((const char *)NULL);
|
||||
@ -1031,7 +1032,7 @@ parser_if (args)
|
||||
/* Invert the current parser state if there is anything on the stack. */
|
||||
static int
|
||||
parser_else (args)
|
||||
char *args;
|
||||
char *args __attribute__((unused));
|
||||
{
|
||||
register int i;
|
||||
|
||||
@ -1062,7 +1063,7 @@ parser_else (args)
|
||||
_rl_parsing_conditionalized_out from the stack. */
|
||||
static int
|
||||
parser_endif (args)
|
||||
char *args;
|
||||
char *args __attribute__((unused));
|
||||
{
|
||||
if (if_stack_depth)
|
||||
_rl_parsing_conditionalized_out = if_stack[--if_stack_depth];
|
||||
@ -1185,7 +1186,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)
|
||||
{
|
||||
@ -1276,7 +1277,7 @@ rl_parse_and_bind (string)
|
||||
int delimiter, passc;
|
||||
|
||||
delimiter = string[i++];
|
||||
for (passc = 0; c = string[i]; i++)
|
||||
for (passc = 0; (c = string[i]); i++)
|
||||
{
|
||||
if (passc)
|
||||
{
|
||||
@ -1436,7 +1437,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
|
||||
@ -1505,7 +1506,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, (_rl_sv_func_t*)NULL }
|
||||
};
|
||||
|
||||
static int
|
||||
@ -1532,7 +1533,7 @@ bool_to_int (value)
|
||||
(value[0] == '1' && value[1] == '\0'));
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
rl_variable_value (name)
|
||||
const char *name;
|
||||
{
|
||||
@ -1799,7 +1800,7 @@ rl_set_keymap_from_edit_mode ()
|
||||
#endif /* VI_MODE */
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
rl_get_keymap_name_from_edit_mode ()
|
||||
{
|
||||
if (rl_editing_mode == emacs_mode)
|
||||
@ -2048,7 +2049,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;
|
||||
@ -2108,7 +2109,7 @@ rl_function_dumper (print_readably)
|
||||
the output in such a way that it can be read back in. */
|
||||
int
|
||||
rl_dump_functions (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
if (rl_dispatching)
|
||||
fprintf (rl_outstream, "\r\n");
|
||||
@ -2188,7 +2189,7 @@ rl_macro_dumper (print_readably)
|
||||
|
||||
int
|
||||
rl_dump_macros (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
if (rl_dispatching)
|
||||
fprintf (rl_outstream, "\r\n");
|
||||
@ -2197,12 +2198,13 @@ rl_dump_macros (count, key)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
_rl_get_string_variable_value (name)
|
||||
const char *name;
|
||||
{
|
||||
static char numbuf[32];
|
||||
char *ret;
|
||||
const char *ret;
|
||||
char *tmp;
|
||||
|
||||
if (_rl_stricmp (name, "bell-style") == 0)
|
||||
{
|
||||
@ -2230,11 +2232,11 @@ _rl_get_string_variable_value (name)
|
||||
{
|
||||
if (_rl_isearch_terminators == 0)
|
||||
return 0;
|
||||
ret = _rl_untranslate_macro_value (_rl_isearch_terminators);
|
||||
if (ret)
|
||||
tmp = _rl_untranslate_macro_value (_rl_isearch_terminators);
|
||||
if (tmp)
|
||||
{
|
||||
strncpy (numbuf, ret, sizeof (numbuf) - 1);
|
||||
free (ret);
|
||||
strncpy (numbuf, tmp, sizeof (numbuf) - 1);
|
||||
free (tmp);
|
||||
numbuf[sizeof(numbuf) - 1] = '\0';
|
||||
}
|
||||
else
|
||||
@ -2257,7 +2259,7 @@ rl_variable_dumper (print_readably)
|
||||
int print_readably;
|
||||
{
|
||||
int i;
|
||||
char *v;
|
||||
const char *v;
|
||||
|
||||
for (i = 0; boolean_varlist[i].name; i++)
|
||||
{
|
||||
@ -2286,7 +2288,7 @@ rl_variable_dumper (print_readably)
|
||||
the output in such a way that it can be read back in. */
|
||||
int
|
||||
rl_dump_variables (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
if (rl_dispatching)
|
||||
fprintf (rl_outstream, "\r\n");
|
||||
|
@ -358,14 +358,14 @@ 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;
|
||||
int ignore __attribute__((unused)), invoking_key __attribute__((unused));
|
||||
{
|
||||
return (rl_complete_internal ('?'));
|
||||
}
|
||||
|
||||
int
|
||||
rl_insert_completions (ignore, invoking_key)
|
||||
int ignore, invoking_key;
|
||||
int ignore __attribute__((unused)), invoking_key __attribute__((unused));
|
||||
{
|
||||
return (rl_complete_internal ('*'));
|
||||
}
|
||||
@ -695,7 +695,8 @@ print_filename (to_print, full_pathname)
|
||||
char *to_print, *full_pathname;
|
||||
{
|
||||
int printed_len, extension_char, slen, tlen;
|
||||
char *s, c, *new_full_pathname, *dn;
|
||||
char *s, c, *new_full_pathname;
|
||||
const char *dn;
|
||||
|
||||
extension_char = 0;
|
||||
printed_len = fnprint (to_print);
|
||||
@ -782,7 +783,7 @@ print_filename (to_print, full_pathname)
|
||||
static char *
|
||||
rl_quote_filename (s, rtype, qcp)
|
||||
char *s;
|
||||
int rtype;
|
||||
int rtype __attribute__((unused));
|
||||
char *qcp;
|
||||
{
|
||||
char *r;
|
||||
@ -883,7 +884,7 @@ _rl_find_completion_word (fp, dp)
|
||||
/* We didn't find an unclosed quoted substring upon which to do
|
||||
completion, so use the word break characters to find the
|
||||
substring on which to complete. */
|
||||
while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
|
||||
while ((rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY)))
|
||||
{
|
||||
scan = rl_line_buffer[rl_point];
|
||||
|
||||
@ -1802,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
|
||||
@ -2110,7 +2111,7 @@ rl_filename_completion_function (text, state)
|
||||
ring the bell, and reset the counter to zero. */
|
||||
int
|
||||
rl_menu_complete (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
rl_compentry_func_t *our_func;
|
||||
int matching_filenames, found_quote;
|
||||
|
@ -127,7 +127,7 @@ int _rl_want_redisplay = 0;
|
||||
|
||||
/* The stuff that gets printed out before the actual text of the line.
|
||||
This is usually pointing to rl_prompt. */
|
||||
char *rl_display_prompt = (char *)NULL;
|
||||
const char *rl_display_prompt = (const char *)NULL;
|
||||
|
||||
/* Pseudo-global variables declared here. */
|
||||
|
||||
@ -229,7 +229,10 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
|
||||
int *lp, *lip, *niflp, *vlp;
|
||||
{
|
||||
char *r, *ret, *p, *igstart;
|
||||
int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
|
||||
int l, rl, last, ignoring, ninvis, invfl, invflset, physchars;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
int ind, pind;
|
||||
#endif
|
||||
|
||||
/* Short-circuit if we can. */
|
||||
if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
|
||||
@ -242,7 +245,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;
|
||||
}
|
||||
|
||||
@ -459,9 +462,10 @@ rl_redisplay ()
|
||||
register int in, out, c, linenum, cursor_linenum;
|
||||
register char *line;
|
||||
int inv_botlin, lb_botlin, lb_linenum, o_cpos;
|
||||
int newlines, lpos, temp, modmark, n0, num;
|
||||
char *prompt_this_line;
|
||||
int newlines, lpos, temp, modmark;
|
||||
const char *prompt_this_line;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
int num, n0;
|
||||
wchar_t wc;
|
||||
size_t wc_bytes;
|
||||
int wc_width;
|
||||
@ -626,7 +630,6 @@ rl_redisplay ()
|
||||
contents of the command line? */
|
||||
while (lpos >= _rl_screenwidth)
|
||||
{
|
||||
int z;
|
||||
/* fix from Darin Johnson <darin@acuson.com> for prompt string with
|
||||
invisible characters that is longer than the screen width. The
|
||||
prompt_invis_chars_first_line variable could be made into an array
|
||||
@ -635,6 +638,7 @@ rl_redisplay ()
|
||||
prompts that exceed two physical lines?
|
||||
Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
int z;
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
{
|
||||
n0 = num;
|
||||
@ -878,6 +882,7 @@ rl_redisplay ()
|
||||
if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up)
|
||||
{
|
||||
int nleft, pos, changed_screen_line, tx;
|
||||
char empty_str[1] = { 0 };
|
||||
|
||||
if (!rl_display_fixed || forced_display)
|
||||
{
|
||||
@ -902,7 +907,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) ? empty_str : VIS_CHARS(line)
|
||||
#define INV_LINE(line) (invisible_line + inv_lbreaks[line])
|
||||
|
||||
/* For each line in the buffer, do the updating display. */
|
||||
@ -969,7 +974,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;
|
||||
@ -2261,7 +2266,7 @@ static void
|
||||
redraw_prompt (t)
|
||||
char *t;
|
||||
{
|
||||
char *oldp;
|
||||
const char *oldp;
|
||||
|
||||
oldp = rl_display_prompt;
|
||||
rl_save_prompt ();
|
||||
|
@ -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=";
|
||||
const char *history_no_expand_chars = " \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;
|
||||
const char *history_word_delimiters = 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)
|
||||
|
@ -186,7 +186,8 @@ read_history_range (filename, from, to)
|
||||
file_size = (size_t)finfo.st_size;
|
||||
|
||||
/* check for overflow on very large files */
|
||||
if (file_size != finfo.st_size || file_size + 1 < file_size)
|
||||
if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
|
||||
file_size + 1 < file_size)
|
||||
{
|
||||
errno = overflow_errno;
|
||||
goto error_and_exit;
|
||||
@ -339,7 +340,8 @@ history_truncate_file (fname, lines)
|
||||
file_size = (size_t)finfo.st_size;
|
||||
|
||||
/* check for overflow on very large files */
|
||||
if (file_size != finfo.st_size || file_size + 1 < file_size)
|
||||
if ((sizeof(off_t) > sizeof(size_t) && finfo.st_size > (off_t)(size_t)~0) ||
|
||||
file_size + 1 < file_size)
|
||||
{
|
||||
close (file);
|
||||
#if defined (EFBIG)
|
||||
|
@ -243,9 +243,9 @@ extern int history_length;
|
||||
extern int history_max_entries;
|
||||
extern char history_expansion_char;
|
||||
extern char history_subst_char;
|
||||
extern char *history_word_delimiters;
|
||||
extern const char *history_word_delimiters;
|
||||
extern char history_comment_char;
|
||||
extern char *history_no_expand_chars;
|
||||
extern const char *history_no_expand_chars;
|
||||
extern char *history_search_delimiter_chars;
|
||||
extern int history_quotes_inhibit_expansion;
|
||||
|
||||
|
@ -420,7 +420,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. */
|
||||
|
@ -75,7 +75,7 @@ static int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int));
|
||||
static char *last_isearch_string;
|
||||
static int last_isearch_string_len;
|
||||
|
||||
static char *default_isearch_terminators = "\033\012";
|
||||
static const char *default_isearch_terminators = "\033\012";
|
||||
|
||||
_rl_search_cxt *
|
||||
_rl_scxt_alloc (type, flags)
|
||||
@ -119,7 +119,7 @@ _rl_scxt_alloc (type, flags)
|
||||
void
|
||||
_rl_scxt_dispose (cxt, flags)
|
||||
_rl_search_cxt *cxt;
|
||||
int flags;
|
||||
int flags __attribute__((unused));
|
||||
{
|
||||
FREE (cxt->search_string);
|
||||
FREE (cxt->allocated_line);
|
||||
@ -154,7 +154,7 @@ rl_forward_search_history (sign, key)
|
||||
static void
|
||||
rl_display_search (search_string, reverse_p, where)
|
||||
char *search_string;
|
||||
int reverse_p, where;
|
||||
int reverse_p, where __attribute__((unused));
|
||||
{
|
||||
char *message;
|
||||
int msglen, searchlen;
|
||||
@ -614,7 +614,7 @@ _rl_isearch_cleanup (cxt, r)
|
||||
backwards. */
|
||||
static int
|
||||
rl_search_history (direction, invoking_key)
|
||||
int direction, invoking_key;
|
||||
int direction, invoking_key __attribute__((unused));
|
||||
{
|
||||
_rl_search_cxt *cxt; /* local for now, but saved globally */
|
||||
int c, r;
|
||||
|
@ -79,7 +79,7 @@ static int rl_yank_nth_arg_internal PARAMS((int, int, int));
|
||||
of kill material. */
|
||||
int
|
||||
rl_set_retained_kills (num)
|
||||
int num;
|
||||
int num __attribute__((unused));
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -296,7 +296,7 @@ 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;
|
||||
int count __attribute__((unused)), ignore __attribute__((unused));
|
||||
{
|
||||
rl_begin_undo_group ();
|
||||
rl_point = 0;
|
||||
@ -314,7 +314,7 @@ rl_kill_full_line (count, ignore)
|
||||
using behaviour that they expect. */
|
||||
int
|
||||
rl_unix_word_rubout (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
int orig_point;
|
||||
|
||||
@ -347,7 +347,7 @@ rl_unix_word_rubout (count, key)
|
||||
deletes backward to directory separator (`/') or whitespace. */
|
||||
int
|
||||
rl_unix_filename_rubout (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
int orig_point, c;
|
||||
|
||||
@ -391,7 +391,7 @@ rl_unix_filename_rubout (count, key)
|
||||
doing. */
|
||||
int
|
||||
rl_unix_line_discard (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
if (rl_point == 0)
|
||||
rl_ding ();
|
||||
@ -428,7 +428,7 @@ 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;
|
||||
int count __attribute__((unused)), ignore __attribute__((unused));
|
||||
{
|
||||
return (region_kill_internal (0));
|
||||
}
|
||||
@ -436,7 +436,7 @@ rl_copy_region_to_kill (count, ignore)
|
||||
/* Kill the text between the point and mark. */
|
||||
int
|
||||
rl_kill_region (count, ignore)
|
||||
int count, ignore;
|
||||
int count __attribute__((unused)), ignore __attribute__((unused));
|
||||
{
|
||||
int r, npoint;
|
||||
|
||||
@ -501,7 +501,7 @@ rl_copy_backward_word (count, key)
|
||||
/* Yank back the last killed text. This ignores arguments. */
|
||||
int
|
||||
rl_yank (count, ignore)
|
||||
int count, ignore;
|
||||
int count __attribute__((unused)), ignore __attribute__((unused));
|
||||
{
|
||||
if (rl_kill_ring == 0)
|
||||
{
|
||||
@ -520,7 +520,7 @@ rl_yank (count, ignore)
|
||||
yank back some other text. */
|
||||
int
|
||||
rl_yank_pop (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
int l, n;
|
||||
|
||||
|
@ -201,7 +201,7 @@ _rl_kill_kbd_macro ()
|
||||
re-executing the existing macro. */
|
||||
int
|
||||
rl_start_kbd_macro (ignore1, ignore2)
|
||||
int ignore1, ignore2;
|
||||
int ignore1 __attribute__((unused)), ignore2 __attribute__((unused));
|
||||
{
|
||||
if (RL_ISSTATE (RL_STATE_MACRODEF))
|
||||
{
|
||||
@ -226,7 +226,7 @@ rl_start_kbd_macro (ignore1, ignore2)
|
||||
that many times, counting the definition as the first time. */
|
||||
int
|
||||
rl_end_kbd_macro (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
if (RL_ISSTATE (RL_STATE_MACRODEF) == 0)
|
||||
{
|
||||
@ -246,7 +246,7 @@ rl_end_kbd_macro (count, ignore)
|
||||
COUNT says how many times to execute it. */
|
||||
int
|
||||
rl_call_last_kbd_macro (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
if (current_macro == 0)
|
||||
_rl_abort_internal ();
|
||||
|
@ -346,8 +346,8 @@ _rl_char_value (buf, ind)
|
||||
#undef _rl_find_next_mbchar
|
||||
int
|
||||
_rl_find_next_mbchar (string, seed, count, flags)
|
||||
char *string;
|
||||
int seed, count, flags;
|
||||
char *string __attribute__((unused));
|
||||
int seed, count, flags __attribute__((unused));
|
||||
{
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
return _rl_find_next_mbchar_internal (string, seed, count, flags);
|
||||
@ -362,8 +362,8 @@ _rl_find_next_mbchar (string, seed, count, flags)
|
||||
#undef _rl_find_prev_mbchar
|
||||
int
|
||||
_rl_find_prev_mbchar (string, seed, flags)
|
||||
char *string;
|
||||
int seed, flags;
|
||||
char *string __attribute__((unused));
|
||||
int seed, flags __attribute__((unused));
|
||||
{
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
return _rl_find_prev_mbchar_internal (string, seed, flags);
|
||||
|
@ -228,7 +228,7 @@ _rl_reset_argument ()
|
||||
/* Start a numeric argument with initial value KEY */
|
||||
int
|
||||
rl_digit_argument (ignore, key)
|
||||
int ignore, key;
|
||||
int ignore __attribute__((unused)), key;
|
||||
{
|
||||
_rl_arg_init ();
|
||||
if (RL_ISSTATE (RL_STATE_CALLBACK))
|
||||
@ -249,7 +249,7 @@ rl_digit_argument (ignore, key)
|
||||
dispatch on it. If the key is the abort character then abort. */
|
||||
int
|
||||
rl_universal_argument (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
_rl_arg_init ();
|
||||
rl_numeric_arg *= 4;
|
||||
@ -413,7 +413,7 @@ _rl_history_set_point ()
|
||||
void
|
||||
rl_replace_from_history (entry, flags)
|
||||
HIST_ENTRY *entry;
|
||||
int flags; /* currently unused */
|
||||
int flags __attribute__((unused)); /* currently 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. */
|
||||
@ -440,7 +440,7 @@ rl_replace_from_history (entry, flags)
|
||||
/* Meta-< goes to the start of the history. */
|
||||
int
|
||||
rl_beginning_of_history (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
return (rl_get_previous_history (1 + where_history (), key));
|
||||
}
|
||||
@ -448,7 +448,7 @@ rl_beginning_of_history (count, key)
|
||||
/* Meta-> goes to the end of the history. (The current line). */
|
||||
int
|
||||
rl_end_of_history (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
rl_maybe_replace_line ();
|
||||
using_history ();
|
||||
@ -553,7 +553,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;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
#if defined (VI_MODE)
|
||||
_rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */
|
||||
@ -566,7 +566,7 @@ rl_vi_editing_mode (count, key)
|
||||
|
||||
int
|
||||
rl_emacs_editing_mode (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
rl_editing_mode = emacs_mode;
|
||||
_rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */
|
||||
@ -577,7 +577,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;
|
||||
int im, force __attribute__((unused));
|
||||
{
|
||||
#ifdef CURSOR_MODE
|
||||
_rl_set_cursor (im, force);
|
||||
@ -590,7 +590,7 @@ _rl_set_insert_mode (im, force)
|
||||
mode. A negative or zero explicit argument selects insert mode. */
|
||||
int
|
||||
rl_overwrite_mode (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
if (rl_explicit_arg == 0)
|
||||
_rl_set_insert_mode (rl_insert_mode ^ 1, 0);
|
||||
|
@ -101,7 +101,8 @@ _rl_init_eightbit ()
|
||||
/* If we have setlocale(3), just check the current LC_CTYPE category
|
||||
value, and go into eight-bit mode if it's not C or POSIX. */
|
||||
#if defined (HAVE_SETLOCALE)
|
||||
char *lspec, *t;
|
||||
const char *lspec;
|
||||
char *t;
|
||||
|
||||
/* Set the LC_CTYPE locale category from environment variables. */
|
||||
lspec = _rl_get_locale_var ("LC_CTYPE");
|
||||
@ -127,7 +128,8 @@ _rl_init_eightbit ()
|
||||
return (0);
|
||||
|
||||
#else /* !HAVE_SETLOCALE */
|
||||
char *lspec, *t;
|
||||
const char *lspec;
|
||||
char *t;
|
||||
int i;
|
||||
|
||||
/* We don't have setlocale. Finesse it. Check the environment for the
|
||||
|
@ -90,7 +90,7 @@ static void bind_arrow_keys_internal PARAMS((Keymap));
|
||||
static void bind_arrow_keys PARAMS((void));
|
||||
|
||||
static void readline_default_bindings PARAMS((void));
|
||||
static void reset_default_bindings PARAMS((void));
|
||||
static void reset_default_bindings PARAMS((void)) __attribute__((unused));
|
||||
|
||||
static int _rl_subseq_result PARAMS((int, Keymap, int, int));
|
||||
static int _rl_subseq_getchar PARAMS((int));
|
||||
|
@ -304,7 +304,7 @@ extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *))
|
||||
extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
|
||||
extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap));
|
||||
|
||||
extern char *rl_variable_value PARAMS((const char *));
|
||||
extern const char *rl_variable_value PARAMS((const char *));
|
||||
extern int rl_variable_bind PARAMS((const char *, const char *));
|
||||
|
||||
/* Backwards compatibility, use rl_bind_keyseq_in_map instead. */
|
||||
@ -343,7 +343,7 @@ extern void rl_set_keymap PARAMS((Keymap));
|
||||
extern Keymap rl_get_keymap PARAMS((void));
|
||||
/* Undocumented; used internally only. */
|
||||
extern void rl_set_keymap_from_edit_mode PARAMS((void));
|
||||
extern char *rl_get_keymap_name_from_edit_mode PARAMS((void));
|
||||
extern const char *rl_get_keymap_name_from_edit_mode PARAMS((void));
|
||||
|
||||
/* Functions for manipulating the funmap, which maps command names to functions. */
|
||||
extern int rl_add_funmap_entry PARAMS((const char *, rl_command_func_t *));
|
||||
@ -406,7 +406,7 @@ extern void rl_set_screen_size PARAMS((int, int));
|
||||
extern void rl_get_screen_size PARAMS((int *, int *));
|
||||
extern void rl_reset_screen_size PARAMS((void));
|
||||
|
||||
extern char *rl_get_termcap PARAMS((const char *));
|
||||
extern const char *rl_get_termcap PARAMS((const char *));
|
||||
|
||||
/* Functions for character input. */
|
||||
extern int rl_stuff_char PARAMS((int));
|
||||
|
@ -77,7 +77,7 @@ typedef struct __rl_search_context
|
||||
int sline_len;
|
||||
int sline_index;
|
||||
|
||||
char *search_terminators;
|
||||
const char *search_terminators;
|
||||
} _rl_search_cxt;
|
||||
|
||||
/* Callback data for reading numeric arguments */
|
||||
@ -164,7 +164,7 @@ extern int rl_set_retained_kills PARAMS((int));
|
||||
extern void _rl_set_screen_size PARAMS((int, int));
|
||||
|
||||
/* undo.c */
|
||||
extern int _rl_fix_last_undo_of_type PARAMS((int, int, int));
|
||||
extern int _rl_fix_last_undo_of_type PARAMS((enum undo_code, int, int));
|
||||
|
||||
/* util.c */
|
||||
extern char *_rl_savestring PARAMS((const char *));
|
||||
@ -359,7 +359,7 @@ extern int _rl_vis_botlin;
|
||||
extern int _rl_last_c_pos;
|
||||
extern int _rl_suppress_redisplay;
|
||||
extern int _rl_want_redisplay;
|
||||
extern char *rl_display_prompt;
|
||||
extern const char *rl_display_prompt;
|
||||
|
||||
/* isearch.c */
|
||||
extern char *_rl_isearch_terminators;
|
||||
@ -398,17 +398,17 @@ extern _rl_search_cxt *_rl_nscxt;
|
||||
/* terminal.c */
|
||||
extern int _rl_enable_keypad;
|
||||
extern int _rl_enable_meta;
|
||||
extern char *_rl_term_clreol;
|
||||
extern char *_rl_term_clrpag;
|
||||
extern char *_rl_term_im;
|
||||
extern char *_rl_term_ic;
|
||||
extern char *_rl_term_ei;
|
||||
extern char *_rl_term_DC;
|
||||
extern char *_rl_term_up;
|
||||
extern char *_rl_term_dc;
|
||||
extern char *_rl_term_cr;
|
||||
extern char *_rl_term_IC;
|
||||
extern char *_rl_term_forward_char;
|
||||
extern const char *_rl_term_clreol;
|
||||
extern const char *_rl_term_clrpag;
|
||||
extern const char *_rl_term_im;
|
||||
extern const char *_rl_term_ic;
|
||||
extern const char *_rl_term_ei;
|
||||
extern const char *_rl_term_DC;
|
||||
extern const char *_rl_term_up;
|
||||
extern const char *_rl_term_dc;
|
||||
extern const char *_rl_term_cr;
|
||||
extern const char *_rl_term_IC;
|
||||
extern const char *_rl_term_forward_char;
|
||||
extern int _rl_screenheight;
|
||||
extern int _rl_screenwidth;
|
||||
extern int _rl_screenchars;
|
||||
|
@ -765,7 +765,7 @@ rl_deprep_terminal ()
|
||||
|
||||
int
|
||||
rl_restart_output (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
#if defined (__MINGW32__)
|
||||
return 0;
|
||||
@ -803,7 +803,7 @@ rl_restart_output (count, key)
|
||||
|
||||
int
|
||||
rl_stop_output (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
#if defined (__MINGW32__)
|
||||
return 0;
|
||||
|
@ -211,7 +211,7 @@ _rl_nsearch_init (dir, pchar)
|
||||
rl_end = rl_point = 0;
|
||||
|
||||
p = _rl_make_prompt_for_search (pchar ? pchar : ':');
|
||||
rl_message ("%s", p, 0);
|
||||
rl_message ("%s", p);
|
||||
free (p);
|
||||
|
||||
RL_SETSTATE(RL_STATE_NSEARCH);
|
||||
@ -383,7 +383,7 @@ noninc_search (dir, pchar)
|
||||
code calls this, KEY will be `?'. */
|
||||
int
|
||||
rl_noninc_forward_search (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
return noninc_search (1, (key == '?') ? '?' : 0);
|
||||
}
|
||||
@ -392,7 +392,7 @@ rl_noninc_forward_search (count, key)
|
||||
calls this, KEY will be `/'. */
|
||||
int
|
||||
rl_noninc_reverse_search (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
return noninc_search (-1, (key == '/') ? '/' : 0);
|
||||
}
|
||||
@ -401,7 +401,7 @@ rl_noninc_reverse_search (count, key)
|
||||
for. If there is no saved search string, abort. */
|
||||
int
|
||||
rl_noninc_forward_search_again (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
int r;
|
||||
|
||||
@ -418,7 +418,7 @@ rl_noninc_forward_search_again (count, key)
|
||||
for. If there is no saved search string, abort. */
|
||||
int
|
||||
rl_noninc_reverse_search_again (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
int r;
|
||||
|
||||
|
@ -104,34 +104,36 @@ char PC, *BC, *UP;
|
||||
#endif /* __linux__ */
|
||||
|
||||
/* Some strings to control terminal actions. These are output by tputs (). */
|
||||
char *_rl_term_clreol;
|
||||
char *_rl_term_clrpag;
|
||||
char *_rl_term_cr;
|
||||
char *_rl_term_backspace;
|
||||
char *_rl_term_goto;
|
||||
char *_rl_term_pc;
|
||||
const char *_rl_term_clreol;
|
||||
const char *_rl_term_clrpag;
|
||||
const char *_rl_term_cr;
|
||||
const char *_rl_term_backspace;
|
||||
char _rl_term_backspace_default[2] = { '\b', 0 };
|
||||
const char *_rl_term_goto;
|
||||
const char *_rl_term_pc;
|
||||
|
||||
/* Non-zero if we determine that the terminal can do character insertion. */
|
||||
int _rl_terminal_can_insert = 0;
|
||||
|
||||
/* How to insert characters. */
|
||||
char *_rl_term_im;
|
||||
char *_rl_term_ei;
|
||||
char *_rl_term_ic;
|
||||
char *_rl_term_ip;
|
||||
char *_rl_term_IC;
|
||||
const char *_rl_term_im;
|
||||
const char *_rl_term_ei;
|
||||
const char *_rl_term_ic;
|
||||
const char *_rl_term_ip;
|
||||
const char *_rl_term_IC;
|
||||
|
||||
/* How to delete characters. */
|
||||
char *_rl_term_dc;
|
||||
char *_rl_term_DC;
|
||||
const char *_rl_term_dc;
|
||||
const char *_rl_term_DC;
|
||||
|
||||
char *_rl_term_forward_char;
|
||||
const char *_rl_term_forward_char;
|
||||
|
||||
/* How to go up a line. */
|
||||
char *_rl_term_up;
|
||||
const char *_rl_term_up;
|
||||
char _rl_term_up_default[2] = { 0, 0 };
|
||||
|
||||
/* A visible bell; char if the terminal can be made to flash the screen. */
|
||||
static char *_rl_visible_bell;
|
||||
static const char *_rl_visible_bell;
|
||||
|
||||
/* Non-zero means the terminal can auto-wrap lines. */
|
||||
int _rl_term_autowrap = -1;
|
||||
@ -141,33 +143,33 @@ static int term_has_meta;
|
||||
|
||||
/* The sequences to write to turn on and off the meta key, if this
|
||||
terminal has one. */
|
||||
static char *_rl_term_mm;
|
||||
static char *_rl_term_mo;
|
||||
static const char *_rl_term_mm;
|
||||
static const char *_rl_term_mo;
|
||||
|
||||
/* The key sequences output by the arrow keys, if this terminal has any. */
|
||||
static char *_rl_term_ku;
|
||||
static char *_rl_term_kd;
|
||||
static char *_rl_term_kr;
|
||||
static char *_rl_term_kl;
|
||||
static const char *_rl_term_ku;
|
||||
static const char *_rl_term_kd;
|
||||
static const char *_rl_term_kr;
|
||||
static const char *_rl_term_kl;
|
||||
|
||||
/* How to initialize and reset the arrow keys, if this terminal has any. */
|
||||
static char *_rl_term_ks;
|
||||
static char *_rl_term_ke;
|
||||
static const char *_rl_term_ks;
|
||||
static const char *_rl_term_ke;
|
||||
|
||||
/* The key sequences sent by the Home and End keys, if any. */
|
||||
static char *_rl_term_kh;
|
||||
static char *_rl_term_kH;
|
||||
static char *_rl_term_at7; /* @7 */
|
||||
static const char *_rl_term_kh;
|
||||
static const char *_rl_term_kH;
|
||||
static const char *_rl_term_at7; /* @7 */
|
||||
|
||||
/* Delete key */
|
||||
static char *_rl_term_kD;
|
||||
static const char *_rl_term_kD;
|
||||
|
||||
/* Insert key */
|
||||
static char *_rl_term_kI;
|
||||
static const char *_rl_term_kI;
|
||||
|
||||
/* Cursor control */
|
||||
static char *_rl_term_vs; /* very visible */
|
||||
static char *_rl_term_ve; /* normal */
|
||||
static const char *_rl_term_vs; /* very visible */
|
||||
static const char *_rl_term_ve; /* normal */
|
||||
|
||||
static void bind_termcap_arrow_keys PARAMS((Keymap));
|
||||
|
||||
@ -362,7 +364,7 @@ rl_resize_terminal ()
|
||||
|
||||
struct _tc_string {
|
||||
const char *tc_var;
|
||||
char **tc_value;
|
||||
const char **tc_value;
|
||||
};
|
||||
|
||||
/* This should be kept sorted, just in case we decide to change the
|
||||
@ -409,7 +411,7 @@ get_term_capabilities (bp)
|
||||
char **bp;
|
||||
{
|
||||
#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */
|
||||
register int i;
|
||||
register unsigned int i;
|
||||
|
||||
for (i = 0; i < NUM_TC_STRINGS; i++)
|
||||
*(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
|
||||
@ -496,8 +498,9 @@ _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";
|
||||
UP = _rl_term_up;
|
||||
_rl_term_backspace = _rl_term_backspace_default;
|
||||
BC = (char*)_rl_term_backspace;
|
||||
UP = (char*)_rl_term_up;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -507,8 +510,8 @@ _rl_init_terminal_io (terminal_name)
|
||||
/* Set up the variables that the termcap library expects the application
|
||||
to provide. */
|
||||
PC = _rl_term_pc ? *_rl_term_pc : 0;
|
||||
BC = _rl_term_backspace;
|
||||
UP = _rl_term_up;
|
||||
BC = (char*)_rl_term_backspace;
|
||||
UP = (char*)_rl_term_up;
|
||||
|
||||
if (!_rl_term_cr)
|
||||
_rl_term_cr = "\r";
|
||||
@ -568,11 +571,11 @@ bind_termcap_arrow_keys (map)
|
||||
_rl_keymap = xkeymap;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
rl_get_termcap (cap)
|
||||
const char *cap;
|
||||
{
|
||||
register int i;
|
||||
register unsigned int i;
|
||||
|
||||
if (tcap_initialized == 0)
|
||||
return ((char *)NULL);
|
||||
|
@ -410,7 +410,7 @@ rl_backward (count, key)
|
||||
/* Move to the beginning of the line. */
|
||||
int
|
||||
rl_beg_of_line (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
rl_point = 0;
|
||||
return 0;
|
||||
@ -419,7 +419,7 @@ rl_beg_of_line (count, key)
|
||||
/* Move to the end of the line. */
|
||||
int
|
||||
rl_end_of_line (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
rl_point = rl_end;
|
||||
return 0;
|
||||
@ -527,7 +527,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;
|
||||
int ignore1 __attribute__((unused)), ignore2 __attribute__((unused));
|
||||
{
|
||||
int curr_line;
|
||||
|
||||
@ -566,7 +566,7 @@ rl_clear_screen (count, key)
|
||||
|
||||
int
|
||||
rl_arrow_keys (count, c)
|
||||
int count, c;
|
||||
int count, c __attribute__((unused));
|
||||
{
|
||||
int ch;
|
||||
|
||||
@ -884,7 +884,7 @@ _rl_insert_next_callback (data)
|
||||
|
||||
int
|
||||
rl_quoted_insert (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
/* Let's see...should the callback interface futz with signal handling? */
|
||||
#if defined (HANDLE_SIGNALS)
|
||||
@ -907,7 +907,7 @@ rl_quoted_insert (count, key)
|
||||
/* Insert a tab character. */
|
||||
int
|
||||
rl_tab_insert (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
return (_rl_insert_char (count, '\t'));
|
||||
}
|
||||
@ -917,7 +917,7 @@ rl_tab_insert (count, key)
|
||||
meaning in the future. */
|
||||
int
|
||||
rl_newline (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
rl_done = 1;
|
||||
|
||||
@ -951,7 +951,7 @@ rl_newline (count, key)
|
||||
is special cased. */
|
||||
int
|
||||
rl_do_lowercase_version (ignore1, ignore2)
|
||||
int ignore1, ignore2;
|
||||
int ignore1 __attribute__((unused)), ignore2 __attribute__((unused));
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -1118,7 +1118,7 @@ rl_rubout_or_delete (count, key)
|
||||
/* Delete all spaces and tabs around point. */
|
||||
int
|
||||
rl_delete_horizontal_space (count, ignore)
|
||||
int count, ignore;
|
||||
int count __attribute__((unused)), ignore __attribute__((unused));
|
||||
{
|
||||
int start = rl_point;
|
||||
|
||||
@ -1163,9 +1163,9 @@ rl_delete_or_show_completions (count, key)
|
||||
A K*rn shell style function. */
|
||||
int
|
||||
rl_insert_comment (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
char *rl_comment_text;
|
||||
const char *rl_comment_text;
|
||||
int rl_comment_len;
|
||||
|
||||
rl_beg_of_line (1, key);
|
||||
@ -1202,7 +1202,7 @@ rl_insert_comment (count, key)
|
||||
/* Uppercase the word at point. */
|
||||
int
|
||||
rl_upcase_word (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
return (rl_change_case (count, UpCase));
|
||||
}
|
||||
@ -1210,7 +1210,7 @@ rl_upcase_word (count, key)
|
||||
/* Lowercase the word at point. */
|
||||
int
|
||||
rl_downcase_word (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
return (rl_change_case (count, DownCase));
|
||||
}
|
||||
@ -1218,7 +1218,7 @@ rl_downcase_word (count, key)
|
||||
/* Upcase the first letter, downcase the rest. */
|
||||
int
|
||||
rl_capitalize_word (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
return (rl_change_case (count, CapCase));
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ rl_transpose_words (count, key)
|
||||
then transpose the characters before point. */
|
||||
int
|
||||
rl_transpose_chars (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
char *dummy;
|
||||
@ -1557,7 +1557,7 @@ _rl_char_search_callback (data)
|
||||
|
||||
int
|
||||
rl_char_search (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
if (RL_ISSTATE (RL_STATE_CALLBACK))
|
||||
@ -1575,7 +1575,7 @@ rl_char_search (count, key)
|
||||
|
||||
int
|
||||
rl_backward_char_search (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
if (RL_ISSTATE (RL_STATE_CALLBACK))
|
||||
@ -1612,7 +1612,7 @@ _rl_set_mark_at_pos (position)
|
||||
/* A bindable command to set the mark. */
|
||||
int
|
||||
rl_set_mark (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point));
|
||||
}
|
||||
@ -1620,7 +1620,7 @@ rl_set_mark (count, key)
|
||||
/* Exchange the position of mark and point. */
|
||||
int
|
||||
rl_exchange_point_and_mark (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
if (rl_mark > rl_end)
|
||||
rl_mark = -1;
|
||||
|
@ -196,7 +196,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));
|
||||
|
@ -231,7 +231,8 @@ rl_do_undo ()
|
||||
|
||||
int
|
||||
_rl_fix_last_undo_of_type (type, start, end)
|
||||
int type, start, end;
|
||||
enum undo_code type;
|
||||
int start, end;
|
||||
{
|
||||
UNDO_LIST *rl;
|
||||
|
||||
@ -289,7 +290,7 @@ rl_modifying (start, end)
|
||||
/* Revert the current line to its previous state. */
|
||||
int
|
||||
rl_revert_line (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
if (!rl_undo_list)
|
||||
rl_ding ();
|
||||
@ -309,7 +310,7 @@ rl_revert_line (count, key)
|
||||
/* Do some undoing of things that were done. */
|
||||
int
|
||||
rl_undo_command (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
if (count < 0)
|
||||
return 0; /* Nothing to do. */
|
||||
|
@ -115,14 +115,14 @@ _rl_abort_internal ()
|
||||
|
||||
int
|
||||
rl_abort (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
return (_rl_abort_internal ());
|
||||
}
|
||||
|
||||
int
|
||||
rl_tty_status (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
#if defined (TIOCSTAT)
|
||||
ioctl (1, TIOCSTAT, (char *)0);
|
||||
@ -172,7 +172,7 @@ rl_extend_line_buffer (len)
|
||||
/* A function for simple tilde expansion. */
|
||||
int
|
||||
rl_tilde_expand (ignore, key)
|
||||
int ignore, key;
|
||||
int ignore __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
register int start, end;
|
||||
char *homedir, *temp;
|
||||
|
@ -131,7 +131,7 @@ static int _rl_vi_callback_char_search PARAMS((_rl_callback_generic_arg *));
|
||||
void
|
||||
_rl_vi_initialize_line ()
|
||||
{
|
||||
register int i;
|
||||
register size_t i;
|
||||
|
||||
for (i = 0; i < sizeof (vi_mark_chars) / sizeof (int); i++)
|
||||
vi_mark_chars[i] = -1;
|
||||
@ -190,7 +190,7 @@ _rl_vi_stuff_insert (count)
|
||||
puts you back into insert mode. */
|
||||
int
|
||||
rl_vi_redo (count, c)
|
||||
int count, c;
|
||||
int count, c __attribute__((unused));
|
||||
{
|
||||
int r;
|
||||
|
||||
@ -238,7 +238,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;
|
||||
int count, 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. */
|
||||
@ -321,7 +321,7 @@ rl_vi_search (count, key)
|
||||
/* Completion, from vi's point of view. */
|
||||
int
|
||||
rl_vi_complete (ignore, key)
|
||||
int ignore, key;
|
||||
int ignore __attribute__((unused)), key;
|
||||
{
|
||||
if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
|
||||
{
|
||||
@ -348,7 +348,7 @@ rl_vi_complete (ignore, key)
|
||||
/* Tilde expansion for vi mode. */
|
||||
int
|
||||
rl_vi_tilde_expand (ignore, key)
|
||||
int ignore, key;
|
||||
int ignore __attribute__((unused)), key;
|
||||
{
|
||||
rl_tilde_expand (0, key);
|
||||
rl_vi_start_inserting (key, 1, rl_arg_sign);
|
||||
@ -419,7 +419,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;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
while (count-- && rl_point < (rl_end - 1))
|
||||
{
|
||||
@ -436,7 +436,7 @@ rl_vi_fWord (count, ignore)
|
||||
|
||||
int
|
||||
rl_vi_bWord (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
while (count-- && rl_point > 0)
|
||||
{
|
||||
@ -460,7 +460,7 @@ rl_vi_bWord (count, ignore)
|
||||
|
||||
int
|
||||
rl_vi_eWord (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
while (count-- && rl_point < (rl_end - 1))
|
||||
{
|
||||
@ -491,7 +491,7 @@ rl_vi_eWord (count, ignore)
|
||||
|
||||
int
|
||||
rl_vi_fword (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
while (count-- && rl_point < (rl_end - 1))
|
||||
{
|
||||
@ -517,7 +517,7 @@ rl_vi_fword (count, ignore)
|
||||
|
||||
int
|
||||
rl_vi_bword (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
while (count-- && rl_point > 0)
|
||||
{
|
||||
@ -556,7 +556,7 @@ rl_vi_bword (count, ignore)
|
||||
|
||||
int
|
||||
rl_vi_eword (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
while (count-- && rl_point < rl_end - 1)
|
||||
{
|
||||
@ -581,7 +581,7 @@ rl_vi_eword (count, ignore)
|
||||
|
||||
int
|
||||
rl_vi_insert_beg (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
rl_beg_of_line (1, key);
|
||||
rl_vi_insertion_mode (1, key);
|
||||
@ -610,7 +610,7 @@ _rl_vi_append_forward (key)
|
||||
|
||||
int
|
||||
rl_vi_append_mode (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
_rl_vi_append_forward (key);
|
||||
rl_vi_start_inserting (key, 1, rl_arg_sign);
|
||||
@ -619,7 +619,7 @@ rl_vi_append_mode (count, key)
|
||||
|
||||
int
|
||||
rl_vi_append_eol (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
rl_end_of_line (1, key);
|
||||
rl_vi_append_mode (1, key);
|
||||
@ -629,7 +629,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;
|
||||
int count __attribute__((unused)), c __attribute__((unused));
|
||||
{
|
||||
return (rl_newline (1, '\n'));
|
||||
}
|
||||
@ -640,7 +640,7 @@ rl_vi_eof_maybe (count, c)
|
||||
switching keymaps. */
|
||||
int
|
||||
rl_vi_insertion_mode (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
_rl_keymap = vi_insertion_keymap;
|
||||
_rl_vi_last_key_before_insert = key;
|
||||
@ -703,7 +703,7 @@ _rl_vi_done_inserting ()
|
||||
|
||||
int
|
||||
rl_vi_movement_mode (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
if (rl_point > 0)
|
||||
rl_backward_char (1, key);
|
||||
@ -783,7 +783,7 @@ _rl_vi_change_mbchar_case (count)
|
||||
|
||||
int
|
||||
rl_vi_change_case (count, ignore)
|
||||
int count, ignore;
|
||||
int count, ignore __attribute__((unused));
|
||||
{
|
||||
int c, p;
|
||||
|
||||
@ -1031,7 +1031,7 @@ rl_digit_loop1 ()
|
||||
|
||||
int
|
||||
rl_vi_delete_to (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
int c;
|
||||
|
||||
@ -1057,7 +1057,7 @@ rl_vi_delete_to (count, key)
|
||||
|
||||
int
|
||||
rl_vi_change_to (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
int c, start_pos;
|
||||
|
||||
@ -1110,7 +1110,7 @@ rl_vi_change_to (count, key)
|
||||
|
||||
int
|
||||
rl_vi_yank_to (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
int c, save;
|
||||
|
||||
@ -1202,7 +1202,7 @@ rl_vi_delete (count, key)
|
||||
|
||||
int
|
||||
rl_vi_back_to_indent (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
rl_beg_of_line (1, key);
|
||||
while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
|
||||
@ -1212,7 +1212,7 @@ rl_vi_back_to_indent (count, key)
|
||||
|
||||
int
|
||||
rl_vi_first_print (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key;
|
||||
{
|
||||
return (rl_vi_back_to_indent (1, key));
|
||||
}
|
||||
@ -1319,7 +1319,7 @@ rl_vi_char_search (count, key)
|
||||
/* Match brackets */
|
||||
int
|
||||
rl_vi_match (ignore, key)
|
||||
int ignore, key;
|
||||
int ignore __attribute__((unused)), key;
|
||||
{
|
||||
int count = 1, brack, pos, tmp, pre;
|
||||
|
||||
@ -1426,7 +1426,7 @@ rl_vi_bracktype (c)
|
||||
static int
|
||||
_rl_vi_change_char (count, c, mb)
|
||||
int count, c;
|
||||
char *mb;
|
||||
char *mb __attribute__((unused));
|
||||
{
|
||||
int p;
|
||||
|
||||
@ -1458,8 +1458,8 @@ _rl_vi_change_char (count, c, mb)
|
||||
|
||||
static int
|
||||
_rl_vi_callback_getchar (mb, mlen)
|
||||
char *mb;
|
||||
int mlen;
|
||||
char *mb __attribute__((unused));
|
||||
int mlen __attribute__((unused));
|
||||
{
|
||||
int c;
|
||||
|
||||
@ -1494,7 +1494,7 @@ _rl_vi_callback_change_char (data)
|
||||
|
||||
int
|
||||
rl_vi_change_char (count, key)
|
||||
int count, key;
|
||||
int count, key __attribute__((unused));
|
||||
{
|
||||
int c;
|
||||
char mb[MB_LEN_MAX];
|
||||
@ -1582,7 +1582,7 @@ rl_vi_overstrike_delete (count, key)
|
||||
|
||||
int
|
||||
rl_vi_replace (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1663,7 +1663,7 @@ _rl_vi_set_mark ()
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
static int
|
||||
_rl_vi_callback_set_mark (data)
|
||||
_rl_callback_generic_arg *data;
|
||||
_rl_callback_generic_arg *data __attribute__((unused));
|
||||
{
|
||||
_rl_callback_func = 0;
|
||||
_rl_want_redisplay = 1;
|
||||
@ -1674,7 +1674,7 @@ _rl_vi_callback_set_mark (data)
|
||||
|
||||
int
|
||||
rl_vi_set_mark (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
if (RL_ISSTATE (RL_STATE_CALLBACK))
|
||||
@ -1721,7 +1721,7 @@ _rl_vi_goto_mark ()
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
static int
|
||||
_rl_vi_callback_goto_mark (data)
|
||||
_rl_callback_generic_arg *data;
|
||||
_rl_callback_generic_arg *data __attribute__((unused));
|
||||
{
|
||||
_rl_callback_func = 0;
|
||||
_rl_want_redisplay = 1;
|
||||
@ -1732,7 +1732,7 @@ _rl_vi_callback_goto_mark (data)
|
||||
|
||||
int
|
||||
rl_vi_goto_mark (count, key)
|
||||
int count, key;
|
||||
int count __attribute__((unused)), key __attribute__((unused));
|
||||
{
|
||||
#if defined (READLINE_CALLBACKS)
|
||||
if (RL_ISSTATE (RL_STATE_CALLBACK))
|
||||
|
@ -790,15 +790,17 @@ void processReply(SSL& ssl)
|
||||
if (ssl.GetError()) return;
|
||||
|
||||
if (DoProcessReply(ssl))
|
||||
{
|
||||
// didn't complete process
|
||||
if (!ssl.getSocket().IsNonBlocking()) {
|
||||
// keep trying now, blocking ok
|
||||
while (!ssl.GetError())
|
||||
if (DoProcessReply(ssl) == 0) break;
|
||||
}
|
||||
}
|
||||
else
|
||||
// user will have try again later, non blocking
|
||||
ssl.SetError(YasslError(SSL_ERROR_WANT_READ));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -873,10 +875,12 @@ void sendServerKeyExchange(SSL& ssl, BufferOutput buffer)
|
||||
void sendChangeCipher(SSL& ssl, BufferOutput buffer)
|
||||
{
|
||||
if (ssl.getSecurity().get_parms().entity_ == server_end)
|
||||
{
|
||||
if (ssl.getSecurity().get_resuming())
|
||||
ssl.verifyState(clientKeyExchangeComplete);
|
||||
else
|
||||
ssl.verifyState(clientFinishedComplete);
|
||||
}
|
||||
if (ssl.GetError()) return;
|
||||
|
||||
ChangeCipherSpec ccs;
|
||||
|
@ -1272,6 +1272,7 @@ void ServerHello::Process(input_buffer&, SSL& ssl)
|
||||
ssl.useSecurity().use_connection().sessionID_Set_ = false;
|
||||
|
||||
if (ssl.getSecurity().get_resuming())
|
||||
{
|
||||
if (memcmp(session_id_, ssl.getSecurity().get_resume().GetID(),
|
||||
ID_LEN) == 0) {
|
||||
ssl.set_masterSecret(ssl.getSecurity().get_resume().GetSecret());
|
||||
@ -1286,6 +1287,7 @@ void ServerHello::Process(input_buffer&, SSL& ssl)
|
||||
ssl.useSecurity().set_resuming(false);
|
||||
ssl.useLog().Trace("server denied resumption");
|
||||
}
|
||||
}
|
||||
|
||||
if (ssl.CompressionOn() && !compression_method_)
|
||||
ssl.UnSetCompression(); // server isn't supporting yaSSL zlib request
|
||||
|
@ -96,10 +96,12 @@ inline void Mode_BASE::Process(byte* out, const byte* in, word32 sz)
|
||||
if (mode_ == ECB)
|
||||
ECB_Process(out, in, sz);
|
||||
else if (mode_ == CBC)
|
||||
{
|
||||
if (dir_ == ENCRYPTION)
|
||||
CBC_Encrypt(out, in, sz);
|
||||
else
|
||||
CBC_Decrypt(out, in, sz);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -781,10 +781,12 @@ void CertDecoder::GetDate(DateType dt)
|
||||
source_.advance(length);
|
||||
|
||||
if (!ValidateDate(date, b, dt) && verify_)
|
||||
{
|
||||
if (dt == BEFORE)
|
||||
source_.SetError(BEFORE_DATE_E);
|
||||
else
|
||||
source_.SetError(AFTER_DATE_E);
|
||||
}
|
||||
|
||||
// save for later use
|
||||
if (dt == BEFORE) {
|
||||
@ -1062,6 +1064,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
|
||||
}
|
||||
word32 rLen = GetLength(source);
|
||||
if (rLen != 20)
|
||||
{
|
||||
if (rLen == 21) { // zero at front, eat
|
||||
source.next();
|
||||
--rLen;
|
||||
@ -1074,6 +1077,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
|
||||
source.SetError(DSA_SZ_E);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
memcpy(decoded, source.get_buffer() + source.get_index(), rLen);
|
||||
source.advance(rLen);
|
||||
|
||||
@ -1084,6 +1088,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
|
||||
}
|
||||
word32 sLen = GetLength(source);
|
||||
if (sLen != 20)
|
||||
{
|
||||
if (sLen == 21) {
|
||||
source.next(); // zero at front, eat
|
||||
--sLen;
|
||||
@ -1096,6 +1101,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz)
|
||||
source.SetError(DSA_SZ_E);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
memcpy(decoded + rLen, source.get_buffer() + source.get_index(), sLen);
|
||||
source.advance(sLen);
|
||||
|
||||
|
@ -145,8 +145,8 @@ int User_map::load(const char *password_file_name)
|
||||
while (fgets(line, sizeof(line), file))
|
||||
{
|
||||
/* skip comments and empty lines */
|
||||
if (line[0] == '#' || line[0] == '\n' &&
|
||||
(line[1] == '\0' || line[1] == '\r'))
|
||||
if (line[0] == '#' || (line[0] == '\n' &&
|
||||
(line[1] == '\0' || line[1] == '\r')))
|
||||
continue;
|
||||
if ((user= new User) == 0)
|
||||
goto done;
|
||||
|
@ -97,7 +97,7 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
|
||||
|
||||
if (!thd->vio_ok())
|
||||
{
|
||||
sql_print_error(msgbuf);
|
||||
sql_print_error("%s", msgbuf);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3096,7 +3096,7 @@ void Load_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info,
|
||||
{
|
||||
if (i)
|
||||
fputc(',', file);
|
||||
fprintf(file, field);
|
||||
fprintf(file, "%s", field);
|
||||
|
||||
field += field_lens[i] + 1;
|
||||
}
|
||||
@ -5203,7 +5203,7 @@ void Execute_load_query_log_event::print(FILE* file,
|
||||
{
|
||||
my_fwrite(file, (byte*) query, fn_pos_start, MYF(MY_NABP | MY_WME));
|
||||
fprintf(file, " LOCAL INFILE \'");
|
||||
fprintf(file, local_fname);
|
||||
fprintf(file, "%s", local_fname);
|
||||
fprintf(file, "\'");
|
||||
if (dup_handling == LOAD_DUP_REPLACE)
|
||||
fprintf(file, " REPLACE");
|
||||
|
@ -1435,7 +1435,7 @@ static int get_master_version_and_clock(MYSQL* mysql, MASTER_INFO* mi)
|
||||
|
||||
if (errmsg)
|
||||
{
|
||||
sql_print_error(errmsg);
|
||||
sql_print_error("%s", errmsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1558,7 +1558,7 @@ be equal for replication to work";
|
||||
err:
|
||||
if (errmsg)
|
||||
{
|
||||
sql_print_error(errmsg);
|
||||
sql_print_error("%s", errmsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1968,7 +1968,7 @@ Failed to open the existing relay log info file '%s' (errno %d)",
|
||||
DBUG_RETURN(error);
|
||||
|
||||
err:
|
||||
sql_print_error(msg);
|
||||
sql_print_error("%s", msg);
|
||||
end_io_cache(&rli->info_file);
|
||||
if (info_fd >= 0)
|
||||
my_close(info_fd, MYF(0));
|
||||
|
@ -363,7 +363,7 @@ int check_user(THD *thd, enum enum_server_command command,
|
||||
if (opt_secure_auth_local && passwd_len == SCRAMBLE_LENGTH_323)
|
||||
{
|
||||
net_printf_error(thd, ER_NOT_SUPPORTED_AUTH_MODE);
|
||||
mysql_log.write(thd, COM_CONNECT, ER(ER_NOT_SUPPORTED_AUTH_MODE));
|
||||
mysql_log.write(thd, COM_CONNECT, "%s", ER(ER_NOT_SUPPORTED_AUTH_MODE));
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
if (passwd_len != 0 &&
|
||||
@ -500,7 +500,7 @@ int check_user(THD *thd, enum enum_server_command command,
|
||||
else if (res == 2) // client gave short hash, server has long hash
|
||||
{
|
||||
net_printf_error(thd, ER_NOT_SUPPORTED_AUTH_MODE);
|
||||
mysql_log.write(thd,COM_CONNECT,ER(ER_NOT_SUPPORTED_AUTH_MODE));
|
||||
mysql_log.write(thd,COM_CONNECT,"%s",ER(ER_NOT_SUPPORTED_AUTH_MODE));
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
net_printf_error(thd, ER_ACCESS_DENIED_ERROR,
|
||||
|
@ -144,7 +144,7 @@ static int send_file(THD *thd)
|
||||
if (errmsg)
|
||||
{
|
||||
sql_print_error("Failed in send_file() %s", errmsg);
|
||||
DBUG_PRINT("error", (errmsg));
|
||||
DBUG_PRINT("error", ("%s", errmsg));
|
||||
}
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
@ -2521,7 +2521,7 @@ send_result_message:
|
||||
{
|
||||
if (!thd->vio_ok())
|
||||
{
|
||||
sql_print_error(err_msg);
|
||||
sql_print_error("%s", err_msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -21,7 +21,7 @@
|
||||
extern "C" {
|
||||
void sql_alloc_error_handler(void)
|
||||
{
|
||||
sql_print_error(ER(ER_OUT_OF_RESOURCES));
|
||||
sql_print_error("%s", ER(ER_OUT_OF_RESOURCES));
|
||||
|
||||
THD *thd=current_thd;
|
||||
if (thd)
|
||||
|
@ -306,7 +306,7 @@ int decimal_actual_fraction(decimal_t *from)
|
||||
{
|
||||
for (i= DIG_PER_DEC1 - ((frac - 1) % DIG_PER_DEC1);
|
||||
*buf0 % powers10[i++] == 0;
|
||||
frac--);
|
||||
frac--) ;
|
||||
}
|
||||
return frac;
|
||||
}
|
||||
@ -500,7 +500,7 @@ static void digits_bounds(decimal_t *from, int *start_result, int *end_result)
|
||||
stop= (int) ((buf_end - from->buf + 1) * DIG_PER_DEC1);
|
||||
i= 1;
|
||||
}
|
||||
for (; *buf_end % powers10[i++] == 0; stop--);
|
||||
for (; *buf_end % powers10[i++] == 0; stop--) ;
|
||||
*end_result= stop; /* index of position after last decimal digit (from 0) */
|
||||
}
|
||||
|
||||
@ -1005,7 +1005,7 @@ static int ull2dec(ulonglong from, decimal_t *to)
|
||||
|
||||
sanity(to);
|
||||
|
||||
for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE);
|
||||
for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE) ;
|
||||
if (unlikely(intg1 > to->len))
|
||||
{
|
||||
intg1=to->len;
|
||||
|
Loading…
x
Reference in New Issue
Block a user