Commit: 7de46e707e4d0938b0ccfd0a0011f8e07d763f2c
Parent: 3ef71608c67f17bde8fd4101a14b1b52a15c9ab8
Author: 0x766F6964
Date: Fri, 1 Nov 2019 23:02:26 -0600
force charset to always be 0 (UTF-8)
this was the case anyways assuming a sane system
Diffstat:
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/default.c b/default.c
@@ -636,7 +636,6 @@ static unsigned char *term_rd(struct option *o, unsigned char *c)
{
struct term_spec *ts;
unsigned char *w;
- int i;
if (!(w = get_token(&c))) goto err;
ts = new_term_spec(w);
free(w);
@@ -655,11 +654,7 @@ static unsigned char *term_rd(struct option *o, unsigned char *c)
ts->block_cursor = !!((w[0] - '0') & 4);
free(w);
if (!(w = get_token(&c))) goto err;
- if (!casestrcmp(w, cast_uchar "default"))
- i = -1;
- else
- i = 0;
- ts->character_set = i;
+ ts->character_set = 0;
free(w);
ts->left_margin = 0;
ts->right_margin = 0;
@@ -676,7 +671,6 @@ static unsigned char *term2_rd(struct option *o, unsigned char *c)
{
struct term_spec *ts;
unsigned char *w;
- int i;
if (!(w = get_token(&c))) goto err;
ts = new_term_spec(w);
free(w);
@@ -697,11 +691,7 @@ static unsigned char *term2_rd(struct option *o, unsigned char *c)
ts->col = w[0] - '0';
free(w);
if (!(w = get_token(&c))) goto err;
- if (!casestrcmp(w, cast_uchar "default"))
- i = -1;
- else
- i = 0;
- ts->character_set = i;
+ ts->character_set = 0;
free(w);
return NULL;
err_f:
@@ -724,8 +714,7 @@ static void term_wr(struct option *o, unsigned char **s, int *l)
add_chr_to_str(s, l, ' ');
add_num_to_str(s, l, !!ts->col + !!ts->restrict_852 * 2 + !!ts->block_cursor * 4);
add_chr_to_str(s, l, ' ');
- if (ts->character_set == -1) add_to_str(s, l, cast_uchar "default");
- else add_to_str(s, l, get_cp_mime_name(ts->character_set));
+ add_to_str(s, l, get_cp_mime_name(ts->character_set));
if (ts->left_margin || ts->right_margin || ts->top_margin || ts->bottom_margin) {
add_chr_to_str(s, l, ' ');
add_num_to_str(s, l, ts->left_margin);
diff --git a/terminal.c b/terminal.c
@@ -542,7 +542,6 @@ struct terminal *init_gfx_term(void (*root_window)(struct window *, struct links
term->spec = &gfx_term;
safe_strncpy(term->cwd, cwd, MAX_CWD_LEN);
gfx_term.character_set = 0;
- if (gfx_term.character_set == -1) gfx_term.character_set = 0;
init_list(term->windows);
term->handle_to_close = -1;
win = mem_calloc(sizeof (struct window));