Ignore:
Timestamp:
Nov 8, 2006, 6:26:57 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Convert all programs and tests to the new import/export API.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/cacaplay.c

    r1048 r1308  
    2626{
    2727    caca_event_t ev;
    28     cucul_buffer_t *b;
    2928    cucul_canvas_t *cv;
    3029    caca_display_t *dp;
     
    3635    }
    3736
    38     b = cucul_load_file(argv[1]);
    39     if(!b)
     37    cv = cucul_create_canvas(0, 0);
     38    if(cucul_import_file(cv, argv[1], "caca") < 0)
    4039    {
    41         fprintf(stderr, "%s: could not open %s.\n", argv[0], argv[1]);
     40        fprintf(stderr, "%s: could not import file %s.\n", argv[0], argv[1]);
    4241        return 1;
    4342    }
    44 
    45     cv = cucul_import_canvas(b, "caca");
    46     if(!cv)
    47     {
    48         fprintf(stderr, "%s: invalid caca file %s.\n", argv[0], argv[1]);
    49         cucul_free_buffer(b);
    50         return 1;
    51     }
    52 
    53     cucul_free_buffer(b);
    5443
    5544    dp = caca_create_display(cv);
Note: See TracChangeset for help on using the changeset viewer.