Ignore:
Timestamp:
Nov 8, 2006, 5:43:59 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Renamed cucul_export() to cucul_export_memory(), paves the way for a cucul_export_file() but I'm not sure yet this is a good idea.
  • Use the new import/export API in libcaca.
File:
1 edited

Legend:

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

    r1287 r1306  
    214214cucul_canvas_t *__caca0_load_sprite(char const *file)
    215215{
    216     cucul_buffer_t *buf;
    217216    cucul_canvas_t *cv;
    218217
    219     buf = cucul_load_file(file);
    220     if(!buf)
     218    cv = cucul_create_canvas(0, 0);;
     219    if(cucul_import_file(cv, file, "") < 0)
     220    {
     221        cucul_free_canvas(cv);
    221222        return NULL;
    222     cv = cucul_import_canvas(buf, "");
    223     cucul_free_buffer(buf);
    224     if(!cv)
    225         return NULL;
     223    }
    226224
    227225    return cv;
Note: See TracChangeset for help on using the changeset viewer.