mirror of
https://github.com/MariaDB/server.git
synced 2025-07-02 14:22:51 +03:00
1. discarded term.h from the distribution
2. changed key_* to el_ley_* in the libedit key.h (because it's in the conflict with the aix definitions) 3. use libedit_term.h instead of term.h in the cmd-line-utils/libedit/el.h 4. added definition of MIN in the cmd-line-utils/libedit/read.c (if it wasn't defined yet) 5. discarded definition of SUNOS macro from configure.in (now we don't include term.h in the el.h at all)
This commit is contained in:
@ -103,14 +103,14 @@ private int key__decode_char(char *, int, int);
|
||||
* Initialize the key maps
|
||||
*/
|
||||
protected int
|
||||
key_init(EditLine *el)
|
||||
el_key_init(EditLine *el)
|
||||
{
|
||||
|
||||
el->el_key.buf = (char *) el_malloc(KEY_BUFSIZ);
|
||||
if (el->el_key.buf == NULL)
|
||||
return (-1);
|
||||
el->el_key.map = NULL;
|
||||
key_reset(el);
|
||||
el_key_reset(el);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ key_init(EditLine *el)
|
||||
* Free the key maps
|
||||
*/
|
||||
protected void
|
||||
key_end(EditLine *el)
|
||||
el_key_end(EditLine *el)
|
||||
{
|
||||
|
||||
el_free((ptr_t) el->el_key.buf);
|
||||
@ -133,7 +133,7 @@ key_end(EditLine *el)
|
||||
* Associate cmd with a key value
|
||||
*/
|
||||
protected key_value_t *
|
||||
key_map_cmd(EditLine *el, int cmd)
|
||||
el_key_map_cmd(EditLine *el, int cmd)
|
||||
{
|
||||
|
||||
el->el_key.val.cmd = (el_action_t) cmd;
|
||||
@ -145,7 +145,7 @@ key_map_cmd(EditLine *el, int cmd)
|
||||
* Associate str with a key value
|
||||
*/
|
||||
protected key_value_t *
|
||||
key_map_str(EditLine *el, char *str)
|
||||
el_key_map_str(EditLine *el, char *str)
|
||||
{
|
||||
|
||||
el->el_key.val.str = str;
|
||||
@ -159,7 +159,7 @@ key_map_str(EditLine *el, char *str)
|
||||
* [Always bind the ansi arrow keys?]
|
||||
*/
|
||||
protected void
|
||||
key_reset(EditLine *el)
|
||||
el_key_reset(EditLine *el)
|
||||
{
|
||||
|
||||
node__put(el, el->el_key.map);
|
||||
@ -177,7 +177,7 @@ key_reset(EditLine *el)
|
||||
* The last character read is returned in *ch.
|
||||
*/
|
||||
protected int
|
||||
key_get(EditLine *el, char *ch, key_value_t *val)
|
||||
el_key_get(EditLine *el, char *ch, key_value_t *val)
|
||||
{
|
||||
|
||||
return (node_trav(el, el->el_key.map, ch, val));
|
||||
@ -191,7 +191,7 @@ key_get(EditLine *el, char *ch, key_value_t *val)
|
||||
* out str or a unix command.
|
||||
*/
|
||||
protected void
|
||||
key_add(EditLine *el, const char *key, key_value_t *val, int ntype)
|
||||
el_key_add(EditLine *el, const char *key, key_value_t *val, int ntype)
|
||||
{
|
||||
|
||||
if (key[0] == '\0') {
|
||||
@ -219,7 +219,7 @@ key_add(EditLine *el, const char *key, key_value_t *val, int ntype)
|
||||
*
|
||||
*/
|
||||
protected void
|
||||
key_clear(EditLine *el, el_action_t *map, const char *in)
|
||||
el_key_clear(EditLine *el, el_action_t *map, const char *in)
|
||||
{
|
||||
|
||||
if ((map[(unsigned char)*in] == ED_SEQUENCE_LEAD_IN) &&
|
||||
@ -227,7 +227,7 @@ key_clear(EditLine *el, el_action_t *map, const char *in)
|
||||
el->el_map.alt[(unsigned char)*in] != ED_SEQUENCE_LEAD_IN) ||
|
||||
(map == el->el_map.alt &&
|
||||
el->el_map.key[(unsigned char)*in] != ED_SEQUENCE_LEAD_IN)))
|
||||
(void) key_delete(el, in);
|
||||
(void) el_key_delete(el, in);
|
||||
}
|
||||
|
||||
|
||||
@ -236,7 +236,7 @@ key_clear(EditLine *el, el_action_t *map, const char *in)
|
||||
* they exists.
|
||||
*/
|
||||
protected int
|
||||
key_delete(EditLine *el, const char *key)
|
||||
el_key_delete(EditLine *el, const char *key)
|
||||
{
|
||||
|
||||
if (key[0] == '\0') {
|
||||
@ -257,7 +257,7 @@ key_delete(EditLine *el, const char *key)
|
||||
* Print entire el->el_key.map if null
|
||||
*/
|
||||
protected void
|
||||
key_print(EditLine *el, const char *key)
|
||||
el_key_print(EditLine *el, const char *key)
|
||||
{
|
||||
|
||||
/* do nothing if el->el_key.map is empty and null key specified */
|
||||
@ -504,7 +504,7 @@ node_lookup(EditLine *el, const char *str, key_node_t *ptr, int cnt)
|
||||
if (str[1] == 0) {
|
||||
el->el_key.buf[ncnt + 1] = '"';
|
||||
el->el_key.buf[ncnt + 2] = '\0';
|
||||
key_kprint(el, el->el_key.buf,
|
||||
el_key_kprint(el, el->el_key.buf,
|
||||
&ptr->val, ptr->type);
|
||||
return (0);
|
||||
} else
|
||||
@ -552,7 +552,7 @@ node_enum(EditLine *el, key_node_t *ptr, int cnt)
|
||||
/* print this key and function */
|
||||
el->el_key.buf[ncnt + 1] = '"';
|
||||
el->el_key.buf[ncnt + 2] = '\0';
|
||||
key_kprint(el, el->el_key.buf, &ptr->val, ptr->type);
|
||||
el_key_kprint(el, el->el_key.buf, &ptr->val, ptr->type);
|
||||
} else
|
||||
(void) node_enum(el, ptr->next, ncnt + 1);
|
||||
|
||||
@ -568,7 +568,7 @@ node_enum(EditLine *el, key_node_t *ptr, int cnt)
|
||||
* function specified by val
|
||||
*/
|
||||
protected void
|
||||
key_kprint(EditLine *el, const char *key, key_value_t *val, int ntype)
|
||||
el_key_kprint(EditLine *el, const char *key, key_value_t *val, int ntype)
|
||||
{
|
||||
el_bindings_t *fp;
|
||||
char unparsbuf[EL_BUFSIZ];
|
||||
@ -579,7 +579,7 @@ key_kprint(EditLine *el, const char *key, key_value_t *val, int ntype)
|
||||
case XK_STR:
|
||||
case XK_EXE:
|
||||
(void) fprintf(el->el_outfile, fmt, key,
|
||||
key__decode_str(val->str, unparsbuf,
|
||||
el_key__decode_str(val->str, unparsbuf,
|
||||
ntype == XK_STR ? "\"\"" : "[]"));
|
||||
break;
|
||||
case XK_CMD:
|
||||
@ -644,7 +644,7 @@ key__decode_char(char *buf, int cnt, int ch)
|
||||
* Make a printable version of the ey
|
||||
*/
|
||||
protected char *
|
||||
key__decode_str(const char *str, char *buf, const char *sep)
|
||||
el_key__decode_str(const char *str, char *buf, const char *sep)
|
||||
{
|
||||
char *b;
|
||||
const char *p;
|
||||
|
Reference in New Issue
Block a user