Ignore:
Timestamp:
Nov 8, 2006, 6:26:57 PM (13 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/cacadraw.c

    r1267 r1308  
    5656        if(!image)
    5757        {
    58             cucul_buffer_t *b = cucul_load_file(argv[file]);
    59             if(!b)
    60             {
    61                 fprintf(stderr, "%s: could not open `%s'.\n", argv[0], argv[1]);
    62                 return 1;
    63             }
    64 
    65             image = cucul_import_canvas(b, "ansi");
    66             if(!image)
     58            image = cucul_create_canvas(0, 0);
     59            if(cucul_import_file(image, argv[file], "ansi") < 0)
    6760            {
    6861                fprintf(stderr, "%s: invalid file `%s'.\n", argv[0], argv[1]);
    6962                return 1;
    7063            }
    71 
    72             cucul_free_buffer(b);
    7364
    7465            ih = cucul_get_canvas_height(image);
Note: See TracChangeset for help on using the changeset viewer.