Added support for using terminfo/termcap instead of curses. By default,

configure chooses to use ncurses if found, of terminfo if only curses was
found. --with-terminfo parameter can be used to specify if you want it or
not.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1924 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-28 11:30:26 +00:00 committed by cras
commit 2ba339a26b
30 changed files with 2662 additions and 268 deletions

View file

@ -29,7 +29,7 @@
#include "keyboard.h"
#include "translation.h"
#include "screen.h"
#include "term.h"
#include "gui-entry.h"
#include "gui-windows.h"
@ -330,7 +330,7 @@ void readline(void)
int key;
for (;;) {
key = screen_getch();
key = term_getch();
if (key == -1)
break;
@ -485,6 +485,11 @@ static void key_insert_text(const char *data)
g_free(str);
}
static void key_sig_stop(void)
{
term_stop();
}
static void sig_window_auto_changed(void)
{
command_history_next(active_win, gui_entry_get_text(active_entry));
@ -615,9 +620,11 @@ void gui_readline_init(void)
/* inserting special input characters to line.. */
key_bind("insert_text", "Append text to line", NULL, NULL, (SIGNAL_FUNC) key_insert_text);
/* autoreplaces */
key_bind("multi", NULL, "return", "check_replaces;send_line", NULL);
key_bind("multi", NULL, "space", "check_replaces;insert_text ", NULL);
/* moving between windows */
for (n = 0; changekeys[n] != '\0'; n++) {
key = g_strdup_printf("meta-%c", changekeys[n]);
ltoa(data, n+1);
@ -625,6 +632,9 @@ void gui_readline_init(void)
g_free(key);
}
/* misc */
key_bind("stop_irc", "Send SIGSTOP to client", "^Z", NULL, (SIGNAL_FUNC) key_sig_stop);
key_configure_thaw();
signal_add("window changed automatic", (SIGNAL_FUNC) sig_window_auto_changed);
@ -681,6 +691,7 @@ void gui_readline_deinit(void)
key_unbind("insert_text", (SIGNAL_FUNC) key_insert_text);
key_unbind("change_window", (SIGNAL_FUNC) key_change_window);
key_unbind("stop_irc", (SIGNAL_FUNC) key_sig_stop);
keyboard_destroy(keyboard);
key_configure_thaw();