Exemplo n.º 1
0
int	ft_printf(const char *format, ...)
{
	va_list ap;

	va_start(ap, format);
	return (ft_vdprintf(1, format, ap));
}
Exemplo n.º 2
0
int	ft_dprintf(int fd, const char *format, ...)
{
	va_list	ap;
	int		len;

	va_start(ap, format);
	len = ft_vdprintf(fd, format, ap);
	va_end(ap);
	return (len);
}
Exemplo n.º 3
0
** Printf version including 'aAcCdDeEfFgGinoOpsSuUxX' standard conversions
** Non standard conversions are :
** 'bB' for binary and 'r' for non-printable strings (octal form)
** Flags implemented :
** '-+# .hjlz*'
** Include a color format handling (refer to ft_printf.h for details)
** This printf version uses no malloc
*/

int			ft_printf(const char *restrict format, ...)
{
	va_list		ap;
	int			ret;

	va_start(ap, format);
	ret = ft_vdprintf(1, format, ap);
	va_end(ap);
	return (ret);
}

int			ft_dprintf(int fd, const char *restrict format, ...)
{
	va_list		ap;
	int			ret;

	if (fd < 0)
		return (-1);
	va_start(ap, format);
	ret = ft_vdprintf(fd, format, ap);
	va_end(ap);
	return (ret);