Browse Source

* 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.
tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
25344d89b0
2 changed files with 0 additions and 47 deletions
  1. +0
    -43
      cucul/charset.c
  2. +0
    -4
      cucul/cucul_internals.h

+ 0
- 43
cucul/charset.c View File

@@ -280,46 +280,3 @@ int cucul_utf32_is_fullwidth(unsigned long int ch)
return 0;
}

/*
* XXX: The following functions are local.
*/

unsigned int _cucul_strlen_utf8(char const *s)
{
int len = 0;
char const *parser = s;

while(*parser)
{
int i;
int bytes = 1 + trailing[(int)(unsigned char)*parser];

for(i = 1; i < bytes; i++)
if(!parser[i])
return len;
parser += bytes;
len++;
}

return len;
}

char const *_cucul_skip_utf8(char const *s, unsigned int x)
{
char const *parser = s;

while(x)
{
int i;
int bytes = 1 + trailing[(int)(unsigned char)*parser];

for(i = 1; i < bytes; i++)
if(!parser[i])
return parser;
parser += bytes;
x--;
}

return parser;
}


+ 0
- 4
cucul/cucul_internals.h View File

@@ -48,10 +48,6 @@ struct cucul_buffer
/* Canvas functions */
extern int _cucul_set_canvas_size(cucul_canvas_t *, unsigned int, unsigned int);

/* Charset functions */
extern unsigned int _cucul_strlen_utf8(char const *);
extern char const *_cucul_skip_utf8(char const *, unsigned int);

/* Colour functions */
extern uint16_t _cucul_attr_to_rgb12fg(uint32_t);
extern uint16_t _cucul_attr_to_rgb12bg(uint32_t);


Loading…
Cancel
Save