mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
upgrade to libedit-2.6.7
(fixed Bug #4462 libedit compile failure) BitKeeper/etc/ignore: change config.h -> config.h to commit cmd-line-utils/libedit/config.h cmd-line-utils/libedit/Makefile.am: upgrade to libedit-2.6.7 cmd-line-utils/libedit/chared.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/chared.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/common.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/el.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/el.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/emacs.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/hist.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/hist.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/histedit.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/history.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/key.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/key.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/makelist.sh: upgrade to libedit-2.6.7 cmd-line-utils/libedit/map.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/map.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/parse.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/prompt.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/read.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/readline.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/readline/readline.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/refresh.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/search.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/search.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/sig.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/sig.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/sys.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/term.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/tokenizer.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/tokenizer.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/tty.c: upgrade to libedit-2.6.7 cmd-line-utils/libedit/tty.h: upgrade to libedit-2.6.7 cmd-line-utils/libedit/vi.c: upgrade to libedit-2.6.7 configure.in: change liblibedit.a to correct libedit.a
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: term.c,v 1.32 2001/01/23 15:55:31 jdolecek Exp $ */
|
||||
/* $NetBSD: term.c,v 1.35 2002/03/18 16:00:59 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -36,31 +36,44 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "compat.h"
|
||||
#include "config.h"
|
||||
#if !defined(lint) && !defined(SCCSID)
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: term.c,v 1.35 2002/03/18 16:00:59 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint && not SCCSID */
|
||||
|
||||
/*
|
||||
* term.c: Editor/termcap-curses interface
|
||||
* We have to declare a static variable here, since the
|
||||
* termcap putchar routine does not take an argument!
|
||||
*/
|
||||
|
||||
#include "sys.h"
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#if defined(HAVE_TERMCAP_H)
|
||||
#ifdef HAVE_TERMCAP_H
|
||||
#include <termcap.h>
|
||||
#elif defined(HAVE_CURSES_H) && defined(HAVE_TERM_H) /* For HPUX11 */
|
||||
#endif
|
||||
#ifdef HAVE_CURSES_H
|
||||
#include <curses.h>
|
||||
#endif
|
||||
#ifdef HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#endif
|
||||
|
||||
#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>
|
||||
|
||||
#include "el.h"
|
||||
|
||||
/*
|
||||
* IMPORTANT NOTE: these routines are allowed to look at the current screen
|
||||
* and the current possition assuming that it is correct. If this is not
|
||||
@ -340,8 +353,7 @@ term_init(EditLine *el)
|
||||
return (-1);
|
||||
(void) memset(el->el_term.t_val, 0, T_val * sizeof(int));
|
||||
term_outfile = el->el_outfile;
|
||||
if (term_set(el, NULL) == -1)
|
||||
return (-1);
|
||||
(void) term_set(el, NULL);
|
||||
term_init_arrow(el);
|
||||
return (0);
|
||||
}
|
||||
@ -637,7 +649,7 @@ mc_again:
|
||||
* from col 0
|
||||
*/
|
||||
if (EL_CAN_TAB ?
|
||||
((unsigned int)-del > (((unsigned int) where >> 3) +
|
||||
(((unsigned int)-del) > (((unsigned int) where >> 3) +
|
||||
(where & 07)))
|
||||
: (-del > where)) {
|
||||
term__putc('\r'); /* do a CR */
|
||||
@ -897,7 +909,7 @@ term_set(EditLine *el, const char *term)
|
||||
|
||||
memset(el->el_term.t_cap, 0, TC_BUFSIZE);
|
||||
|
||||
i = tgetent(el->el_term.t_cap, (char*) term);
|
||||
i = tgetent(el->el_term.t_cap, term);
|
||||
|
||||
if (i <= 0) {
|
||||
if (i == -1)
|
||||
@ -927,7 +939,7 @@ term_set(EditLine *el, const char *term)
|
||||
Val(T_co) = tgetnum("co");
|
||||
Val(T_li) = tgetnum("li");
|
||||
for (t = tstr; t->name != NULL; t++)
|
||||
term_alloc(el, t, tgetstr((char*) t->name, &area));
|
||||
term_alloc(el, t, tgetstr(t->name, &area));
|
||||
}
|
||||
|
||||
if (Val(T_co) < 2)
|
||||
@ -1067,8 +1079,6 @@ term_reset_arrow(EditLine *el)
|
||||
static const char stOH[] = {033, 'O', 'H', '\0'};
|
||||
static const char stOF[] = {033, 'O', 'F', '\0'};
|
||||
|
||||
term_init_arrow(el); /* Init arrow struct */
|
||||
|
||||
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);
|
||||
@ -1237,8 +1247,7 @@ term__flush(void)
|
||||
*/
|
||||
protected int
|
||||
/*ARGSUSED*/
|
||||
term_telltc(EditLine *el, int
|
||||
argc __attribute__((unused)),
|
||||
term_telltc(EditLine *el, int argc __attribute__((unused)),
|
||||
const char **argv __attribute__((unused)))
|
||||
{
|
||||
const struct termcapstr *t;
|
||||
@ -1274,7 +1283,8 @@ term_telltc(EditLine *el, int
|
||||
*/
|
||||
protected int
|
||||
/*ARGSUSED*/
|
||||
term_settc(EditLine *el, int argc __attribute__((unused)), const char **argv)
|
||||
term_settc(EditLine *el, int argc __attribute__((unused)),
|
||||
const char **argv __attribute__((unused)))
|
||||
{
|
||||
const struct termcapstr *ts;
|
||||
const struct termcapval *tv;
|
||||
@ -1350,7 +1360,9 @@ term_settc(EditLine *el, int argc __attribute__((unused)), const char **argv)
|
||||
*/
|
||||
protected int
|
||||
/*ARGSUSED*/
|
||||
term_echotc(EditLine *el, int argc __attribute__((unused)), const char **argv)
|
||||
term_echotc(EditLine *el __attribute__((unused)),
|
||||
int argc __attribute__((unused)),
|
||||
const char **argv __attribute__((unused)))
|
||||
{
|
||||
char *cap, *scap, *ep;
|
||||
int arg_need, arg_cols, arg_rows;
|
||||
@ -1429,7 +1441,7 @@ term_echotc(EditLine *el, int argc __attribute__((unused)), const char **argv)
|
||||
break;
|
||||
}
|
||||
if (t->name == NULL)
|
||||
scap = tgetstr((char*) *argv, &area);
|
||||
scap = tgetstr(*argv, &area);
|
||||
if (!scap || scap[0] == '\0') {
|
||||
if (!silent)
|
||||
(void) fprintf(el->el_errfile,
|
||||
|
Reference in New Issue
Block a user