1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

upgrade readline to version 4.3

client/completion_hash.cc:
  correct headers of functions for readline 4.3 (add const modifier to char*)
client/completion_hash.h:
  correct headers of functions for readline 4.3 (add const modifier to char*)
client/mysql.cc:
  correct functions for readline 4.3
This commit is contained in:
unknown
2002-11-19 18:26:53 +04:00
parent 0fb3b8d9ab
commit 953f6c51fe
62 changed files with 14264 additions and 7179 deletions

View File

@@ -1049,8 +1049,8 @@ static bool add_line(String &buffer,char *line,char *in_string)
#ifdef HAVE_READLINE
static char *new_command_generator(char *text, int);
static char **new_mysql_completion (char *text, int start, int end);
static char *new_command_generator(const char *text, int);
static char **new_mysql_completion (const char *text, int start, int end);
/*
Tell the GNU Readline library how to complete. We want to try to complete
@@ -1058,8 +1058,8 @@ static char **new_mysql_completion (char *text, int start, int end);
if not.
*/
char **no_completion (char *text __attribute__ ((unused)),
char *word __attribute__ ((unused)))
char *no_completion (const char *text __attribute__ ((unused)),
int )
{
return 0; /* No filename completion */
}
@@ -1071,8 +1071,8 @@ static void initialize_readline (char *name)
/* Tell the completer that we want a crack first. */
/* rl_attempted_completion_function = (CPPFunction *)mysql_completion;*/
rl_attempted_completion_function = (CPPFunction *) new_mysql_completion;
rl_completion_entry_function=(Function *) no_completion;
rl_attempted_completion_function = &new_mysql_completion;
rl_completion_entry_function= &no_completion;
}
/*
@@ -1082,17 +1082,17 @@ static void initialize_readline (char *name)
array of matches, or NULL if there aren't any.
*/
static char **new_mysql_completion (char *text,
static char **new_mysql_completion (const char *text,
int start __attribute__((unused)),
int end __attribute__((unused)))
{
if (!status.batch && !quick)
return completion_matches(text, (CPFunction*) new_command_generator);
return rl_completion_matches(text, new_command_generator);
else
return (char**) 0;
}
static char *new_command_generator(char *text,int state)
static char *new_command_generator(const char *text,int state)
{
static int textlen;
char *ptr;