Changeset 1335 for libcaca/trunk


Ignore:
Timestamp:
Nov 11, 2006, 10:22:10 AM (16 years ago)
Author:
Sam Hocevar
Message:
  • Got rid of the now unused _cucul_strlen_utf8() and _cucul_skip_utf8() functions. They're obsoleted by cucul_utf8_to_utf32() and rendered useless by fullwidth character support.
Location:
libcaca/trunk/cucul
Files:
2 edited

Legend:

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

    r1231 r1335  
    281281}
    282282
    283 /*
    284  * XXX: The following functions are local.
    285  */
    286 
    287 unsigned int _cucul_strlen_utf8(char const *s)
    288 {
    289     int len = 0;
    290     char const *parser = s;
    291 
    292     while(*parser)
    293     {
    294         int i;
    295         int bytes = 1 + trailing[(int)(unsigned char)*parser];
    296 
    297         for(i = 1; i < bytes; i++)
    298             if(!parser[i])
    299                 return len;
    300         parser += bytes;
    301         len++;
    302     }
    303 
    304     return len;
    305 }
    306 
    307 char const *_cucul_skip_utf8(char const *s, unsigned int x)
    308 {
    309     char const *parser = s;
    310 
    311     while(x)
    312     {
    313         int i;
    314         int bytes = 1 + trailing[(int)(unsigned char)*parser];
    315 
    316         for(i = 1; i < bytes; i++)
    317             if(!parser[i])
    318                 return parser;
    319         parser += bytes;
    320         x--;
    321     }
    322 
    323     return parser;
    324 }
    325 
  • libcaca/trunk/cucul/cucul_internals.h

    r1334 r1335  
    4949extern int _cucul_set_canvas_size(cucul_canvas_t *, unsigned int, unsigned int);
    5050
    51 /* Charset functions */
    52 extern unsigned int _cucul_strlen_utf8(char const *);
    53 extern char const *_cucul_skip_utf8(char const *, unsigned int);
    54 
    5551/* Colour functions */
    5652extern uint16_t _cucul_attr_to_rgb12fg(uint32_t);
Note: See TracChangeset for help on using the changeset viewer.