From 176d224b694b4f6ec2933fc9b8e3b76043659744 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 1 Mar 2024 23:26:43 +0300 Subject: Release version 8.0.15+13 Add mysql-client package. Minor cleanups of the libmysqlclient library. --- mysql-client/mysql/downstream/readline.h | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 mysql-client/mysql/downstream/readline.h (limited to 'mysql-client/mysql/downstream/readline.h') diff --git a/mysql-client/mysql/downstream/readline.h b/mysql-client/mysql/downstream/readline.h new file mode 100644 index 0000000..1540200 --- /dev/null +++ b/mysql-client/mysql/downstream/readline.h @@ -0,0 +1,59 @@ +/* file : mysql/downstream/readline.h + * license : GPLv2 with Universal FOSS Exception; see accompanying LICENSE file + */ + +#ifndef MYSQL_DOWNSTREAM_READLINE_H +#define MYSQL_DOWNSTREAM_READLINE_H + +/* + * Reduced implementation of the libedit library based on libisocline. + * + * Specially, only the basic line editing functionality is supported (no + * completion, history, etc). + */ +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Thin wrapper around libisocline's ic_readline(). + */ +char* +readline (const char* prompt); + +/* + * Reading function stubs. + */ +typedef char** rl_completion_func_t (const char*, int, int); +typedef char* rl_compentry_func_t (const char*, int); +typedef int rl_command_func_t (int, int); +typedef char* rl_compentry_func_t (const char*, int); + +int rl_insert (int, int); +int rl_add_defun (const char*, rl_command_func_t*, int); +char** rl_completion_matches (const char*, rl_compentry_func_t*); + +extern char* rl_readline_name; +extern rl_completion_func_t* rl_attempted_completion_function; +extern rl_compentry_func_t* rl_completion_entry_function; + +/* + * Hstory function stubs. + */ +typedef struct _hist_entry { + const char *line; + const char *data; +} HIST_ENTRY; + +int add_history (const char*); +int read_history (const char*); +int write_history (const char*); +HIST_ENTRY* history_get (int); + +extern int history_length; + +#ifdef __cplusplus +} +#endif + +#endif /* MYSQL_DOWNSTREAM_READLINE_H */ -- cgit v1.1