Skip to content

Commit

Permalink
make cleaning. gotta love hugo
Browse files Browse the repository at this point in the history
  • Loading branch information
vctrubio committed Jan 11, 2023
1 parent d6c2227 commit eeae38b
Show file tree
Hide file tree
Showing 82 changed files with 12 additions and 172 deletions.
Binary file added .DS_Store
Binary file not shown.
Binary file modified lib/libft.a
Binary file not shown.
Binary file modified lib/srcs/ft_atoi.o
Binary file not shown.
Binary file modified lib/srcs/ft_bzero.o
Binary file not shown.
Binary file modified lib/srcs/ft_c_counter.o
Binary file not shown.
Binary file modified lib/srcs/ft_calloc.o
Binary file not shown.
Binary file modified lib/srcs/ft_d_counter.o
Binary file not shown.
Binary file modified lib/srcs/ft_is_n_o_a.o
Binary file not shown.
Binary file modified lib/srcs/ft_isalpha.o
Binary file not shown.
Binary file modified lib/srcs/ft_isascii.o
Binary file not shown.
Binary file modified lib/srcs/ft_isdigit.o
Binary file not shown.
Binary file modified lib/srcs/ft_isprint.o
Binary file not shown.
Binary file modified lib/srcs/ft_isspace.o
Binary file not shown.
Binary file modified lib/srcs/ft_isupper.o
Binary file not shown.
Binary file modified lib/srcs/ft_memccpy.o
Binary file not shown.
Binary file modified lib/srcs/ft_memchr.o
Binary file not shown.
Binary file modified lib/srcs/ft_memcmp.o
Binary file not shown.
Binary file modified lib/srcs/ft_memcpy.o
Binary file not shown.
Binary file modified lib/srcs/ft_memmove.o
Binary file not shown.
Binary file modified lib/srcs/ft_memset.o
Binary file not shown.
Binary file modified lib/srcs/ft_putchar.o
Binary file not shown.
Binary file modified lib/srcs/ft_putstr.o
Binary file not shown.
Binary file modified lib/srcs/ft_realloc.o
Binary file not shown.
Binary file modified lib/srcs/ft_str_offset.o
Binary file not shown.
Binary file modified lib/srcs/ft_stradd.o
Binary file not shown.
Binary file modified lib/srcs/ft_strchr.o
Binary file not shown.
Binary file modified lib/srcs/ft_strclr.o
Binary file not shown.
Binary file modified lib/srcs/ft_strcpy.o
Binary file not shown.
Binary file modified lib/srcs/ft_strdup.o
Binary file not shown.
Binary file modified lib/srcs/ft_strexact.o
Binary file not shown.
Binary file modified lib/srcs/ft_strexist.o
Binary file not shown.
Binary file modified lib/srcs/ft_strfree.o
Binary file not shown.
Binary file modified lib/srcs/ft_strjoin.o
Binary file not shown.
Binary file modified lib/srcs/ft_strlen.o
Binary file not shown.
Binary file modified lib/srcs/ft_strncmp.o
Binary file not shown.
Binary file modified lib/srcs/ft_strnew.o
Binary file not shown.
Binary file modified lib/srcs/ft_strnstr.o
Binary file not shown.
Binary file modified lib/srcs/ft_strsplit.o
Binary file not shown.
Binary file modified lib/srcs/ft_substr.o
Binary file not shown.
Binary file modified lib/srcs/ft_tolower.o
Binary file not shown.
Binary file modified lib/srcs/ft_toupper.o
Binary file not shown.
Binary file modified lib/srcs/ft_validnl.o
Binary file not shown.
Binary file modified lib/srcs/ft_wrdcnt.o
Binary file not shown.
Binary file modified lib/srcs/gnl.o
Binary file not shown.
Binary file modified minishell
100644 → 100755
Binary file not shown.
104 changes: 0 additions & 104 deletions srcs/built_ins_background.c

This file was deleted.

