This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for adding reconcat to libiberty
- To: ghazi at caip dot rutgers dot edu
- Subject: Re: Patch for adding reconcat to libiberty
- From: DJ Delorie <dj at redhat dot com>
- Date: Mon, 24 Sep 2001 16:37:20 -0400
- CC: gcc-patches at gcc dot gnu dot org
- References: <200109230423.AAA07912@caip.rutgers.edu>
> include:
> * libiberty.h (reconcat): New function.
>
> libiberty:
> * concat.c (reconcat): New function.
These bits are approved if...
> +/* 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 and frees the first
> + argument if it is non-NULL before returning. */
I'd suggest a wording like "... 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."