mirror of
https://github.com/rkd77/elinks.git
synced 2024-08-25 21:44:47 -04:00
Removed the buggy code.
This commit is contained in:
parent
6528b3c574
commit
753e503e26
@ -41,28 +41,6 @@ INIT_LIST_HEAD(terminals);
|
|||||||
|
|
||||||
static void check_if_no_terminal(void);
|
static void check_if_no_terminal(void);
|
||||||
|
|
||||||
#if 0
|
|
||||||
static int
|
|
||||||
was_utf8(int in, int out)
|
|
||||||
{
|
|
||||||
/* Taken from setedit.
|
|
||||||
* Set cursor in the up left corner. Write "\357\200\240" == U+F020.
|
|
||||||
* Read cursor position. For UTF-8 x will be 2.
|
|
||||||
* For normal mode it will be 4. */
|
|
||||||
static unsigned char *str = "\033[1;1H\357\200\240\033[6n";
|
|
||||||
unsigned char buf[20];
|
|
||||||
int x, y;
|
|
||||||
|
|
||||||
hard_write(out, str, strlen(str));
|
|
||||||
buf[0] = '\0';
|
|
||||||
read(in, buf, 6);
|
|
||||||
if (sscanf(buf,"\033[%d;%dR",&y,&x)==2) {
|
|
||||||
if (x > 2) return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
redraw_terminal(struct terminal *term)
|
redraw_terminal(struct terminal *term)
|
||||||
{
|
{
|
||||||
@ -118,13 +96,6 @@ init_term(int fdin, int fdout)
|
|||||||
term->spec = get_opt_rec(config_options, name);
|
term->spec = get_opt_rec(config_options, name);
|
||||||
object_lock(term->spec);
|
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);
|
add_to_list(terminals, term);
|
||||||
|
|
||||||
set_handlers(fdin, (select_handler_T) in_term, NULL,
|
set_handlers(fdin, (select_handler_T) in_term, NULL,
|
||||||
@ -172,17 +143,6 @@ destroy_terminal(struct terminal *term)
|
|||||||
del_from_list(term);
|
del_from_list(term);
|
||||||
close(term->fdin);
|
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);
|
|
||||||
} else {
|
|
||||||
hard_write(term->fdout, "\033%@", 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (term->fdout != 1) {
|
if (term->fdout != 1) {
|
||||||
if (term->fdout != term->fdin) close(term->fdout);
|
if (term->fdout != term->fdin) close(term->fdout);
|
||||||
} else {
|
} else {
|
||||||
|
@ -132,9 +132,6 @@ struct terminal {
|
|||||||
unsigned int utf8:1;
|
unsigned int utf8:1;
|
||||||
#endif /* CONFIG_UTF8 */
|
#endif /* CONFIG_UTF8 */
|
||||||
|
|
||||||
/* Indicates whether Linux console was in UTF-8 mode on startup */
|
|
||||||
unsigned int linux_was_utf8:1;
|
|
||||||
|
|
||||||
/* The current tab number. */
|
/* The current tab number. */
|
||||||
int current_tab;
|
int current_tab;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user