- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
Other useful utils
        Ilya Kashnitskiy edited this page Feb 17, 2020 
        ·
        5 revisions
      
    Separate school 42 project.
Сlone standard getline() from libc.
Implementation of gnl for read from stdin only and with high performance!
Separate school 42 project.
The following functionality is implemented:
%%- standart qualifiers (
%): c,s,p - standart qualifiers (
%): i,d,u,o,x,X with flags: l,ll,h,hh - standart qualifiers (
%): f,e,E with flags: l,L - manage the flags #0-+ and space
 - manage the minimum field-width
 - manage the manage the precision
 - detailed flags management: *, $ and ’
 
$doesn't work withlong doubleif it is not in the last place.
- 
additional qualifiers (
%): b (for binary output), w (for output in fd like dprintf()), y (for output in buffer like snprintf()); - 
output buffer
 
My own implementation of quicksort (aka qsort() from libc).
Function for print memory (like xxd cmd in unix).
- Example
 
#include <libft.h>
typedef struct	s_test
{
	float	f;
	int		d;
	char	c1;
	char	c2;
	char	str[16];
}		t_test;
void	test()
{
	t_test	mem;
	mem.f = -1.25;
	mem.d = 123456789;
	mem.c1 = 'Q';
	mem.c2 = '@';
	ft_memcpy(&mem.str, "qwerty9417zhLF[", 16);
	ft_print_memory(&mem, sizeof(t_test));
}
int	main(void)
{
	ft_memman_init();
	test();
	ft_force_buff();
	ft_memman_clean();
	return (0);
}
- Output
 
>./test/test
0000 a0bf 15cd 5b07 5140 7177 6572 7479 ......[.Q@qwerty
3934 3137 7a68 4c46 5b00 9d58           9417zhLF[..X