1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-11 05:29:28 -04:00

Merge with git+ssh://pasky.or.cz/srv/git/elinks.git

This commit is contained in:
Laurent MONIN 2006-10-12 09:32:44 +02:00 committed by Laurent MONIN
commit 49c5299f89

View File

@ -40,6 +40,7 @@ INIT_LIST_HEAD(terminals);
static void check_if_no_terminal(void);
#if 0
static int
was_utf8(int in, int out)
{
@ -59,6 +60,7 @@ was_utf8(int in, int out)
}
return 1;
}
#endif
void
redraw_terminal(struct terminal *term)
@ -115,10 +117,12 @@ init_term(int fdin, int fdout)
term->spec = get_opt_rec(config_options, name);
object_lock(term->spec);
#if 0
/* The hack to restore console in the right mode */
if (get_opt_int_tree(term->spec, "type") == TERM_LINUX) {
term->linux_was_utf8 = was_utf8(get_input_handle(), term->fdout);
}
#endif
add_to_list(terminals, term);
@ -167,6 +171,8 @@ destroy_terminal(struct terminal *term)
del_from_list(term);
close(term->fdin);
#if 0
/* This code doesn't work with slave terminals. */
if (get_opt_int_tree(term->spec, "type") == TERM_LINUX) {
if (term->linux_was_utf8) {
hard_write(term->fdout, "\033%G", 3);
@ -174,6 +180,7 @@ destroy_terminal(struct terminal *term)
hard_write(term->fdout, "\033%@", 3);
}
}
#endif
if (term->fdout != 1) {
if (term->fdout != term->fdin) close(term->fdout);