Mercurial > hg > octave-nkf > gnulib-hg
annotate lib/xasprintf.c @ 17814:f50001a9c124
autoupdate
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Wed, 03 Dec 2014 07:04:40 -0800 |
parents | 344018b6e5d7 |
children | ab58d4870664 |
rev | line source |
---|---|
5218 | 1 /* vasprintf and asprintf with out-of-memory checking. |
17587 | 2 Copyright (C) 1999, 2002-2004, 2006, 2009-2014 Free Software Foundation, |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12518
diff
changeset
|
3 Inc. |
5218 | 4 |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7510
diff
changeset
|
5 This program is free software: you can redistribute it and/or modify |
5218 | 6 it under the terms of the GNU General Public License as published by |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7510
diff
changeset
|
7 the Free Software Foundation; either version 3 of the License, or |
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7510
diff
changeset
|
8 (at your option) any later version. |
5218 | 9 |
10 This program is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 GNU General Public License for more details. | |
14 | |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7510
diff
changeset
|
15 You should have received a copy of the GNU General Public License |
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7510
diff
changeset
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
5218 | 17 |
7510
6c0cb059c9ea
* lib/xvasprintf.c (includes): Assume config.h.
Eric Blake <ebb9@byu.net>
parents:
5848
diff
changeset
|
18 #include <config.h> |
5218 | 19 |
20 /* Specification. */ | |
21 #include "xvasprintf.h" | |
22 | |
23 char * | |
24 xasprintf (const char *format, ...) | |
25 { | |
26 va_list args; | |
27 char *result; | |
28 | |
29 va_start (args, format); | |
30 result = xvasprintf (format, args); | |
31 va_end (args); | |
32 | |
33 return result; | |
34 } |