version 1.10.2.2, 2012/10/30 18:59:09 |
version 1.11, 2011/11/18 20:25:48 |
Line 62 __RCSID("$NetBSD$"); |
|
Line 62 __RCSID("$NetBSD$"); |
|
#endif |
#endif |
|
|
/* Solaris's term.h does horrid things. */ |
/* Solaris's term.h does horrid things. */ |
#if defined(HAVE_TERM_H) && !defined(__sun) && !defined(HAVE_TERMCAP_H) |
#if defined(HAVE_TERM_H) && !defined(__sun) |
#include <term.h> |
#include <term.h> |
#endif |
#endif |
|
|
Line 169 private const struct termcapstr { |
|
Line 169 private const struct termcapstr { |
|
{ "kh", "send cursor home" }, |
{ "kh", "send cursor home" }, |
#define T_at7 37 |
#define T_at7 37 |
{ "@7", "send cursor end" }, |
{ "@7", "send cursor end" }, |
#define T_kD 38 |
#define T_str 38 |
{ "kD", "send cursor delete" }, |
|
#define T_str 39 |
|
{ NULL, NULL } |
{ NULL, NULL } |
}; |
}; |
|
|
Line 332 terminal_alloc(EditLine *el, const struc |
|
Line 330 terminal_alloc(EditLine *el, const struc |
|
char **tlist = el->el_terminal.t_str; |
char **tlist = el->el_terminal.t_str; |
char **tmp, **str = &tlist[t - tstr]; |
char **tmp, **str = &tlist[t - tstr]; |
|
|
(void) memset(termbuf, 0, sizeof(termbuf)); |
|
if (cap == NULL || *cap == '\0') { |
if (cap == NULL || *cap == '\0') { |
*str = NULL; |
*str = NULL; |
return; |
return; |
Line 880 terminal_set(EditLine *el, const char *t |
|
Line 877 terminal_set(EditLine *el, const char *t |
|
if (strcmp(term, "emacs") == 0) |
if (strcmp(term, "emacs") == 0) |
el->el_flags |= EDIT_DISABLED; |
el->el_flags |= EDIT_DISABLED; |
|
|
(void) memset(el->el_terminal.t_cap, 0, TC_BUFSIZE); |
memset(el->el_terminal.t_cap, 0, TC_BUFSIZE); |
|
|
i = tgetent(el->el_terminal.t_cap, term); |
i = tgetent(el->el_terminal.t_cap, term); |
|
|
Line 1033 terminal_init_arrow(EditLine *el) |
|
Line 1030 terminal_init_arrow(EditLine *el) |
|
arrow[A_K_EN].key = T_at7; |
arrow[A_K_EN].key = T_at7; |
arrow[A_K_EN].fun.cmd = ED_MOVE_TO_END; |
arrow[A_K_EN].fun.cmd = ED_MOVE_TO_END; |
arrow[A_K_EN].type = XK_CMD; |
arrow[A_K_EN].type = XK_CMD; |
|
|
arrow[A_K_DE].name = STR("delete"); |
|
arrow[A_K_DE].key = T_kD; |
|
arrow[A_K_DE].fun.cmd = ED_DELETE_NEXT_CHAR; |
|
arrow[A_K_DE].type = XK_CMD; |
|
} |
} |
|
|
|
|