-
Notifications
You must be signed in to change notification settings - Fork 0
/
libft.h
50 lines (43 loc) · 1.68 KB
/
libft.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* ************************************************************************** */
/* LE - / */
/* / */
/* libft.h .:: .:/ . .:: */
/* +:+:+ +: +: +:+:+ */
/* By: jfrankow <jfrankow@student.le-101.fr> +:+ +: +: +:+ */
/* #+# #+ #+ #+# */
/* Created: 2018/10/06 18:19:58 by jfrankow #+# ## ## #+# */
/* Updated: 2018/10/06 18:19:58 by jfrankow ### #+. /#+ ###.fr */
/* / */
/* / */
/* ************************************************************************** */
#ifndef LIBFT_H
# define LIBFT_H
# include <stdint.h>
# include <string.h>
# include <stdlib.h>
# include <unistd.h>
# include <time.h>
# define PRINT_BUF_SIZE 65536
# define TAB_LEN 32768
typedef struct s_tab
{
char *key;
char *data;
struct s_tab *next;
} t_tab;
char *g_buf;
char *g_buf_ptr;
size_t g_buf_size;
char g_print_buf[PRINT_BUF_SIZE];
size_t g_print_buf_size;
t_tab g_tab[TAB_LEN];
void *ft_memcpy(void *dst, const void *src, size_t n);
int keycmp(const char *key1, const char *key2, uint8_t key1_len);
void free_tab();
void print(char *str, size_t n);
void print_flush();
void print_data(char *data, uint8_t length);
void ft_read_all(int fd);
int treat_dict();
int cheat();
#endif