From 68bdb1b06e97ffec417cbec1a85d7a2531a07fe0 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 18 Dec 2009 22:09:25 +0000 Subject: [PATCH] Preload the example input buffer with Unicode stuff for testing. --- examples/input.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/input.c b/examples/input.c index 2b7a87a..4fbf222 100644 --- a/examples/input.c +++ b/examples/input.c @@ -63,6 +63,16 @@ int main(int argc, char *argv[]) caca_printf(cv, 3, 3 * i + 4, "[entry %i]", i + 1); } + /* Put Unicode crap in the last text entry */ + entries[TEXT_ENTRIES - 1].buffer[0] = 'A'; + entries[TEXT_ENTRIES - 1].buffer[1] = 'b'; + entries[TEXT_ENTRIES - 1].buffer[2] = caca_utf8_to_utf32("Ç", NULL); + entries[TEXT_ENTRIES - 1].buffer[3] = caca_utf8_to_utf32("đ", NULL); + entries[TEXT_ENTRIES - 1].buffer[4] = caca_utf8_to_utf32("ボ", NULL); + entries[TEXT_ENTRIES - 1].buffer[5] = CACA_MAGIC_FULLWIDTH; + entries[TEXT_ENTRIES - 1].buffer[6] = caca_utf8_to_utf32("♥", NULL); + entries[TEXT_ENTRIES - 1].size = 7; + while(running) { caca_event_t ev;