Changeset 4147 for libcaca


Ignore:
Timestamp:
Dec 18, 2009, 11:09:25 PM (10 years ago)
Author:
Sam Hocevar
Message:

Preload the example input buffer with Unicode stuff for testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/examples/input.c

    r3485 r4147  
    6363        caca_printf(cv, 3, 3 * i + 4, "[entry %i]", i + 1);
    6464    }
     65
     66    /* Put Unicode crap in the last text entry */
     67    entries[TEXT_ENTRIES - 1].buffer[0] = 'A';
     68    entries[TEXT_ENTRIES - 1].buffer[1] = 'b';
     69    entries[TEXT_ENTRIES - 1].buffer[2] = caca_utf8_to_utf32("Ç", NULL);
     70    entries[TEXT_ENTRIES - 1].buffer[3] = caca_utf8_to_utf32("đ", NULL);
     71    entries[TEXT_ENTRIES - 1].buffer[4] = caca_utf8_to_utf32("ボ", NULL);
     72    entries[TEXT_ENTRIES - 1].buffer[5] = CACA_MAGIC_FULLWIDTH;
     73    entries[TEXT_ENTRIES - 1].buffer[6] = caca_utf8_to_utf32("♥", NULL);
     74    entries[TEXT_ENTRIES - 1].size = 7;
    6575
    6676    while(running)
Note: See TracChangeset for help on using the changeset viewer.