-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_mini.h
More file actions
75 lines (69 loc) · 2.32 KB
/
ft_mini.h
File metadata and controls
75 lines (69 loc) · 2.32 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_mini.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ichemenc <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/04/13 18:52:14 by ichemenc #+# #+# */
/* Updated: 2017/04/13 20:01:19 by ichemenc ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_MINI_H
# define FT_MINI_H
# define EXIT_SUCCESS 0
# define EXIT_FAILURE 1
# include "libft/includes/libft.h"
# include <stdio.h>
# include <sys/wait.h>
# include <unistd.h>
# include <stdlib.h>
# include <string.h>
# include <signal.h>
# include <dirent.h>
# include <sys/stat.h>
typedef struct s_env
{
char *name;
char *value;
struct s_env *next;
} t_env;
extern int g_sigint;
extern int g_semi;
extern int g_buffsize;
extern t_env *g_envlist;
extern char **g_env;
void ft_newenv(void);
void sighandler();
void sh_loop(void);
t_env *ft_envpath(char **str);
t_env *ft_create(char *str);
char *lsh_read_line(void);
int ft_exit_fail(void);
char **lsh_split_line(char *line);
char *ft_realloc(char *str);
char ft_getchar(void);
int lsh_launch(char **args);
int lsh_execute(char **args);
void ft_exec(char **args);
int lsh_num_builtins(void);
char *ft_cmd(char *str);
char **ft_expath(void);
int lsh_cd(char **args);
int lsh_env();
int lsh_setenv(char **args);
int ft_changenv(t_env *ptr, char **args);
void ft_addenv(t_env *ptr, char **args);
int lsh_unsetenv(char **args);
int ft_firgl(char **args);
int lsh_echo(char **args);
void ft_printdol(char **args);
int lsh_help();
int lsh_exit();
void ft_setpwd(void);
void ft_setoldpwd(void);
void ft_gohome(void);
void ft_goback(void);
void ft_gotto(char *str);
char *ft_line(char *str);
#endif