From 1b728dcac823193d96a490b7f7ee1acfa782da7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 22 Feb 2020 10:50:05 +0100 Subject: [PATCH] sixel: rename state SIXEL_SIXEL -> SIXEL_GROUND --- sixel.c | 12 ++++++------ terminal.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sixel.c b/sixel.c index cfef67f3..29be361b 100644 --- a/sixel.c +++ b/sixel.c @@ -19,7 +19,7 @@ sixel_init(struct terminal *term) assert(term->sixel.palette == NULL); assert(term->sixel.image.data == NULL); - term->sixel.state = SIXEL_SIXEL; + term->sixel.state = SIXEL_GROUND; term->sixel.row = 0; term->sixel.col = 0; term->sixel.color_idx = 0; @@ -234,7 +234,7 @@ sixel_repeat(struct terminal *term, uint8_t c) } else { //LOG_DBG("repeating '%c' %u times", c, term->sixel.param); - term->sixel.state = SIXEL_SIXEL; + term->sixel.state = SIXEL_GROUND; for (unsigned i = 0; i < term->sixel.param; i++) sixel_sixel(term, c); } @@ -268,7 +268,7 @@ sixel_raster(struct terminal *term, uint8_t c) switch (c) { case '#': term->sixel.state = SIXEL_COLOR; break; case ';': term->sixel.state = SIXEL_RASTER; break; - default: term->sixel.state = SIXEL_SIXEL; sixel_sixel(term, c); break; + default: term->sixel.state = SIXEL_GROUND; sixel_sixel(term, c); break; } } } @@ -291,7 +291,7 @@ sixel_color(struct terminal *term, uint8_t c) switch (c) { case '#': term->sixel.state = SIXEL_COLOR; break; case ';': term->sixel.state = SIXEL_COLOR_SPEC; break; - default: term->sixel.state = SIXEL_SIXEL; sixel_sixel(term, c); break; + default: term->sixel.state = SIXEL_GROUND; sixel_sixel(term, c); break; } } } @@ -331,7 +331,7 @@ sixel_color_spec(struct terminal *term, uint8_t c) switch (c) { case '#': term->sixel.state = SIXEL_COLOR; break; case ';': term->sixel.state = SIXEL_COLOR_SPEC; break; - default: term->sixel.state = SIXEL_SIXEL; sixel_sixel(term, c); break; + default: term->sixel.state = SIXEL_GROUND; sixel_sixel(term, c); break; } } } @@ -347,7 +347,7 @@ sixel_put(struct terminal *term, uint8_t c) } switch (term->sixel.state) { - case SIXEL_SIXEL: sixel_sixel(term, c); break; + case SIXEL_GROUND: sixel_sixel(term, c); break; case SIXEL_REPEAT: sixel_repeat(term, c); break; case SIXEL_RASTER: sixel_raster(term, c); break; case SIXEL_COLOR: sixel_color(term, c); break; diff --git a/terminal.h b/terminal.h index 593e0a9f..c160c902 100644 --- a/terminal.h +++ b/terminal.h @@ -355,7 +355,7 @@ struct terminal { } delayed_render_timer; struct { - enum { SIXEL_SIXEL, SIXEL_REPEAT, SIXEL_RASTER, SIXEL_COLOR, SIXEL_COLOR_SPEC} state; + enum { SIXEL_GROUND, SIXEL_REPEAT, SIXEL_RASTER, SIXEL_COLOR, SIXEL_COLOR_SPEC} state; int row; int col; int color_idx;