mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
UTF-8, set_screen_driver_opt: Duplicate CONFIG_UTF8 code.
This commit is contained in:
parent
5261cd17d1
commit
b2d35c73ec
@ -260,26 +260,26 @@ set_screen_driver_opt(struct screen_driver *driver, struct option *term_spec)
|
|||||||
driver->opt.underline = NULL;
|
driver->opt.underline = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_UTF8
|
|
||||||
if (driver->type == TERM_LINUX) {
|
|
||||||
if (get_opt_bool_tree(term_spec, "restrict_852"))
|
|
||||||
driver->opt.frame = frame_restrict;
|
|
||||||
|
|
||||||
if (get_opt_bool_tree(term_spec, "m11_hack"))
|
|
||||||
driver->opt.frame_seqs = m11_hack_frame_seqs;
|
|
||||||
|
|
||||||
if (driver->opt.utf8)
|
|
||||||
driver->opt.frame_seqs = utf8_linux_frame_seqs;
|
|
||||||
|
|
||||||
} else if (driver->type == TERM_FREEBSD) {
|
|
||||||
if (get_opt_bool_tree(term_spec, "m11_hack"))
|
|
||||||
driver->opt.frame_seqs = m11_hack_frame_seqs;
|
|
||||||
|
|
||||||
} else if (driver->type == TERM_VT100) {
|
|
||||||
driver->opt.frame = frame_vt100;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (utf8_io) {
|
if (utf8_io) {
|
||||||
|
#ifdef CONFIG_UTF8
|
||||||
|
if (driver->type == TERM_LINUX) {
|
||||||
|
if (get_opt_bool_tree(term_spec, "restrict_852"))
|
||||||
|
driver->opt.frame = frame_restrict;
|
||||||
|
|
||||||
|
if (get_opt_bool_tree(term_spec, "m11_hack"))
|
||||||
|
driver->opt.frame_seqs = m11_hack_frame_seqs;
|
||||||
|
|
||||||
|
if (driver->opt.utf8)
|
||||||
|
driver->opt.frame_seqs = utf8_linux_frame_seqs;
|
||||||
|
|
||||||
|
} else if (driver->type == TERM_FREEBSD) {
|
||||||
|
if (get_opt_bool_tree(term_spec, "m11_hack"))
|
||||||
|
driver->opt.frame_seqs = m11_hack_frame_seqs;
|
||||||
|
|
||||||
|
} else if (driver->type == TERM_VT100) {
|
||||||
|
driver->opt.frame = frame_vt100;
|
||||||
|
}
|
||||||
|
#else /* !CONFIG_UTF8 */
|
||||||
driver->opt.charsets[0] = cp;
|
driver->opt.charsets[0] = cp;
|
||||||
if (driver->type == TERM_LINUX) {
|
if (driver->type == TERM_LINUX) {
|
||||||
if (get_opt_bool_tree(term_spec, "restrict_852"))
|
if (get_opt_bool_tree(term_spec, "restrict_852"))
|
||||||
@ -300,8 +300,27 @@ set_screen_driver_opt(struct screen_driver *driver, struct option *term_spec)
|
|||||||
} else {
|
} else {
|
||||||
driver->opt.charsets[1] = driver->opt.charsets[0];
|
driver->opt.charsets[1] = driver->opt.charsets[0];
|
||||||
}
|
}
|
||||||
|
#endif /* !CONFIG_UTF8 */
|
||||||
|
} else { /* !utf8_io */
|
||||||
|
#ifdef CONFIG_UTF8
|
||||||
|
if (driver->type == TERM_LINUX) {
|
||||||
|
if (get_opt_bool_tree(term_spec, "restrict_852"))
|
||||||
|
driver->opt.frame = frame_restrict;
|
||||||
|
|
||||||
} else {
|
if (get_opt_bool_tree(term_spec, "m11_hack"))
|
||||||
|
driver->opt.frame_seqs = m11_hack_frame_seqs;
|
||||||
|
|
||||||
|
if (driver->opt.utf8)
|
||||||
|
driver->opt.frame_seqs = utf8_linux_frame_seqs;
|
||||||
|
|
||||||
|
} else if (driver->type == TERM_FREEBSD) {
|
||||||
|
if (get_opt_bool_tree(term_spec, "m11_hack"))
|
||||||
|
driver->opt.frame_seqs = m11_hack_frame_seqs;
|
||||||
|
|
||||||
|
} else if (driver->type == TERM_VT100) {
|
||||||
|
driver->opt.frame = frame_vt100;
|
||||||
|
}
|
||||||
|
#else /* !CONFIG_UTF8 */
|
||||||
driver->opt.charsets[0] = -1;
|
driver->opt.charsets[0] = -1;
|
||||||
if (driver->type == TERM_LINUX) {
|
if (driver->type == TERM_LINUX) {
|
||||||
if (get_opt_bool_tree(term_spec, "restrict_852"))
|
if (get_opt_bool_tree(term_spec, "restrict_852"))
|
||||||
@ -316,8 +335,8 @@ set_screen_driver_opt(struct screen_driver *driver, struct option *term_spec)
|
|||||||
} else if (driver->type == TERM_VT100) {
|
} else if (driver->type == TERM_VT100) {
|
||||||
driver->opt.frame = frame_vt100;
|
driver->opt.frame = frame_vt100;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif /* CONFIG_UTF8 */
|
#endif /* CONFIG_UTF8 */
|
||||||
|
} /* !utf8_io */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user