-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwordexp.h
35 lines (31 loc) · 1.5 KB
/
wordexp.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* wordexp.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbudau <gbudau@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/12/01 21:15:44 by gbudau #+# #+# */
/* Updated: 2021/01/29 14:37:32 by gbudau ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef WORDEXP_H
# define WORDEXP_H
# include "minishell.h"
# include "lexer.h"
# include "env.h"
struct s_unquote
{
char *str;
size_t dst_idx;
size_t src_idx;
};
int word_expansion(t_command *cmd, t_list *environ, int *last_status);
int is_env_format(char c, int flag);
char *env_or_last_status(char *str, size_t *i, t_list *environ,
int last_status);
void remove_quotes(t_list *word_token_list);
t_list *variable_expansion(char **words, t_list *environ, int *last_status);
void word_exp_argv(t_command *cmd, t_list *environ, int *last_status);
int expand_word(char **word, t_list *environ, int *last_status);
#endif