Changeset 302


Ignore:
Timestamp:
Jan 2, 2004, 4:23:54 PM (19 years ago)
Author:
Sam Hocevar
Message:
  • examples/cacaview.c: + If Imlib2 was not activated, warn the user that only BMP is supported.
File:
1 edited

Legend:

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

    r299 r302  
    268268        else if(!pixels)
    269269        {
     270#if defined(HAVE_IMLIB2_H)
     271#   define ERROR_STRING " Error loading `%s'. "
     272#else
     273#   define ERROR_STRING " Error loading `%s'. Only BMP is supported. "
     274#endif
    270275            char *buffer;
    271             int len = strlen(" Error loading `%s'. ") + strlen(list[current]);
     276            int len = strlen(ERROR_STRING) + strlen(list[current]);
    272277
    273278            if(len < ww + 1)
     
    276281            buffer = malloc(len);
    277282
    278             sprintf(buffer, " Error loading `%s'. ", list[current]);
     283            sprintf(buffer, ERROR_STRING, list[current]);
    279284            buffer[ww] = '\0';
    280285            caca_set_color(CACA_COLOR_WHITE, CACA_COLOR_BLUE);
Note: See TracChangeset for help on using the changeset viewer.