Ignore:
Timestamp:
Nov 13, 2003, 5:45:25 PM (20 years ago)
Author:
Sam Hocevar
Message:
  • libee/ee.c: + Error checking in ee_init(). + Pre-generate the empty line for ee_clear().
  • libee/sprite.c: + Better error checking in ee_sprite_load().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/libee/ee.c

    r159 r167  
    6868
    6969static int _ee_delay;
     70char *_ee_empty_line;
    7071
    7172#if defined(USE_NCURSES)
     
    167168
    168169#elif defined(USE_CONIO)
     170    gettextinfo(&ti);
     171    _ee_screen = malloc(2 * ti.screenwidth * ti.screenheight);
     172    if(_ee_screen == NULL)
     173        return -1;
    169174    _wscroll = 0;
    170175    _setcursortype(_NOCURSOR);
    171176    clrscr();
    172     gettextinfo(&ti);
    173     _ee_screen = malloc(2 * ti.screenwidth * ti.screenheight);
    174177#   if defined(SCREENUPDATE_IN_PC_H)
    175178    ScreenRetrieve(_ee_screen);
     
    179182
    180183#endif
     184    _ee_empty_line = malloc(ee_get_width() + 1);
     185    memset(_ee_empty_line, ' ', ee_get_width());
     186    _ee_empty_line[ee_get_width()] = '\0';
     187
    181188    _ee_delay = 0;
    182189
Note: See TracChangeset for help on using the changeset viewer.