Lines Matching defs:maxlen
217 local_strnlen (const char *string, size_t maxlen)
219 const char *end = memchr (string, '\0', maxlen);
220 return end ? (size_t) (end - string) : maxlen;
256 local_wcsnlen (const wchar_t *s, size_t maxlen)
260 for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--)
4893 /* Ensure that maxlen below will be >= 2. Needed on BeOS,
4894 where an snprintf() with maxlen==1 acts like sprintf(). */
4909 size_t maxlen = allocated - length;
4912 if (maxlen > INT_MAX / TCHARS_PER_DCHAR)
4913 maxlen = INT_MAX / TCHARS_PER_DCHAR;
4914 maxlen = maxlen * TCHARS_PER_DCHAR;
4920 maxlen, buf, \
4925 maxlen, buf, \
4930 maxlen, buf, \
5080 if (count < maxlen
5120 if (maxlen < tmp_length)
5172 returns a count >= maxlen. However, a non-compliant
5173 snprintf() function returns only count = maxlen - 1. To
5174 cover both cases, test whether count >= maxlen - 1. */
5175 if ((unsigned int) count + 1 >= maxlen)
5177 /* If maxlen already has attained its allowed maximum,
5178 allocating more memory will not increase maxlen.
5180 if (maxlen == INT_MAX / TCHARS_PER_DCHAR)
5188 maxlen > (unsigned int) count + 1