aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2001-09-24 22:38:22 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2001-09-24 22:38:22 +0000
commitad43d46f3abe6f4d9b41f5b1d7b46a0c320efda8 (patch)
tree7ec3b888341991cdf8a157f5d87a6dea617363e5 /include
parentb6fc711089add2bbefb23eecea0eccb3423e9960 (diff)
downloadgcc-ad43d46f3abe6f4d9b41f5b1d7b46a0c320efda8.zip
gcc-ad43d46f3abe6f4d9b41f5b1d7b46a0c320efda8.tar.gz
gcc-ad43d46f3abe6f4d9b41f5b1d7b46a0c320efda8.tar.bz2
libiberty.h (reconcat): New function.
include: * libiberty.h (reconcat): New function. libiberty: * concat.c (reconcat): New function. gcc: * c-aux-info.c (affix_data_type): Use ATTRIBUTE_MALLOC. Avoid leak by passing malloc'ed pointer to reconcat, not concat. From-SVN: r45789
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/libiberty.h9
2 files changed, 13 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index c94394e..b44671a 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (reconcat): New function.
+
2001-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h (concat, concat_length, concat_copy, concat_copy2,
diff --git a/include/libiberty.h b/include/libiberty.h
index a54e3ad..315d310 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -91,6 +91,15 @@ extern const char *lbasename PARAMS ((const char *));
extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
+/* Concatenate an arbitrary number of strings. You must pass NULL as
+ the last argument of this function, to terminate the list of
+ strings. Allocates memory using xmalloc. The first argument is
+ not one of the strings to be concatenated, but if not NULL is a
+ pointer to be freed after the new string is created, similar to the
+ way xrealloc works. */
+
+extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC;
+
/* Determine the length of concatenating an arbitrary number of
strings. You must pass NULL as the last argument of this function,
to terminate the list of strings. */