Commit 621bc4c4 authored by Gabriel Genois's avatar Gabriel Genois

before leaving

parent 2e4c9891
Pipeline #91 passed with stages
in 56 seconds
......@@ -6,7 +6,7 @@
/* By: ggenois <ggenois@student.le-101.fr> +:+ +: +: +:+ */
/* #+# #+ #+ #+# */
/* Created: 2018/05/19 16:03:09 by ggenois #+# ## ## #+# */
/* Updated: 2018/11/03 22:33:22 by ggenois ### #+. /#+ ###.fr */
/* Updated: 2018/11/04 00:34:52 by ggenois ### #+. /#+ ###.fr */
/* / */
/* / */
/* ************************************************************************** */
......@@ -14,6 +14,7 @@
#include <stdio.h>
#include <stddef.h>
#include <stdint.h>
# include <unistd.h>
int ft_printf(const char *str, ...);
void ft_putstr(char *str);
......@@ -178,8 +179,22 @@ int main(int argc, char **argv)
//i = ft_printf("Je suis un printf");
//i = ft_printf("%.2s is a string", "");
//i = ft_printf("%s is a string", "");
i = printf("%S", L"米");
i = ft_printf("%S", L"米");
i = printf("%ls", L"米");
int *lol;
lol = L"米";
unsigned long long int *te;
//te[0] = '\u7C73';
//te = te + lol;
char *tt;
write(1, "\u7C73", 4);
i = ft_printf("\n%S", L"米");
ft_putchar('\n');
ft_putnbr(i);
}
......
......@@ -19,18 +19,43 @@ t_list *ftpf_lstnew_w(wchar_t *data)
item->content_size = sizeof(wchar_t);
return (item);
}
/*
char *ftpf_convertwchar(wchar_t *input)
{
int nbr;
char *output;
const char prefix = "\\u";
char *tmp;
nbr = (*input);
tmp = ft_itoa_base(nbr, 16);
output = ft_strjoin(prefix, tmp);
free(tmp);
return (output);
}
*/
int ft_lstfromwchar(t_pfdata **dt, wchar_t **item)
{
int ilenght;
int ilenghtbck;
ft_putstr("Entering ft_lstfromwchar");
ilenght = 0;
while ((*item)[ilenght] > 0 && (*item)[ilenght] != L'\0')
//ftpf_convertwchar(&(*item)[0]);
write(1, &(*item)[0], 4);
while ((*item)[ilenght] != L'\0')
{
ft_putstr("T");
ilenght++;
}
ilenghtbck = ilenght;
while (--ilenght)
while (--ilenght > 0)
{
ft_putstr("[--]");
ft_lstadd(&(*dt)->data, ftpf_lstnew_w(&(*item)[ilenght]));
}
......
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