+ strcpy(p + old_len, text_to_append);
+ return(p);
+}
+
+
+/*********************************************************************
+ *
+ * Function : string_append
+ *
+ * Description : Reallocate target_string and append text to it.
+ * This makes it easier to append to malloc'd strings.
+ * This is similar to strsav(), but running out of
+ * memory isn't catastrophic.
+ *
+ * Parameters :
+ * 1 : target_string = Pointer to old text that is to be
+ * extended. *target_string will be free()d by this
+ * routine. target_string must be non-NULL.
+ * If *target_string is NULL, this routine will
+ * do nothing and return with an error - this allows
+ * you to make many calls to this routine and only
+ * check for errors after the last one.
+ * 2 : text_to_append = Text to be appended to old.
+ * Must not be NULL.
+ *
+ * Returns : On success, returns 0 and sets *target_string to
+ * newly malloc'ed appended string. Caller must free().
+ * On out-of-memory, returns nonzero (and free()s
+ * *target_string and sets it to NULL).
+ *
+ *********************************************************************/
+int string_append(char **target_string, const char *text_to_append)
+{
+ size_t old_len;
+ char *new_string;
+
+ assert(target_string);
+ assert(text_to_append);