From b1f8dd75d684b3dd00f147a63ef687a6b566fc7f Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 10 Jul 2019 18:47:32 +0200 Subject: cell: we only need 4 bytes for the longest utf8 sequence We don't *have* to NULL-terminate the utf8 string. So don't. This makes the cell glyph 4 bytes exactly, which is better for alignment and cache usage. --- terminal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 66cfebe0..16e53f22 100644 --- a/terminal.h +++ b/terminal.h @@ -68,7 +68,7 @@ struct attributes { struct cell { struct attributes attrs; - char c[5]; + char c[4]; } __attribute__((packed)); struct scroll_region { -- cgit v1.3