Lines Matching full:maxlen
218 local_strnlen (const char *string, size_t maxlen)
220 const char *end = memchr (string, '\0', maxlen);
221 return end ? (size_t) (end - string) : maxlen;
257 local_wcsnlen (const wchar_t *s, size_t maxlen)
261 for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--)
4930 /* Ensure that maxlen below will be >= 2. Needed on BeOS,
4931 where an snprintf() with maxlen==1 acts like sprintf(). */
4948 size_t maxlen = allocated - length;
4951 if (maxlen > INT_MAX / TCHARS_PER_DCHAR)
4952 maxlen = INT_MAX / TCHARS_PER_DCHAR;
4953 maxlen = maxlen * TCHARS_PER_DCHAR;
4959 maxlen, buf, \
4964 maxlen, buf, \
4969 maxlen, buf, \
5119 if (count < maxlen
5159 if (maxlen < tmp_length)
5211 returns a count >= maxlen. However, a non-compliant
5212 snprintf() function returns only count = maxlen - 1. To
5213 cover both cases, test whether count >= maxlen - 1. */
5214 if ((unsigned int) count + 1 >= maxlen)
5216 /* If maxlen already has attained its allowed maximum,
5217 allocating more memory will not increase maxlen.
5219 if (maxlen == INT_MAX / TCHARS_PER_DCHAR)
5227 maxlen > (unsigned int) count + 1