From 3d853ee5c99c7c2d01cdc0919790ee4d33dba5af Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 3 Jan 2018 21:06:41 +0100 Subject: [PATCH] yaft: disable unused dcs functions --- src/gui/widget/yaft/ctrlseq/dcs.h | 1 + src/gui/widget/yaft/fb/common.h | 4 ++++ src/gui/widget/yaft/terminal.h | 4 ++++ src/gui/widget/yaft/yaft.h | 2 ++ 4 files changed, 11 insertions(+) diff --git a/src/gui/widget/yaft/ctrlseq/dcs.h b/src/gui/widget/yaft/ctrlseq/dcs.h index a332d75ec..72b98a8a5 100644 --- a/src/gui/widget/yaft/ctrlseq/dcs.h +++ b/src/gui/widget/yaft/ctrlseq/dcs.h @@ -1,5 +1,6 @@ /* See LICENSE for licence details. */ /* function for dcs sequence */ +#error must no longer be included enum { RGBMAX = 255, HUEMAX = 360, diff --git a/src/gui/widget/yaft/fb/common.h b/src/gui/widget/yaft/fb/common.h index 1b5585302..4cd783e18 100644 --- a/src/gui/widget/yaft/fb/common.h +++ b/src/gui/widget/yaft/fb/common.h @@ -413,6 +413,7 @@ void fb_die(struct framebuffer_t *fb) #endif } +#if 0 static inline void draw_sixel(struct framebuffer_t *fb, int line, int col, uint8_t *pixmap) { int h, w, src_offset, dst_offset; @@ -430,6 +431,7 @@ static inline void draw_sixel(struct framebuffer_t *fb, int line, int col, uint8 } } } +#endif static inline void draw_line(struct framebuffer_t *fb, struct terminal_t *term, int line) { @@ -445,11 +447,13 @@ static inline void draw_line(struct framebuffer_t *fb, struct terminal_t *term, /* target cell */ cellp = &term->cells[line][col]; +#if 0 /* draw sixel pixmap */ if (cellp->has_pixmap) { draw_sixel(fb, line, col, cellp->pixmap); continue; } +#endif /* copy current color_pair (maybe changed) */ color_pair = cellp->color_pair; diff --git a/src/gui/widget/yaft/terminal.h b/src/gui/widget/yaft/terminal.h index 45aa3d752..22ee2d214 100644 --- a/src/gui/widget/yaft/terminal.h +++ b/src/gui/widget/yaft/terminal.h @@ -8,7 +8,9 @@ void erase_cell(struct terminal_t *term, int y, int x) cellp->color_pair = term->color_pair; /* bce */ cellp->attribute = ATTR_RESET; cellp->width = HALF; +#if 0 cellp->has_pixmap = false; +#endif term->line_dirty[y] = true; } @@ -54,7 +56,9 @@ int set_cell(struct terminal_t *term, int y, int x, const struct glyph_t *glyphp cell.attribute = term->attribute; cell.width = (glyph_width)glyphp->width; +#if 0 cell.has_pixmap = false; +#endif cellp = &term->cells[y][x]; *cellp = cell; diff --git a/src/gui/widget/yaft/yaft.h b/src/gui/widget/yaft/yaft.h index 6b59cac60..135926eea 100644 --- a/src/gui/widget/yaft/yaft.h +++ b/src/gui/widget/yaft/yaft.h @@ -114,10 +114,12 @@ struct cell_t { struct color_pair_t color_pair; /* color (fg, bg) */ /*enum char_attr*/ int attribute; /* bold, underscore, etc... */ enum glyph_width width; /* wide char flag: WIDE, NEXT_TO_WIDE, HALF */ +#if 0 bool has_pixmap; /* has sixel pixmap data or not */ /* sixel pixmap data: must be statically allocated for copy_cell() */ uint8_t pixmap[BYTES_PER_PIXEL * CELL_WIDTH * CELL_HEIGHT]; +#endif }; struct esc_t {