Commit: 2802ca0fab603492bdbecc7bba805d4998a67719
Parent: 017cb9bce003d519632563ff39e6d866ab73da02
Author: opask
Date: Thu, 23 Aug 2018 06:49:55 -0600
remove linux, freebsd, and koi8 frame drawing options
Diffstat:
M | links.h | | | 3 | --- |
M | menu.c | | | 51 | ++++++++++++++++++--------------------------------- |
M | terminal.c | | | 39 | +-------------------------------------- |
3 files changed, 19 insertions(+), 74 deletions(-)
diff --git a/links.h b/links.h
@@ -1523,9 +1523,6 @@ struct term_spec {
#define TERM_DUMB 0
#define TERM_VT100 1
-#define TERM_LINUX 2
-#define TERM_KOI8 3
-#define TERM_FREEBSD 4
#define ATTR_FRAME 0x80
diff --git a/menu.c b/menu.c
@@ -558,13 +558,13 @@ static void terminal_options_ok(void *p)
cls_redraw_all_terminals();
}
-static unsigned char * const td_labels[] = { TEXT_(T_NO_FRAMES), TEXT_(T_VT_100_FRAMES), TEXT_(T_LINUX_OR_OS2_FRAMES), TEXT_(T_KOI8R_FRAMES), TEXT_(T_FREEBSD_FRAMES), TEXT_(T_USE_11M), TEXT_(T_RESTRICT_FRAMES_IN_CP850_852), TEXT_(T_BLOCK_CURSOR), TEXT_(T_COLOR), NULL };
+static unsigned char * const td_labels[] = { TEXT_(T_NO_FRAMES), TEXT_(T_VT_100_FRAMES), TEXT_(T_USE_11M), TEXT_(T_RESTRICT_FRAMES_IN_CP850_852), TEXT_(T_BLOCK_CURSOR), TEXT_(T_COLOR), NULL };
static void terminal_options(struct terminal *term, void *xxx, void *ses_)
{
struct dialog *d;
struct term_spec *ts = new_term_spec(term->term);
- d = mem_calloc(sizeof(struct dialog) + 12 * sizeof(struct dialog_item));
+ d = mem_calloc(sizeof(struct dialog) + 8 * sizeof(struct dialog_item));
d->title = TEXT_(T_TERMINAL_OPTIONS);
d->fn = checkbox_list_fn;
d->udata = (void *)td_labels;
@@ -580,45 +580,30 @@ static void terminal_options(struct terminal *term, void *xxx, void *ses_)
d->items[1].dlen = sizeof(int);
d->items[1].data = (void *)&ts->mode;
d->items[2].type = D_CHECKBOX;
- d->items[2].gid = 1;
- d->items[2].gnum = TERM_LINUX;
+ d->items[2].gid = 0;
d->items[2].dlen = sizeof(int);
- d->items[2].data = (void *)&ts->mode;
+ d->items[2].data = (void *)&ts->m11_hack;
d->items[3].type = D_CHECKBOX;
- d->items[3].gid = 1;
- d->items[3].gnum = TERM_KOI8;
+ d->items[3].gid = 0;
d->items[3].dlen = sizeof(int);
- d->items[3].data = (void *)&ts->mode;
+ d->items[3].data = (void *)&ts->restrict_852;
d->items[4].type = D_CHECKBOX;
- d->items[4].gid = 1;
- d->items[4].gnum = TERM_FREEBSD;
+ d->items[4].gid = 0;
d->items[4].dlen = sizeof(int);
- d->items[4].data = (void *)&ts->mode;
+ d->items[4].data = (void *)&ts->block_cursor;
d->items[5].type = D_CHECKBOX;
d->items[5].gid = 0;
d->items[5].dlen = sizeof(int);
- d->items[5].data = (void *)&ts->m11_hack;
- d->items[6].type = D_CHECKBOX;
- d->items[6].gid = 0;
- d->items[6].dlen = sizeof(int);
- d->items[6].data = (void *)&ts->restrict_852;
- d->items[7].type = D_CHECKBOX;
- d->items[7].gid = 0;
- d->items[7].dlen = sizeof(int);
- d->items[7].data = (void *)&ts->block_cursor;
- d->items[8].type = D_CHECKBOX;
- d->items[8].gid = 0;
- d->items[8].dlen = sizeof(int);
- d->items[8].data = (void *)&ts->col;
- d->items[9].type = D_BUTTON;
- d->items[9].gid = B_ENTER;
- d->items[9].fn = ok_dialog;
- d->items[9].text = TEXT_(T_OK);
- d->items[10].type = D_BUTTON;
- d->items[10].gid = B_ESC;
- d->items[10].fn = cancel_dialog;
- d->items[10].text = TEXT_(T_CANCEL);
- d->items[11].type = D_END;
+ d->items[5].data = (void *)&ts->col;
+ d->items[6].type = D_BUTTON;
+ d->items[6].gid = B_ENTER;
+ d->items[6].fn = ok_dialog;
+ d->items[6].text = TEXT_(T_OK);
+ d->items[7].type = D_BUTTON;
+ d->items[7].gid = B_ESC;
+ d->items[7].fn = cancel_dialog;
+ d->items[7].text = TEXT_(T_CANCEL);
+ d->items[8].type = D_END;
do_dialog(term, d, getml(d, NULL));
}
diff --git a/terminal.c b/terminal.c
@@ -891,30 +891,6 @@ static inline int getcompcode(int c)
unsigned char frame_dumb[49] = " ||||++||++++++--|-+||++--|-+----++++++++ ";
static unsigned char frame_vt100[49] = "aaaxuuukkuxkjjjkmvwtqnttmlvwtqnvvwwmmllnnjla ";
-static unsigned char frame_koi[48] = {
- 144,145,146,129,135,178,180,167,
- 166,181,161,168,174,173,172,131,
- 132,137,136,134,128,138,175,176,
- 171,165,187,184,177,160,190,185,
- 186,182,183,170,169,162,164,189,
- 188,133,130,141,140,142,143,139,
-};
-static unsigned char frame_freebsd[48] = {
- 130,138,128,153,150,150,150,140,
- 140,150,153,140,139,139,139,140,
- 142,151,152,149,146,143,149,149,
- 142,141,151,152,149,146,143,151,
- 151,152,152,142,142,141,141,143,
- 143,139,141,128,128,128,128,128,
-};
-static unsigned char frame_restrict[48] = {
- 0, 0, 0, 0, 0,179,186,186,
- 205, 0, 0, 0, 0,186,205, 0,
- 0, 0, 0, 0, 0, 0,179,186,
- 0, 0, 0, 0, 0, 0, 0,205,
- 196,205,196,186,205,205,186,186,
- 179, 0, 0, 0, 0, 0, 0, 0,
-};
#define utf8_hack(x) (x)
@@ -933,24 +909,12 @@ static unsigned char frame_restrict[48] = {
char_t c = term->screen[p].ch; \
unsigned char A = term->screen[p].at & 0x7f; \
unsigned char frm = !!(term->screen[p].at & ATTR_FRAME); \
- if (s->mode == TERM_LINUX) { \
- if (s->m11_hack) { \
- if (frm != mode) { \
- if (!(mode = frm)) add_to_str(&a, &l, cast_uchar "\033[10m");\
- else add_to_str(&a, &l, cast_uchar "\033[11m");\
- } \
- } \
- if (s->restrict_852 && frm && c >= 176 && c < 224) { \
- if (frame_restrict[c - 176]) c = frame_restrict[c - 176];\
- } \
- } else if (s->mode == TERM_VT100) { \
+ if (s->mode == TERM_VT100) { \
if (frm != mode) { \
if (!(mode = frm)) add_to_str(&a, &l, cast_uchar "\017");\
else add_to_str(&a, &l, cast_uchar "\016"); \
} \
if (frm && c >= 176 && c < 224) c = frame_vt100[c - 176];\
- } else if (s->mode == TERM_KOI8 && frm && c >= 176 && c < 224) { c = frame_koi[c - 176];\
- } else if (s->mode == TERM_FREEBSD && frm && c >= 176 && c < 224) { c = frame_freebsd[c - 176];\
} else if (s->mode == TERM_DUMB && frm && c >= 176 && c < 224) c = frame_dumb[c - 176];\
if (!(A & 0100) && (A >> 3) == (A & 7)) A = (A & 070) | 7 * !(A & 020);\
if (A != attrib) { \
@@ -1046,7 +1010,6 @@ static void redraw_screen(struct terminal *term)
if (l) {
if (s->col) add_to_str(&a, &l, cast_uchar "\033[37;40m");
add_to_str(&a, &l, cast_uchar "\033[0m");
- if (s->mode == TERM_LINUX && s->m11_hack) add_to_str(&a, &l, cast_uchar "\033[10m");
if (s->mode == TERM_VT100) add_to_str(&a, &l, cast_uchar "\017");
}
term->lcx = cx;