X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcutf8.c;h=29f74dc34dbc04795d19d542c18af30f83e8daf5;hb=9905799a86c606304fd7df2cd401de1740a272a1;hp=9b3645586057bfa9a07eca28da71bf0e6b178a39;hpb=c27a4ecc3e616e8a5ee09b8ca888ed6ff3e501f7;p=silc.git diff --git a/lib/silcutil/silcutf8.c b/lib/silcutil/silcutf8.c index 9b364558..29f74dc3 100644 --- a/lib/silcutil/silcutf8.c +++ b/lib/silcutil/silcutf8.c @@ -17,7 +17,7 @@ */ -#include "silcincludes.h" +#include "silc.h" #include "silcutf8.h" /* Encodes the string `bin' of which encoding is `bin_encoding' to the @@ -491,7 +491,7 @@ SilcUInt32 silc_utf8_decode(const unsigned char *utf8, SilcUInt32 utf8_len, if (enclen + 3 > bin_size) return 0; bin[enclen] = '\\'; - snprintf(bin + enclen + 1, 3, "%02X", cv); + silc_silc_snprintf(bin + enclen + 1, 3, "%02X", cv); } enclen += 3; continue; @@ -566,14 +566,14 @@ SilcBool silc_utf8_strncasecmp(const char *s1, const char *s2, SilcUInt32 n) return TRUE; /* Casefold and normalize */ - status = silc_stringprep(s1, strlen(s1), SILC_STRING_UTF8, + status = silc_stringprep(s1, n, SILC_STRING_UTF8, SILC_IDENTIFIERC_PREP, 0, &s1u, &s1u_len, SILC_STRING_UTF8); if (status != SILC_STRINGPREP_OK) return FALSE; /* Casefold and normalize */ - status = silc_stringprep(s2, strlen(s2), SILC_STRING_UTF8, + status = silc_stringprep(s2, n, SILC_STRING_UTF8, SILC_IDENTIFIERC_PREP, 0, &s2u, &s2u_len, SILC_STRING_UTF8); if (status != SILC_STRINGPREP_OK)