Lines Matching defs:size
117 isc_string_copy(char *target, size_t size, const char *source) {
118 REQUIRE(size > 0U);
120 if (strlcpy(target, source, size) >= size) {
121 memset(target, ISC_STRING_MAGIC, size);
125 ENSURE(strlen(target) < size);
131 isc_string_copy_truncate(char *target, size_t size, const char *source) {
132 REQUIRE(size > 0U);
134 strlcpy(target, source, size);
136 ENSURE(strlen(target) < size);
140 isc_string_append(char *target, size_t size, const char *source) {
141 REQUIRE(size > 0U);
142 REQUIRE(strlen(target) < size);
144 if (strlcat(target, source, size) >= size) {
145 memset(target, ISC_STRING_MAGIC, size);
149 ENSURE(strlen(target) < size);
155 isc_string_append_truncate(char *target, size_t size, const char *source) {
156 REQUIRE(size > 0U);
157 REQUIRE(strlen(target) < size);
159 strlcat(target, source, size);
161 ENSURE(strlen(target) < size);
165 isc_string_printf(char *target, size_t size, const char *format, ...) {
169 REQUIRE(size > 0U);
172 n = vsnprintf(target, size, format, args);
175 if (n >= size) {
176 memset(target, ISC_STRING_MAGIC, size);
180 ENSURE(strlen(target) < size);
186 isc_string_printf_truncate(char *target, size_t size, const char *format, ...)
190 REQUIRE(size > 0U);
194 (void)vsnprintf(target, size, format, args);
197 ENSURE(strlen(target) < size);
238 isc_string_strlcpy(char *dst, const char *src, size_t size)
242 size_t n = size;
254 if (size != 0U)
264 isc_string_strlcat(char *dst, const char *src, size_t size)
268 size_t n = size;
275 n = size - dlen;