From 4a7c6f7241d9b421a771d1820ff3989fd76f2985 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Nov 2018 00:26:04 -0600 Subject: [PATCH] NUM_ARRAY => COUNT --- Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp | 12 ++++++------ Marlin/src/lcd/dogm/fontdata/langdata_an.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_bg.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_ca.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_cz.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_da.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_de.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_el.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_en.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_es.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_eu.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_fi.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_fr.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_gl.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_hr.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_it.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_nl.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_pl.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_pt.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_ru.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_sk.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_test.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_tr.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_uk.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h | 2 +- Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h | 2 +- Marlin/src/lcd/dogm/ultralcd_DOGM.cpp | 2 +- Marlin/src/lcd/fontutils.h | 4 ---- buildroot/share/fonts/uxggenpages.sh | 2 +- 33 files changed, 37 insertions(+), 41 deletions(-) diff --git a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp index 38e06ec96..b0d480073 100644 --- a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp +++ b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp @@ -901,12 +901,12 @@ int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) { return 1; } copy_address = NULL; - ret = pf_bsearch_r((void *)g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx); + ret = pf_bsearch_r((void *)g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx); if (ret >= 0) { copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_device + idx); } else { - ret = pf_bsearch_r((void *)g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx); + ret = pf_bsearch_r((void *)g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx); if (ret >= 0) copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_common + idx); } @@ -1014,13 +1014,13 @@ int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) { int test_hd44780_charmap_all(void) { int flg_error = 0; - if (test_hd44780_charmap(g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), "g_hd44780_charmap_device", 0) < 0) { + if (test_hd44780_charmap(g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), "g_hd44780_charmap_device", 0) < 0) { flg_error = 1; - test_hd44780_charmap(g_hd44780_charmap_device, NUM_ARRAY(g_hd44780_charmap_device), "g_hd44780_charmap_device", 1); + test_hd44780_charmap(g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), "g_hd44780_charmap_device", 1); } - if (test_hd44780_charmap(g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), "g_hd44780_charmap_common", 0) < 0) { + if (test_hd44780_charmap(g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), "g_hd44780_charmap_common", 0) < 0) { flg_error = 1; - test_hd44780_charmap(g_hd44780_charmap_common, NUM_ARRAY(g_hd44780_charmap_common), "g_hd44780_charmap_common", 1); + test_hd44780_charmap(g_hd44780_charmap_common, COUNT(g_hd44780_charmap_common), "g_hd44780_charmap_common", 1); } if (flg_error) { TRACE("\nFAILED in hd44780 tests!\n"); diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_an.h b/Marlin/src/lcd/dogm/fontdata/langdata_an.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_an.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_an.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_bg.h b/Marlin/src/lcd/dogm/fontdata/langdata_bg.h index 5ea82240a..81444d996 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_bg.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_bg.h @@ -64,7 +64,7 @@ const u8g_fntpgm_uint8_t fontpage_8_206_207[39] U8G_FONT_SECTION("fontpage_8_206 0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x90,0xa8,0xe8,0xa8,0x90,0x04,0x05,0x05,0x06, 0x01,0x00,0x70,0x90,0x70,0x50,0x90}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(8, 144, 149, fontpage_8_144_149), // 'А' -- 'Е' FONTDATA_ITEM(8, 151, 152, fontpage_8_151_152), // 'З' -- 'И' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ca.h b/Marlin/src/lcd/dogm/fontdata/langdata_ca.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ca.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ca.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_cz.h b/Marlin/src/lcd/dogm/fontdata/langdata_cz.h index 5858e707b..e132dc816 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_cz.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_cz.h @@ -38,7 +38,7 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253 0x00,0x05,0x0a,0x0a,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x08,0x10,0x20,0x40,0x80, 0xf8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' FONTDATA_ITEM(2, 143, 143, fontpage_2_143_143), // 'ď' -- 'ď' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_da.h b/Marlin/src/lcd/dogm/fontdata/langdata_da.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_da.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_da.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_de.h b/Marlin/src/lcd/dogm/fontdata/langdata_de.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_de.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_de.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h b/Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h index 558ea2fa6..9343a9af7 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_el-gr.h @@ -72,7 +72,7 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa6,0xa6,0x00,0x01,0x00,0x00, 0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xa8}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_el.h b/Marlin/src/lcd/dogm/fontdata/langdata_el.h index 1c7e810f6..f0c041f36 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_el.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_el.h @@ -75,7 +75,7 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xa6,0xa6,0x00,0x01,0x00,0x00, 0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xa8}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_en.h b/Marlin/src/lcd/dogm/fontdata/langdata_en.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_en.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_en.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_es.h b/Marlin/src/lcd/dogm/fontdata/langdata_es.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_es.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_es.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_eu.h b/Marlin/src/lcd/dogm/fontdata/langdata_eu.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_eu.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_eu.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_fi.h b/Marlin/src/lcd/dogm/fontdata/langdata_fi.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_fi.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_fi.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_fr.h b/Marlin/src/lcd/dogm/fontdata/langdata_fr.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_fr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_fr.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_gl.h b/Marlin/src/lcd/dogm/fontdata/langdata_gl.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_gl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_gl.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_hr.h b/Marlin/src/lcd/dogm/fontdata/langdata_hr.h index 88254cdc6..63fea945b 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_hr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_hr.h @@ -22,7 +22,7 @@ const u8g_fntpgm_uint8_t fontpage_2_254_254[31] U8G_FONT_SECTION("fontpage_2_254 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0x00,0x08,0x00,0x00, 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_it.h b/Marlin/src/lcd/dogm/fontdata/langdata_it.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_it.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_it.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h b/Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h index 2a2229e27..e2ff9129b 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_jp-kana.h @@ -95,7 +95,7 @@ const u8g_fntpgm_uint8_t fontpage_97_252_252[24] U8G_FONT_SECTION("fontpage_97_2 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00,0x03,0x00,0x00, 0x00,0x05,0x01,0x01,0x06,0x00,0x02,0xf8}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ' FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h b/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h index 622a53641..9f20e7b40 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h @@ -424,7 +424,7 @@ const u8g_fntpgm_uint8_t fontpage_431_136_136[34] U8G_FONT_SECTION("fontpage_431 0x00,0x08,0x0b,0x0b,0x0a,0x01,0xfe,0x71,0x01,0xfd,0x01,0x71,0x49,0x89,0x49,0x71, 0x01,0x01}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거' FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_nl.h b/Marlin/src/lcd/dogm/fontdata/langdata_nl.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_nl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_nl.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pl.h b/Marlin/src/lcd/dogm/fontdata/langdata_pl.h index 2f2e48e4b..0cc607468 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pl.h @@ -28,7 +28,7 @@ const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(2, 133, 133, fontpage_2_133_133), // 'ą' -- 'ą' FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h b/Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pt-br.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pt.h b/Marlin/src/lcd/dogm/fontdata/langdata_pt.h index 51210a439..ffda82764 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pt.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pt.h @@ -5,5 +5,5 @@ */ #include -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ru.h b/Marlin/src/lcd/dogm/fontdata/langdata_ru.h index 43650b54d..85a0bde3a 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ru.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ru.h @@ -67,7 +67,7 @@ const u8g_fntpgm_uint8_t fontpage_8_209_209[30] U8G_FONT_SECTION("fontpage_8_209 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd1,0xd1,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0xf0,0x80,0x70}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(8, 144, 152, fontpage_8_144_152), // 'А' -- 'И' FONTDATA_ITEM(8, 154, 168, fontpage_8_154_168), // 'К' -- 'Ш' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_sk.h b/Marlin/src/lcd/dogm/fontdata/langdata_sk.h index 37e10057c..4786af15a 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_sk.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_sk.h @@ -46,7 +46,7 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253 0x00,0x05,0x0a,0x0a,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x08,0x10,0x20,0x40,0x80, 0xf8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xf8,0x10,0x20,0x40,0xf8}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(2, 140, 143, fontpage_2_140_143), // 'Č' -- 'ď' FONTDATA_ITEM(2, 185, 186, fontpage_2_185_186), // 'Ĺ' -- 'ĺ' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_test.h b/Marlin/src/lcd/dogm/fontdata/langdata_test.h index 875071abe..033188359 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_test.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_test.h @@ -217,7 +217,7 @@ const u8g_fntpgm_uint8_t fontpage_97_193_255[753] U8G_FONT_SECTION("fontpage_97_ 0x28,0x80,0x60,0x10,0x08,0x05,0x06,0x06,0x06,0x00,0x00,0xf8,0x08,0x08,0x08,0x08, 0x08}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(8, 128, 255, fontpage_8_128_255), // 'Ѐ' -- 'ѿ' FONTDATA_ITEM(97, 129, 191, fontpage_97_129_191), // 'め' -- 'タ' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_tr.h b/Marlin/src/lcd/dogm/fontdata/langdata_tr.h index 23850ecfd..3375e9dec 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_tr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_tr.h @@ -17,7 +17,7 @@ const u8g_fntpgm_uint8_t fontpage_2_223_223[30] U8G_FONT_SECTION("fontpage_2_223 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xdf,0xdf,0x00,0x05,0xfe,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0xfe,0x78,0x80,0x70,0x08,0xf0,0x10,0x60}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(2, 159, 159, fontpage_2_159_159), // 'ğ' -- 'ğ' FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_uk.h b/Marlin/src/lcd/dogm/fontdata/langdata_uk.h index 9886e41d2..d6e8337fd 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_uk.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_uk.h @@ -76,7 +76,7 @@ const u8g_fntpgm_uint8_t fontpage_8_214_214[29] U8G_FONT_SECTION("fontpage_8_214 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0xd6,0xd6,0x00,0x06,0x00,0x00, 0x00,0x03,0x06,0x06,0x06,0x01,0x00,0x40,0x00,0xc0,0x40,0x40,0xe0}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(8, 134, 134, fontpage_8_134_134), // 'І' -- 'І' FONTDATA_ITEM(8, 144, 146, fontpage_8_144_146), // 'А' -- 'В' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h b/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h index e2e878857..3fdd37d1c 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h @@ -1031,7 +1031,7 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x9a,0x9a,0x00,0x08,0x00,0x00, 0x00,0x02,0x07,0x07,0x0c,0x06,0x01,0xc0,0xc0,0x00,0x00,0x00,0xc0,0xc0}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h b/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h index 478eb92ea..ab264c82b 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h @@ -1093,7 +1093,7 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510 0x00,0x06,0x0c,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x9a,0x9a,0x00,0x08,0x00,0x00, 0x00,0x02,0x07,0x07,0x0c,0x06,0x01,0xc0,0xc0,0x00,0x00,0x00,0xc0,0xc0}; -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' diff --git a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp index e397a9f8b..fd55f5894 100644 --- a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp @@ -215,7 +215,7 @@ void MarlinUI::init_lcd() { u8g.setRot270(); // Rotate screen by 270° #endif - uxg_SetUtf8Fonts(g_fontinfo, NUM_ARRAY(g_fontinfo)); + uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo)); } // The kill screen is displayed for unrecoverable conditions diff --git a/Marlin/src/lcd/fontutils.h b/Marlin/src/lcd/fontutils.h index 183c8ed39..2f4dca7dc 100644 --- a/Marlin/src/lcd/fontutils.h +++ b/Marlin/src/lcd/fontutils.h @@ -27,10 +27,6 @@ uint8_t read_byte_rom(uint8_t * str); #define wchar_t uint32_t //typedef uint32_t wchar_t; -#ifndef NUM_ARRAY - #define NUM_ARRAY(a) (sizeof(a)/sizeof((a)[0])) -#endif - typedef uint16_t pixel_len_t; #define PIXEL_LEN_NOLIMIT ((pixel_len_t)(-1)) diff --git a/buildroot/share/fonts/uxggenpages.sh b/buildroot/share/fonts/uxggenpages.sh index 6cf6c4976..920783514 100755 --- a/buildroot/share/fonts/uxggenpages.sh +++ b/buildroot/share/fonts/uxggenpages.sh @@ -169,6 +169,6 @@ cat <fontutf8-data.h */ #include $TMPA -#define FONTDATA_ITEM(page, begin, end, data) {page, begin, end, NUM_ARRAY(data), data} +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {$TMPB}; EOF