57 changes: 0 additions & 57 deletions srcs/built_ins_background2.c

This file was deleted.

Binary file added srcs/builtins.o
Binary file not shown.
Binary file added srcs/builtins_background.o
Binary file not shown.
Binary file added srcs/builtins_background2.o
Binary file not shown.
Binary file added srcs/builtins_checkers.o
Binary file not shown.
Binary file added srcs/builtins_runners.o
Binary file not shown.
Binary file modified srcs/cmd_build.o
Binary file not shown.
Binary file modified srcs/cmd_build2.o
Binary file not shown.
Binary file modified srcs/concat.o
Binary file not shown.
Binary file added srcs/create_files.o
Binary file not shown.
Binary file modified srcs/error.o
Binary file not shown.
Binary file modified srcs/exec.o
Binary file not shown.
Binary file modified srcs/free.o
Binary file not shown.
Binary file modified srcs/heredoc.o
Binary file not shown.
Binary file modified srcs/hg_loop.o
Binary file not shown.
Binary file modified srcs/initializers.o
Binary file not shown.
Binary file modified srcs/loop.o
Binary file not shown.
Binary file modified srcs/loop_new.o
Binary file not shown.
Binary file modified srcs/loop_utils.o
Binary file not shown.
Binary file modified srcs/main.o
Binary file not shown.
Binary file modified srcs/matrix_fts.o
Binary file not shown.
Binary file modified srcs/matrix_utils.o
Binary file not shown.
Binary file modified srcs/parse.o
Binary file not shown.
Binary file modified srcs/parse2.o
Binary file not shown.
Binary file modified srcs/parse_clean.o
Binary file not shown.
Binary file modified srcs/parse_env.o
Binary file not shown.
Binary file modified srcs/path.o
Binary file not shown.
Binary file modified srcs/prompt.o
Binary file not shown.
Binary file modified srcs/shell.o
Binary file not shown.
Binary file modified srcs/utils2.o
Binary file not shown.
Binary file modified srcs/utils_array.o
Binary file not shown.
Binary file modified srcs/utils_fd.o
Binary file not shown.
Binary file modified srcs/utils_parsing.o
Binary file not shown.
23 changes: 12 additions & 11 deletions srcs/validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@

#include "../include/minishell.h"

static void ft_validate_pipe_matrix(char **line, int i)
static void ft_validate_pipe_matrix(char **line, int i, int j)
{
if (i == 0 && j == 0)
_shell()->valid_input = false;
if (line[i + 1] && line[i + 1][0] == '|')
_shell()->valid_input = false;
if (line[i])
{
if (line[i][1])
Expand All @@ -22,6 +26,10 @@ static void ft_validate_pipe_matrix(char **line, int i)
_shell()->valid_input = false;
}
}
if (line[i + 1] == NULL)
{
_shell()->valid_input = false;
}
}

static void ft_validate_redir_output_matrix(char **line, int i)
Expand Down Expand Up @@ -52,8 +60,8 @@ void validate_rl(char **matrix)
int j;
char c;

i = 0;
while (matrix[i])
i = -1;
while (matrix[++i])
{
j = -1;
while (matrix[i][++j])
Expand All @@ -65,18 +73,11 @@ void validate_rl(char **matrix)
j++;
}
if (matrix[i][j] == '|')
{
if (i == 0 && j == 0)
_shell()->valid_input = false;
if (matrix[i + 1] && matrix[i + 1][0] == '|')
_shell()->valid_input = false;
ft_validate_pipe_matrix(matrix, i);
}
ft_validate_pipe_matrix(matrix, i, j);
if (matrix[i][j] == '>')
ft_validate_redir_output_matrix(matrix, i);
if (matrix[i][j] == '<')
ft_validate_redir_input_matrix(matrix, i);
}
i++;
}
}
Binary file modified srcs/validation.o
Binary file not shown.
Binary file modified srcs/var_expansion.o
Binary file not shown.

0 comments on commit eeae38b

Please sign in to comment.