Ignore:
Timestamp:
Sep 27, 2008, 3:12:46 PM (11 years ago)
Author:
Sam Hocevar
Message:

Starting refactoring to get rid of libcucul. The initial reason for the
split is rendered moot by the plugin system: when enabled, binaries do
not link directly with libX11 or libGL. I hope this is a step towards
more consisteny and clarity.

File:
1 moved

Legend:

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

    r2820 r2821  
    2020#endif
    2121
    22 #include "cucul.h"
    2322#include "caca.h"
    2423
     
    2726int main(int argc, char *argv[])
    2827{
    29     cucul_canvas_t *cv;
     28    caca_canvas_t *cv;
    3029    unsigned int i, j, w, h;
    3130
    32     fprintf(stderr, "testing cucul_create_canvas()\n");
     31    fprintf(stderr, "testing caca_create_canvas()\n");
    3332    for(i = 0; i < ITER; i++)
    3433    {
    35         w = cucul_rand(1, 1000);
    36         h = cucul_rand(1, 1000);
    37         cv = cucul_create_canvas(w, h);
    38         cucul_put_char(cv, w - 1, h - 1, 'x');
    39         if(cucul_get_char(cv, w - 1, h - 1) != 'x')
     34        w = caca_rand(1, 1000);
     35        h = caca_rand(1, 1000);
     36        cv = caca_create_canvas(w, h);
     37        caca_put_char(cv, w - 1, h - 1, 'x');
     38        if(caca_get_char(cv, w - 1, h - 1) != 'x')
    4039            fprintf(stderr, "  failed (%ux%u)\n", w, h);
    41         cucul_free_canvas(cv);
     40        caca_free_canvas(cv);
    4241    }
    4342
    44     fprintf(stderr, "testing cucul_set_frame_name()\n");
    45     cv = cucul_create_canvas(1, 1);
     43    fprintf(stderr, "testing caca_set_frame_name()\n");
     44    cv = caca_create_canvas(1, 1);
    4645    if(cv == NULL)
    4746    {
     
    5251    for(i = 0; i < ITER; i++)
    5352    {
    54         cucul_create_frame(cv, 0);
     53        caca_create_frame(cv, 0);
    5554        for(j = 0; j < ITER; j++)
    5655        {
    5756            char buf[BUFSIZ];
    58             w = cucul_rand(1, 1000);
     57            w = caca_rand(1, 1000);
    5958            memset(buf, 'x', w);
    6059            buf[w] = '\0';
    61             cucul_set_frame_name(cv, buf);
     60            caca_set_frame_name(cv, buf);
    6261        }
    6362    }
    64     cucul_free_canvas(cv);
     63    caca_free_canvas(cv);
    6564
    6665    fprintf(stderr, "all tests passed\n");
Note: See TracChangeset for help on using the changeset viewer.