Ignore:
Timestamp:
Apr 25, 2006, 5:04:19 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Small optimisation in import_text().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/import.c

    r875 r876  
    3939 *
    4040 *  \li \c "": attempt to autodetect the file format.
     41 *
     42 *  \li \c "ansi": import ANSI files.
    4143 *
    4244 *  \li \c "caca": import native libcaca files.
     
    176178        }
    177179
    178         while(x >= width)
    179         {
    180             width++;
    181             cucul_set_canvas_size(cv, width, height);
    182         }
    183 
    184         while(y >= height)
    185         {
    186             height++;
     180        if(x >= width || y >= height)
     181        {
     182            width = x + 1;
     183            height = y + 1;
    187184            cucul_set_canvas_size(cv, width, height);
    188185        }
Note: See TracChangeset for help on using the changeset viewer.