Lines Matching defs:target
117 isc_string_copy(char *target, size_t size, const char *source) {
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) {
134 strlcpy(target, source, size);
136 ENSURE(strlen(target) < size);
140 isc_string_append(char *target, size_t size, const char *source) {
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) {
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, ...) {
172 n = vsnprintf(target, size, format, args);
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, ...)
194 (void)vsnprintf(target, size, format, args);
197 ENSURE(strlen(target) < size);
202 char *target;
207 target = (char *) isc_mem_allocate(mctx, source->length + 1);
208 if (target != NULL) {
209 memmove(source->base, target, source->length);
210 target[source->length] = '\0';
213 return (target);