aboutsummaryrefslogtreecommitdiff
path: root/test_mini/libft/src/io/ft_printf/ft_asprintf.c
blob: 5eb62d94c6f33cecc27a400ff6f97f0ea4711d03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_asprintf.c                                      :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: cacharle <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2019/11/21 02:30:33 by cacharle          #+#    #+#             */
/*   Updated: 2019/11/21 03:43:08 by cacharle         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "libft.h"

int	ft_asprintf(char **ret, const char *format, ...)
{
	int		vret;
	va_list	ap;

	va_start(ap, format);
	vret = ft_vasprintf(ret, format, ap);
	va_end(ap);
	return (vret);
}