Lines Matching refs:maxlen
178 uptr internal_strlcat(char *dst, const char *src, uptr maxlen) { in internal_strlcat() argument
180 const uptr dstlen = internal_strnlen(dst, maxlen); in internal_strlcat()
181 if (dstlen == maxlen) return maxlen + srclen; in internal_strlcat()
182 if (srclen < maxlen - dstlen) { in internal_strlcat()
185 internal_memmove(dst + dstlen, src, maxlen - dstlen - 1); in internal_strlcat()
186 dst[maxlen - 1] = '\0'; in internal_strlcat()
200 uptr internal_strlcpy(char *dst, const char *src, uptr maxlen) { in internal_strlcpy() argument
202 if (srclen < maxlen) { in internal_strlcpy()
204 } else if (maxlen != 0) { in internal_strlcpy()
205 internal_memmove(dst, src, maxlen - 1); in internal_strlcpy()
206 dst[maxlen - 1] = '\0'; in internal_strlcpy()
219 uptr internal_strnlen(const char *s, uptr maxlen) { in internal_strnlen() argument
221 while (i < maxlen && s[i]) i++; in internal_strnlen()