mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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) BitKeeper/deleted/.del-term.h~23716a5310508e0: Delete: cmd-line-utils/libedit/term.h cmd-line-utils/libedit/Makefile.am: discarded term.h from the distribution cmd-line-utils/libedit/el.c: changed key_init -> el_key_init key_end -> el_key_end cmd-line-utils/libedit/el.h: change #include "term.h" to #include "libedit_term.h" cmd-line-utils/libedit/key.c: changed functions key_... to el_key_... because it's in conflict with the aix definitions cmd-line-utils/libedit/key.h: changed functions key_... to el_key_... because it's in conflict with the aix definitions cmd-line-utils/libedit/map.c: changed functions key_... to el_key_... because it's in conflict with the aix definitions cmd-line-utils/libedit/read.c: 1. added definition of MIN 2. fixed problems with undefined uint 3. changed key_get to el_key_get cmd-line-utils/libedit/term.c: 1. discarded #include "term.h" at all 2. changed functions key_* to el_key_* 3. add declaration of el_key__decode_str cmd-line-utils/libedit/tty.c: changed functions key_... to el_key_... because it's in conflict with the aix definitions configure.in: discarded definition of SUNOS macro (libedit doesn't require it anymore)
This commit is contained in:
@ -67,10 +67,6 @@ __RCSID("$NetBSD: term.c,v 1.35 2002/03/18 16:00:59 christos Exp $");
|
||||
|
||||
#include "el.h"
|
||||
|
||||
/* Solaris's term.h does horrid things. */
|
||||
#if (defined(HAVE_TERM_H) && !defined(SUNOS))
|
||||
#include <term.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
@ -1079,32 +1075,32 @@ term_reset_arrow(EditLine *el)
|
||||
static const char stOH[] = {033, 'O', 'H', '\0'};
|
||||
static const char stOF[] = {033, 'O', 'F', '\0'};
|
||||
|
||||
key_add(el, strA, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
|
||||
key_add(el, strB, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
|
||||
key_add(el, strC, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
|
||||
key_add(el, strD, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
|
||||
key_add(el, strH, &arrow[A_K_HO].fun, arrow[A_K_HO].type);
|
||||
key_add(el, strF, &arrow[A_K_EN].fun, arrow[A_K_EN].type);
|
||||
key_add(el, stOA, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
|
||||
key_add(el, stOB, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
|
||||
key_add(el, stOC, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
|
||||
key_add(el, stOD, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
|
||||
key_add(el, stOH, &arrow[A_K_HO].fun, arrow[A_K_HO].type);
|
||||
key_add(el, stOF, &arrow[A_K_EN].fun, arrow[A_K_EN].type);
|
||||
el_key_add(el, strA, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
|
||||
el_key_add(el, strB, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
|
||||
el_key_add(el, strC, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
|
||||
el_key_add(el, strD, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
|
||||
el_key_add(el, strH, &arrow[A_K_HO].fun, arrow[A_K_HO].type);
|
||||
el_key_add(el, strF, &arrow[A_K_EN].fun, arrow[A_K_EN].type);
|
||||
el_key_add(el, stOA, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
|
||||
el_key_add(el, stOB, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
|
||||
el_key_add(el, stOC, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
|
||||
el_key_add(el, stOD, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
|
||||
el_key_add(el, stOH, &arrow[A_K_HO].fun, arrow[A_K_HO].type);
|
||||
el_key_add(el, stOF, &arrow[A_K_EN].fun, arrow[A_K_EN].type);
|
||||
|
||||
if (el->el_map.type == MAP_VI) {
|
||||
key_add(el, &strA[1], &arrow[A_K_UP].fun, arrow[A_K_UP].type);
|
||||
key_add(el, &strB[1], &arrow[A_K_DN].fun, arrow[A_K_DN].type);
|
||||
key_add(el, &strC[1], &arrow[A_K_RT].fun, arrow[A_K_RT].type);
|
||||
key_add(el, &strD[1], &arrow[A_K_LT].fun, arrow[A_K_LT].type);
|
||||
key_add(el, &strH[1], &arrow[A_K_HO].fun, arrow[A_K_HO].type);
|
||||
key_add(el, &strF[1], &arrow[A_K_EN].fun, arrow[A_K_EN].type);
|
||||
key_add(el, &stOA[1], &arrow[A_K_UP].fun, arrow[A_K_UP].type);
|
||||
key_add(el, &stOB[1], &arrow[A_K_DN].fun, arrow[A_K_DN].type);
|
||||
key_add(el, &stOC[1], &arrow[A_K_RT].fun, arrow[A_K_RT].type);
|
||||
key_add(el, &stOD[1], &arrow[A_K_LT].fun, arrow[A_K_LT].type);
|
||||
key_add(el, &stOH[1], &arrow[A_K_HO].fun, arrow[A_K_HO].type);
|
||||
key_add(el, &stOF[1], &arrow[A_K_EN].fun, arrow[A_K_EN].type);
|
||||
el_key_add(el, &strA[1], &arrow[A_K_UP].fun, arrow[A_K_UP].type);
|
||||
el_key_add(el, &strB[1], &arrow[A_K_DN].fun, arrow[A_K_DN].type);
|
||||
el_key_add(el, &strC[1], &arrow[A_K_RT].fun, arrow[A_K_RT].type);
|
||||
el_key_add(el, &strD[1], &arrow[A_K_LT].fun, arrow[A_K_LT].type);
|
||||
el_key_add(el, &strH[1], &arrow[A_K_HO].fun, arrow[A_K_HO].type);
|
||||
el_key_add(el, &strF[1], &arrow[A_K_EN].fun, arrow[A_K_EN].type);
|
||||
el_key_add(el, &stOA[1], &arrow[A_K_UP].fun, arrow[A_K_UP].type);
|
||||
el_key_add(el, &stOB[1], &arrow[A_K_DN].fun, arrow[A_K_DN].type);
|
||||
el_key_add(el, &stOC[1], &arrow[A_K_RT].fun, arrow[A_K_RT].type);
|
||||
el_key_add(el, &stOD[1], &arrow[A_K_LT].fun, arrow[A_K_LT].type);
|
||||
el_key_add(el, &stOH[1], &arrow[A_K_HO].fun, arrow[A_K_HO].type);
|
||||
el_key_add(el, &stOF[1], &arrow[A_K_EN].fun, arrow[A_K_EN].type);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1158,7 +1154,7 @@ term_print_arrow(EditLine *el, const char *name)
|
||||
for (i = 0; i < A_K_NKEYS; i++)
|
||||
if (*name == '\0' || strcmp(name, arrow[i].name) == 0)
|
||||
if (arrow[i].type != XK_NOD)
|
||||
key_kprint(el, arrow[i].name, &arrow[i].fun,
|
||||
el_key_kprint(el, arrow[i].name, &arrow[i].fun,
|
||||
arrow[i].type);
|
||||
}
|
||||
|
||||
@ -1199,20 +1195,20 @@ term_bind_arrow(EditLine *el)
|
||||
* unassigned key.
|
||||
*/
|
||||
if (arrow[i].type == XK_NOD)
|
||||
key_clear(el, map, p);
|
||||
el_key_clear(el, map, p);
|
||||
else {
|
||||
if (p[1] && (dmap[j] == map[j] ||
|
||||
map[j] == ED_SEQUENCE_LEAD_IN)) {
|
||||
key_add(el, p, &arrow[i].fun,
|
||||
el_key_add(el, p, &arrow[i].fun,
|
||||
arrow[i].type);
|
||||
map[j] = ED_SEQUENCE_LEAD_IN;
|
||||
} else if (map[j] == ED_UNASSIGNED) {
|
||||
key_clear(el, map, p);
|
||||
el_key_clear(el, map, p);
|
||||
if (arrow[i].type == XK_CMD)
|
||||
map[j] = arrow[i].fun.cmd;
|
||||
else
|
||||
key_add(el, p, &arrow[i].fun,
|
||||
arrow[i].type);
|
||||
el_key_add(el, p, &arrow[i].fun,
|
||||
arrow[i].type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1245,6 +1241,8 @@ term__flush(void)
|
||||
/* term_telltc():
|
||||
* Print the current termcap characteristics
|
||||
*/
|
||||
char *el_key__decode_str(const char *, char *, const char *);
|
||||
|
||||
protected int
|
||||
/*ARGSUSED*/
|
||||
term_telltc(EditLine *el, int argc __attribute__((unused)),
|
||||
@ -1272,7 +1270,7 @@ term_telltc(EditLine *el, int argc __attribute__((unused)),
|
||||
(void) fprintf(el->el_outfile, "\t%25s (%s) == %s\n",
|
||||
t->long_name,
|
||||
t->name, *ts && **ts ?
|
||||
key__decode_str(*ts, upbuf, "") : "(empty)");
|
||||
el_key__decode_str(*ts, upbuf, "") : "(empty)");
|
||||
(void) fputc('\n', el->el_outfile);
|
||||
return (0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user