Lines Matching refs:len
127 ** strlcat2 will append at most len - strlen(dst) - 1 chars.
128 ** terminates with '\0' if len > 0
137 ** len -- max. length of "destination" string.
142 ** if this is greater than len then an overflow would have
148 sm_strlcat2(dst, src1, src2, len)
152 ssize_t len;
160 if (len < o + 1)
163 len -= o + 1; /* space left in dst */
166 for (i = 0, j = o; i < len && (dst[j] = src1[i]) != 0; i++, j++)
172 /* no: terminate dst; there is space since i < len */
177 len -= i; /* space left in dst */
180 for (i = 0; i < len && (dst[j] = src2[i]) != 0; i++, j++)
182 dst[j] = '\0'; /* terminate dst; there is space since i < len */
199 ** len -- max. length of "destination" string.
206 ** if this is greater than len then an overflow would have
212 sm_strlcpyn(char *dst, ssize_t len, int n, ...)
214 sm_strlcpyn(dst, len, n, va_alist)
216 ssize_t len;
227 if (len-- <= 0) /* This allows space for the terminating '\0' */
244 for (i = 0; j < len && (dst[j] = str[i]) != 0; i++, j++)
250 /* no: terminate dst; there is space since j < len */
261 dst[j] = '\0'; /* terminate dst; there is space since j < len */