TTY: new function: tty_display_8bit().
tty_display_8bit() is used instead of NCurses meta() and S-Lang SLsmg_Display_Eight_Bit.
Этот коммит содержится в:
родитель
4e40f6e98f
Коммит
5ac4a4ec1a
13
src/boxes.c
13
src/boxes.c
@ -548,10 +548,10 @@ display_bits_box (void)
|
||||
|
||||
eight_bit_clean = new_mode < 3;
|
||||
full_eight_bits = new_mode < 2;
|
||||
#ifndef HAVE_SLANG
|
||||
meta (stdscr, eight_bit_clean);
|
||||
#ifdef HAVE_SLANG
|
||||
tty_display_8bit (full_eight_bits != 0);
|
||||
#else
|
||||
SLsmg_Display_Eight_Bit = full_eight_bits ? 128 : 160;
|
||||
tty_display_8bit (eight_bit_clean != 0);
|
||||
#endif
|
||||
use_8th_bit_as_meta = !new_meta;
|
||||
}
|
||||
@ -649,11 +649,10 @@ display_bits_box (void)
|
||||
init_translation_table (source_codepage, display_codepage);
|
||||
if (errmsg)
|
||||
message (D_ERROR, MSG_ERROR, "%s", errmsg);
|
||||
#ifndef HAVE_SLANG
|
||||
meta (stdscr, display_codepage != 0);
|
||||
#ifdef HAVE_SLANG
|
||||
tty_display_8bit (display_codepage != 0 && display_codepage != 1);
|
||||
#else
|
||||
SLsmg_Display_Eight_Bit = (display_codepage != 0
|
||||
&& display_codepage != 1) ? 128 : 160;
|
||||
tty_display_8bit (display_codepage != 0);
|
||||
#endif
|
||||
use_8th_bit_as_meta = !(inpcheck->state & C_BOOL);
|
||||
}
|
||||
|
@ -1373,10 +1373,10 @@ setup_pre (void)
|
||||
#define eight_bit_clean (1)
|
||||
#endif /* !HAVE_CHARSET */
|
||||
|
||||
#ifndef HAVE_SLANG
|
||||
meta (stdscr, eight_bit_clean);
|
||||
#ifdef HAVE_SLANG
|
||||
tty_display_8bit (full_eight_bits != 0);
|
||||
#else
|
||||
SLsmg_Display_Eight_Bit = full_eight_bits ? 128 : 160;
|
||||
tty_display_8bit (eight_bit_clean != 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -232,6 +232,12 @@ tty_set_alt_charset (gboolean alt_charset)
|
||||
(void) alt_charset;
|
||||
}
|
||||
|
||||
void
|
||||
tty_display_8bit (gboolean what)
|
||||
{
|
||||
meta (stdscr, (int) what);
|
||||
}
|
||||
|
||||
void
|
||||
tty_print_char (int c)
|
||||
{
|
||||
|
@ -473,6 +473,12 @@ tty_set_alt_charset (gboolean alt_charset)
|
||||
SLsmg_set_char_set ((int) alt_charset);
|
||||
}
|
||||
|
||||
void
|
||||
tty_display_8bit (gboolean what)
|
||||
{
|
||||
SLsmg_Display_Eight_Bit = what ? 128 : 160;
|
||||
}
|
||||
|
||||
void
|
||||
tty_print_char (int c)
|
||||
{
|
||||
|
@ -57,6 +57,7 @@ extern void tty_getyx(int *py, int *px);
|
||||
|
||||
extern void tty_set_alt_charset (gboolean alt_charset);
|
||||
|
||||
extern void tty_display_8bit (gboolean what);
|
||||
extern void tty_print_char(int c);
|
||||
extern void tty_print_alt_char(int c);
|
||||
extern void tty_print_string(const char *s);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user