"e_quotes_state" redefined in minishell_structs.h
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/10/08 02:35:52 by lperrey #+# #+# */
|
/* Created: 2021/10/08 02:35:52 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/11/25 16:33:56 by hulamy ### ########.fr */
|
/* Updated: 2021/11/26 21:28:55 by lperrey ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -17,7 +17,6 @@ struct s_all *g_all;
|
|||||||
|
|
||||||
enum e_token_id
|
enum e_token_id
|
||||||
{
|
{
|
||||||
T_TOKEN = 0,
|
|
||||||
T_LESS = '<',
|
T_LESS = '<',
|
||||||
T_GREAT = '>',
|
T_GREAT = '>',
|
||||||
T_PIPE = '|',
|
T_PIPE = '|',
|
||||||
@@ -29,6 +28,12 @@ enum e_token_id
|
|||||||
// T_DLESS == '<<'
|
// T_DLESS == '<<'
|
||||||
// T_DGREAT == '>>'
|
// T_DGREAT == '>>'
|
||||||
|
|
||||||
|
enum e_quotes_state
|
||||||
|
{
|
||||||
|
IN_QUOTES = '\'',
|
||||||
|
IN_DQUOTES = '\"'
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct s_token
|
typedef struct s_token
|
||||||
{
|
{
|
||||||
char *content;
|
char *content;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/10/19 08:38:55 by lperrey #+# #+# */
|
/* Created: 2021/10/19 08:38:55 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/10/30 22:35:01 by lperrey ### ########.fr */
|
/* Updated: 2021/11/26 21:02:10 by lperrey ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -14,13 +14,6 @@
|
|||||||
|
|
||||||
int check_operators(t_token *t, char *input, int *i, int *t_i);
|
int check_operators(t_token *t, char *input, int *i, int *t_i);
|
||||||
|
|
||||||
enum e_in_quote_state
|
|
||||||
{
|
|
||||||
NOT_IN = 0,
|
|
||||||
IN_QUOTES = '\'',
|
|
||||||
IN_DQUOTES = '\"'
|
|
||||||
};
|
|
||||||
|
|
||||||
int fill_token(t_token *t, char *input, int *i, int *t_i)
|
int fill_token(t_token *t, char *input, int *i, int *t_i)
|
||||||
{
|
{
|
||||||
static int in_quotes = 0;
|
static int in_quotes = 0;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/11/07 02:01:33 by lperrey #+# #+# */
|
/* Created: 2021/11/07 02:01:33 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/11/11 21:04:41 by lperrey ### ########.fr */
|
/* Updated: 2021/11/26 21:02:20 by lperrey ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -14,13 +14,6 @@
|
|||||||
|
|
||||||
t_list *ft_lstnew_generic(size_t lst_sizse, size_t content_size);
|
t_list *ft_lstnew_generic(size_t lst_sizse, size_t content_size);
|
||||||
|
|
||||||
enum e_in_quote_state
|
|
||||||
{
|
|
||||||
NOT_IN = 0,
|
|
||||||
IN_QUOTES = '\'',
|
|
||||||
IN_DQUOTES = '\"'
|
|
||||||
};
|
|
||||||
|
|
||||||
static t_list *ret_parameter_expansion(char *content, int *i);
|
static t_list *ret_parameter_expansion(char *content, int *i);
|
||||||
|
|
||||||
t_list *expand_token(char *content)
|
t_list *expand_token(char *content)
|
||||||
|
|||||||
@@ -6,19 +6,12 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/11/13 07:08:40 by lperrey #+# #+# */
|
/* Created: 2021/11/13 07:08:40 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/11/13 22:35:34 by lperrey ### ########.fr */
|
/* Updated: 2021/11/26 21:27:10 by lperrey ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "minishell.h"
|
#include "minishell.h"
|
||||||
|
|
||||||
enum e_in_quote_state
|
|
||||||
{
|
|
||||||
NOT_IN = 0,
|
|
||||||
IN_QUOTES = '\'',
|
|
||||||
IN_DQUOTES = '\"'
|
|
||||||
};
|
|
||||||
|
|
||||||
static size_t count_word(char const *s, char c);
|
static size_t count_word(char const *s, char c);
|
||||||
static char **alloc_words(char const *s, char c, char **str_arr,
|
static char **alloc_words(char const *s, char c, char **str_arr,
|
||||||
size_t words_count);
|
size_t words_count);
|
||||||
|
|||||||
@@ -6,18 +6,12 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/11/13 04:35:06 by lperrey #+# #+# */
|
/* Created: 2021/11/13 04:35:06 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/11/14 06:01:45 by lperrey ### ########.fr */
|
/* Updated: 2021/11/26 21:27:05 by lperrey ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "minishell.h"
|
#include "minishell.h"
|
||||||
|
|
||||||
enum e_in_quote_state
|
|
||||||
{
|
|
||||||
NOT_IN = 0,
|
|
||||||
IN_QUOTES = '\'',
|
|
||||||
IN_DQUOTES = '\"'
|
|
||||||
};
|
|
||||||
static int quote_state_change(int *quote_state, const char *s);
|
static int quote_state_change(int *quote_state, const char *s);
|
||||||
|
|
||||||
/* Duplicate a string minus the quoting characters ['] and ["]*/
|
/* Duplicate a string minus the quoting characters ['] and ["]*/
|
||||||
|
|||||||
@@ -6,19 +6,12 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/11/07 02:01:33 by lperrey #+# #+# */
|
/* Created: 2021/11/07 02:01:33 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/11/16 03:45:15 by lperrey ### ########.fr */
|
/* Updated: 2021/11/26 21:05:01 by lperrey ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "minishell.h"
|
#include "minishell.h"
|
||||||
|
|
||||||
enum e_in_quote_state
|
|
||||||
{
|
|
||||||
NOT_IN = 0,
|
|
||||||
IN_QUOTES = '\'',
|
|
||||||
IN_DQUOTES = '\"'
|
|
||||||
};
|
|
||||||
|
|
||||||
t_list *ft_lstnew_generic(size_t lst_sizse, size_t content_size);
|
t_list *ft_lstnew_generic(size_t lst_sizse, size_t content_size);
|
||||||
t_list *expand_token(char *content);
|
t_list *expand_token(char *content);
|
||||||
char *rejoin_after_expand(t_list *expand_lst);
|
char *rejoin_after_expand(t_list *expand_lst);
|
||||||
|
|||||||
Reference in New Issue
Block a user