-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtrie_init.c
More file actions
26 lines (23 loc) · 1.07 KB
/
trie_init.c
File metadata and controls
26 lines (23 loc) · 1.07 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* trie_init.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mihykim <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/14 11:56:48 by mihykim #+# #+# */
/* Updated: 2020/04/17 12:01:53 by mihykim ### ########.fr */
/* */
/* ************************************************************************** */
#include "trie.h"
t_trie *trie_init(void)
{
t_trie *trie;
int i;
if ((trie = malloc(sizeof(t_trie))) == NULL)
return (NULL);
i = 0;
while (i < ALPHABETS)
(*trie)[i++] = 0;
return (trie);
}