Changeset 4149 for libcaca/trunk


Ignore:
Timestamp:
Dec 19, 2009, 3:38:47 PM (10 years ago)
Author:
Sam Hocevar
Message:

Store built-in fonts in a uin8_t[] instead of char[].

Location:
libcaca/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/font.c

    r4148 r4149  
    119119    {
    120120        if(!strcasecmp(data, "Monospace 9"))
    121             return caca_load_font((char *)&mono9_data, mono9_size);
     121            return caca_load_font(mono9_data, mono9_size);
    122122        if(!strcasecmp(data, "Monospace Bold 12"))
    123             return caca_load_font((char *)&monobold12_data, monobold12_size);
     123            return caca_load_font(monobold12_data, monobold12_size);
    124124
    125125        seterrno(ENOENT);
  • libcaca/trunk/caca/mono9.data

    r3407 r4149  
    55 */
    66
    7 static unsigned int const mono9_size = 246854;
    8 static char mono9_data[246854] =
     7static size_t const mono9_size = 246854;
     8static uint8_t mono9_data[246854] =
    99{
    1010/* file: */
  • libcaca/trunk/caca/monobold12.data

    r3407 r4149  
    55 */
    66
    7 static unsigned int const monobold12_size = 419205;
    8 static char monobold12_data[419205] =
     7static size_t const monobold12_size = 419205;
     8static uint8_t monobold12_data[419205] =
    99{
    1010/* file: */
  • libcaca/trunk/tools/makefont.c

    r4148 r4149  
    188188    printf("\n");
    189189
    190     printf("static unsigned int const %s_size = %i;\n",
     190    printf("static size_t const %s_size = %i;\n",
    191191           prefix, 4 + control_size + data_size);
    192     printf("static char %s_data[%i] =\n", prefix, 4 + control_size + data_size);
     192    printf("static uint8_t %s_data[%i] =\n",
     193           prefix, 4 + control_size + data_size);
    193194    printf("{\n");
    194195
Note: See TracChangeset for help on using the changeset viewer.