Commit 37d76772 authored by Gabriel Genois's avatar Gabriel Genois

long int to tmp...dans litoa

parent d8c1e37a
Pipeline #95 passed with stages
in 57 seconds
......@@ -11,7 +11,7 @@
/* / */
/* ************************************************************************** */
#include "../../includes/ft_printf.h"
#include "../../includes/libft.h"
char ftlibc(long signed int i)
{
......@@ -23,7 +23,7 @@ char ftlibc(long signed int i)
char *ft_litoa_base(long signed int nbr, int base)
{
int tmp;
long signed int tmp;
int i;
int mod;
char *str;
......
......@@ -184,7 +184,8 @@ int main(int argc, char **argv)
//i = ft_printf("%.2s is a string", "");
//i = ft_printf("\n%S", NULL);
//i = ft_printf("%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S%S", L"Α α", L"Β β", L"Γ γ", L"Δ δ", L"Ε ε", L"Ζ ζ", L"Η η", L"Θ θ", L"Ι ι", L"Κ κ", L"Λ λ", L"Μ μ", L"Ν ν", L"Ξ ξ", L"Ο ο", L"Π π", L"Ρ ρ", L"Σ σ", L"Τ τ", L"Υ υ", L"Φ φ", L"Χ χ", L"Ψ ψ", L"Ω ω", L"");
i = ft_printf("\n%D", 9223372036854775807);
//i = ft_printf("\n%D", 9223372036854775807);
i = ft_printf("\n%D", 9583444433307);
ft_putchar('\n');
ft_putnbr(i);
}
......
......@@ -89,10 +89,8 @@ char *ftpf_get_n(t_pfdata **dt, va_list *data)
int base;
char *out;
src = NULL;
base = 10;
l = ftpf_getlength(dt);
if (ftpf_istypenum((*dt)->t))
{
if ((*dt)->t == 'o' || (*dt)->t == 'O')
......@@ -110,7 +108,6 @@ char *ftpf_get_n(t_pfdata **dt, va_list *data)
out = ft_strupper(src);
else
out = ft_strdup(src);
if (src)
free(src);
free(src);
return (out);
}
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment