Mercurial > hg > CbC > CbC_gcc
comparison libiberty/concat.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | a06113de4d67 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* Concatenate variable number of strings. | 1 /* Concatenate variable number of strings. |
2 Copyright (C) 1991, 1994, 2001 Free Software Foundation, Inc. | 2 Copyright (C) 1991, 1994, 2001, 2011 Free Software Foundation, Inc. |
3 Written by Fred Fish @ Cygnus Support | 3 Written by Fred Fish @ Cygnus Support |
4 | 4 |
5 This file is part of the libiberty library. | 5 This file is part of the libiberty library. |
6 Libiberty is free software; you can redistribute it and/or | 6 Libiberty is free software; you can redistribute it and/or |
7 modify it under the terms of the GNU Library General Public | 7 modify it under the terms of the GNU Library General Public |
19 Boston, MA 02110-1301, USA. */ | 19 Boston, MA 02110-1301, USA. */ |
20 | 20 |
21 | 21 |
22 /* | 22 /* |
23 | 23 |
24 @deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @dots{}, @code{NULL}) | 24 @deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @ |
25 @dots{}, @code{NULL}) | |
25 | 26 |
26 Concatenate zero or more of strings and return the result in freshly | 27 Concatenate zero or more of strings and return the result in freshly |
27 @code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is | 28 @code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is |
28 available. The argument list is terminated by the first @code{NULL} | 29 available. The argument list is terminated by the first @code{NULL} |
29 pointer encountered. Pointers to empty strings are ignored. | 30 pointer encountered. Pointers to empty strings are ignored. |
168 return newstr; | 169 return newstr; |
169 } | 170 } |
170 | 171 |
171 /* | 172 /* |
172 | 173 |
173 @deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL}) | 174 @deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @ |
175 @dots{}, @code{NULL}) | |
174 | 176 |
175 Same as @code{concat}, except that if @var{optr} is not @code{NULL} it | 177 Same as @code{concat}, except that if @var{optr} is not @code{NULL} it |
176 is freed after the string is created. This is intended to be useful | 178 is freed after the string is created. This is intended to be useful |
177 when you're extending an existing string or building up a string in a | 179 when you're extending an existing string or building up a string in a |
178 loop: | 180 loop: |