From c50a3902f6a5557c0173f6c588540d3207914aec Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 12 Oct 2006 04:56:58 +0000 Subject: make size of built-in font known, may be needed --- ascii.c | 2 ++ main.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ascii.c b/ascii.c index f6ac8a7..0f254bd 100644 --- a/ascii.c +++ b/ascii.c @@ -312,3 +312,5 @@ const unsigned char vga_ascii_ucf[] = { 0x00,0x00,0x0f,0x38,0x33,0x67,0x7f,0x7f,0x7f,0x7e,0x7f,0x3e,0x3e,0x0f,0x00,0x00, 0x00,0x00,0xf0,0x1c,0xcc,0xe6,0xe6,0xce,0x3e,0x7e,0xfe,0x7c,0x7c,0xf0,0x00,0x00, }; +#include +const size_t vga_ascii_ucf_size = sizeof(vga_ascii_ucf); diff --git a/main.c b/main.c index 56a6b8d..e14c277 100644 --- a/main.c +++ b/main.c @@ -13,6 +13,7 @@ int ucf_load(struct ucf *, const char *); extern const unsigned char vga_ascii_ucf[]; +extern const size_t vga_ascii_ucf_size; int main(int argc, char *argv[]) { @@ -29,7 +30,7 @@ int main(int argc, char *argv[]) setlocale(LC_CTYPE, ""); if (ucf_load(&f, getenv("UUTERM_FONT")) < 0 - && ucf_init(&f, vga_ascii_ucf, -1) < 0) + && ucf_init(&f, vga_ascii_ucf, vga_ascii_ucf_size) < 0) return 1; d.cell_w = 8; -- cgit v1.2.3