Deleted Added
full compact
asprintf.c (191739) asprintf.c (226048)
1/*
2 * Copyright (c) Ian F. Darwin 1986-1995.
3 * Software written by Ian F. Darwin and others;
4 * maintained 1995-present by Christos Zoulas and others.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include "file.h"
30
31#ifndef lint
1/*
2 * Copyright (c) Ian F. Darwin 1986-1995.
3 * Software written by Ian F. Darwin and others;
4 * maintained 1995-present by Christos Zoulas and others.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 15 unchanged lines hidden (view full) ---

24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include "file.h"
30
31#ifndef lint
32FILE_RCSID("@(#)$File: asprintf.c,v 1.3 2009/02/03 20:27:51 christos Exp $")
32FILE_RCSID("@(#)$File: asprintf.c,v 1.4 2010/07/21 16:47:17 christos Exp $")
33#endif
34
33#endif
34
35int vasprintf(char **ptr, const char *format_string, va_list vargs);
36
37int asprintf(char **ptr, const char *fmt, ...)
38{
39 va_list vargs;
40 int retval;
41
42 va_start(vargs, fmt);
43 retval = vasprintf(ptr, fmt, vargs);
44 va_end(vargs);
45
46 return retval;
47}
35int asprintf(char **ptr, const char *fmt, ...)
36{
37 va_list vargs;
38 int retval;
39
40 va_start(vargs, fmt);
41 retval = vasprintf(ptr, fmt, vargs);
42 va_end(vargs);
43
44 return retval;
45}