Lines Matching defs:target
126 isc_string_copy(char *target, size_t size, const char *source) {
129 if (strlcpy(target, source, size) >= size) {
130 memset(target, ISC_STRING_MAGIC, size);
134 ENSURE(strlen(target) < size);
140 isc_string_copy_truncate(char *target, size_t size, const char *source) {
143 strlcpy(target, source, size);
145 ENSURE(strlen(target) < size);
149 isc_string_append(char *target, size_t size, const char *source) {
151 REQUIRE(strlen(target) < size);
153 if (strlcat(target, source, size) >= size) {
154 memset(target, ISC_STRING_MAGIC, size);
158 ENSURE(strlen(target) < size);
164 isc_string_append_truncate(char *target, size_t size, const char *source) {
166 REQUIRE(strlen(target) < size);
168 strlcat(target, source, size);
170 ENSURE(strlen(target) < size);
174 isc_string_printf(char *target, size_t size, const char *format, ...) {
181 n = vsnprintf(target, size, format, args);
185 memset(target, ISC_STRING_MAGIC, size);
189 ENSURE(strlen(target) < size);
195 isc_string_printf_truncate(char *target, size_t size, const char *format, ...)
203 (void)vsnprintf(target, size, format, args);
206 ENSURE(strlen(target) < size);
211 char *target;
216 target = (char *) isc_mem_allocate(mctx, source->length + 1);
217 if (target != NULL) {
218 memmove(source->base, target, source->length);
219 target[source->length] = '\0';
222 return (target);