From 658026e6267277b27d297c481728f74d160a8481 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 17 Jul 2020 10:31:31 -0400 Subject: [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice. Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a --- apps/plugins/text_viewer/tv_text_processor.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'apps/plugins/text_viewer/tv_text_processor.c') diff --git a/apps/plugins/text_viewer/tv_text_processor.c b/apps/plugins/text_viewer/tv_text_processor.c index fa644d7725..db96d61409 100644 --- a/apps/plugins/text_viewer/tv_text_processor.c +++ b/apps/plugins/text_viewer/tv_text_processor.c @@ -33,11 +33,7 @@ enum{ }; /* the max characters of each blocks */ -#ifdef HAVE_LCD_BITMAP #define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH / 2 + 1) -#else -#define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH + 1) -#endif #define TV_MAX_BLOCKS 5 @@ -90,15 +86,11 @@ static int tv_glyph_width(int ch) if (ch == 0) ch = ' '; -#ifdef HAVE_LCD_BITMAP /* the width of the diacritics charcter is 0 */ if (rb->is_diacritic(ch, NULL)) return 0; return rb->font_get_width(rb->font_get(preferences->font_id), ch); -#else - return 1; -#endif } static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) @@ -138,7 +130,6 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) if (preferences->encoding == UTF_8) return (unsigned char*)rb->utf8decode(str, ch); -#ifdef HAVE_LCD_BITMAP if ((*str >= 0x80) && ((preferences->encoding > SJIS) || (preferences->encoding == SJIS && (*str <= 0xa0 || *str >= 0xe0)))) @@ -151,7 +142,7 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) } count = 2; } -#endif + rb->iso_decode(str, utf8_tmp, preferences->encoding, count); rb->utf8decode(utf8_tmp, ch); return (unsigned char *)str + count; -- cgit v1.2.3