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 edited

Legend:

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

    r2305 r2821  
    2929#include <stdlib.h>
    3030
    31 #include "cucul.h"
    3231#include "caca.h"
    3332#include "caca_internals.h"
     
    5857#   endif
    5958    dp->resize.allow = 1;
    60     cucul_set_canvas_size(dp->cv, dp->drv.p->ti.screenwidth,
     59    caca_set_canvas_size(dp->cv, dp->drv.p->ti.screenwidth,
    6160                                  dp->drv.p->ti.screenheight);
    6261    dp->resize.allow = 0;
     
    7069    textcolor((enum COLORS)WHITE);
    7170    textbackground((enum COLORS)BLACK);
    72     gotoxy(cucul_get_canvas_width(dp->cv), cucul_get_canvas_height(dp->cv));
     71    gotoxy(caca_get_canvas_width(dp->cv), caca_get_canvas_height(dp->cv));
    7372    cputs("\r\n");
    7473    _setcursortype(_NORMALCURSOR);
     
    8887{
    8988    /* Fallback to a 6x10 font */
    90     return cucul_get_canvas_width(dp->cv) * 6;
     89    return caca_get_canvas_width(dp->cv) * 6;
    9190}
    9291
     
    9493{
    9594    /* Fallback to a 6x10 font */
    96     return cucul_get_canvas_height(dp->cv) * 10;
     95    return caca_get_canvas_height(dp->cv) * 10;
    9796}
    9897
     
    10099{
    101100    char *screen = dp->drv.p->screen;
    102     uint32_t const *chars = (uint32_t const *)cucul_get_canvas_chars(dp->cv);
    103     uint32_t const *attrs = (uint32_t const *)cucul_get_canvas_attrs(dp->cv);
    104     int width = cucul_get_canvas_width(dp->cv);
    105     int height = cucul_get_canvas_height(dp->cv);
     101    uint32_t const *chars = (uint32_t const *)caca_get_canvas_chars(dp->cv);
     102    uint32_t const *attrs = (uint32_t const *)caca_get_canvas_attrs(dp->cv);
     103    int width = caca_get_canvas_width(dp->cv);
     104    int height = caca_get_canvas_height(dp->cv);
    106105    int n;
    107106
    108107    for(n = height * width; n--; )
    109108    {
    110         char ch = cucul_utf32_to_cp437(*chars++);
    111         if(n && *chars == CUCUL_MAGIC_FULLWIDTH)
     109        char ch = caca_utf32_to_cp437(*chars++);
     110        if(n && *chars == CACA_MAGIC_FULLWIDTH)
    112111        {
    113112            *screen++ = '[';
    114             *screen++ = cucul_attr_to_ansi(*attrs++);
     113            *screen++ = caca_attr_to_ansi(*attrs++);
    115114            ch = ']';
    116115            chars++;
     
    118117        }
    119118        *screen++ = ch;
    120         *screen++ = cucul_attr_to_ansi(*attrs++);
     119        *screen++ = caca_attr_to_ansi(*attrs++);
    121120    }
    122121#   if defined(SCREENUPDATE_IN_PC_H)
     
    130129{
    131130    /* We know nothing about our window */
    132     dp->resize.w = cucul_get_canvas_width(dp->cv);
    133     dp->resize.h = cucul_get_canvas_height(dp->cv);
     131    dp->resize.w = caca_get_canvas_width(dp->cv);
     132    dp->resize.h = caca_get_canvas_height(dp->cv);
    134133}
    135134
Note: See TracChangeset for help on using the changeset viewer.