maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
clean_utils.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* clean_utils.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: dmdemirk <dmdemirk@student.42london.c +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2024/09/09 15:40:48 by dmdemirk #+# #+# */
9
/* Updated: 2024/09/09 15:41:11 by dmdemirk ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "
tokens.h
"
14
15
void
free_all_tokes
(
t_token
*tokens);
16
17
void
free_all_tokens
(
t_token
*tokens)
18
{
19
t_token
*temp;
20
21
while
(tokens)
22
{
23
temp = tokens;
24
tokens = tokens->
next
;
25
if
(temp)
26
{
27
if
(temp->
data
)
28
{
29
free(temp->
data
);
30
temp->
data
= NULL;
31
}
32
}
33
free(temp);
34
temp = NULL;
35
}
36
}
free_all_tokes
void free_all_tokes(t_token *tokens)
free_all_tokens
void free_all_tokens(t_token *tokens)
Definition
clean_utils.c:17
s_token
Definition
tokens.h:42
s_token::next
struct s_token * next
Definition
tokens.h:45
s_token::data
char * data
Definition
tokens.h:44
tokens.h
src
utils
clean_utils.c
Generated by
1.9.8