* of the GNU Lesser General Public License.
*/
-#include "ucw/lib.h"
-#include "ucw/unicode.h"
+#include <ucw/lib.h>
+#include <ucw/unicode.h>
-uns
+size_t
utf8_strlen(const byte *str)
{
- uns len = 0;
+ size_t len = 0;
while (*str)
{
UTF8_SKIP(str);
return len;
}
-uns
-utf8_strnlen(const byte *str, uns n)
+size_t
+utf8_strnlen(const byte *str, size_t n)
{
- uns len = 0;
+ size_t len = 0;
const byte *end = str + n;
while (str < end)
{
#undef F
};
- uns func = ~0U;
+ uint func = ~0U;
if (argc > 1)
- for (uns i = 0; i < ARRAY_SIZE(names); i++)
+ for (uint i = 0; i < ARRAY_SIZE(names); i++)
if (!strcasecmp(names[i], argv[1]))
func = i;
if (!~func)
if (func < FUNC_UTF8_PUT)
{
byte *p = buf, *q = buf, *last;
- uns u;
+ uint u;
bzero(buf, sizeof(buf));
while (scanf("%x", &u) == 1)
*q++ = u;
}
else
{
- uns u, i=0;
+ uint u, i=0;
while (scanf("%x", &u) == 1)
{
byte *p = buf, *q = buf;