finally \o/

added ft_printf to libft
finalised ans tested ft_getline
This commit is contained in:
vagrant
2019-03-07 22:29:34 +00:00
parent 55767c36c6
commit 13d96a14d8
18 changed files with 75 additions and 81 deletions

View File

@@ -6,11 +6,11 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/13 12:52:34 by tmaze #+# #+# */
/* Updated: 2019/03/03 17:36:31 by tmaze ### ########.fr */
/* Updated: 2019/03/07 22:23:31 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftprintf.h"
#include "libft.h"
void roundup(char *str, long double n, int i, int prec)
{
@@ -115,7 +115,7 @@ char *handle_output_float(t_conv *field, va_list ap)
nbrstr = getnbrstr(nb, field);
size = set_malloc_sizef(nb, nbrstr, field);
pad = field->str_size - size;
if ((field->str = ft_strnewb(field->str_size)) != NULL)
if ((field->str = ft_strnew(field->str_size)) != NULL)
set_strf(field, nbrstr, nb, pad);
ft_strdel(&nbrstr);
return (field->str);