SHOW:
|
|
- or go back to the newest paste.
1 | int free_tab(char **tab) | |
2 | { | |
3 | int i; | |
4 | i = 0; | |
5 | ||
6 | while (tab[i]) | |
7 | { | |
8 | free(tab[i]); | |
9 | i++; | |
10 | } | |
11 | free(tab); | |
12 | return (0); | |
13 | } | |
14 | ||
15 | #include "macro.h" | |
16 | void my_exit(char **input) | |
17 | { | |
18 | free_tab(input); | |
19 | exit(0); | |
20 | } | |
21 | ||
22 | - | #ifndef SHELL_H_ |
22 | + | #ifndef MACRO_H_ |
23 | - | #define SHELL_H_ |
23 | + | #define MACRO_H_ |
24 | extern char **environ; | |
25 | typedef struct s_loop | |
26 | { | |
27 | char bool; | |
28 | char *input; | |
29 | } t_loop; |