Skip to content

Commit

Permalink
vcheck for space sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
vctrubio committed Mar 1, 2023
1 parent 9e7822f commit 7ef5a4a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 3 deletions.
Empty file removed lol.c
Empty file.
1 change: 0 additions & 1 deletion lol.c”

This file was deleted.

Binary file modified minishell
Binary file not shown.
Binary file added srcs/.main.c.un~
Binary file not shown.
Binary file added srcs/.parse2.c.un~
Binary file not shown.
2 changes: 1 addition & 1 deletion srcs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void ft_handler(int signum)
if (pid == -1)
{
write(1, "\n", 1);
rl_replace_line("", 0);
// rl_replace_line("", 0);
rl_on_new_line();
rl_redisplay();
}
Expand Down
16 changes: 15 additions & 1 deletion srcs/parse2.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,26 @@ void ft_do_pipe(char **output)
}
}


int vcheck(char *line)
{
while (*line)
{
if (*line > 32 && *line < 127)
return (0);
line++;
}
return (1);
}
int readline_check(char **p2line)
{
char *line;

line = *p2line;
if (vcheck(line))
{
free(*p2line);
return (1);
}
if (ft_strexact("''", line) || ft_strexact("\"\"", line)
|| ft_strexact("..", line) || ft_strexact(".", line))
{
Expand Down
Binary file modified srcs/parse2.o
Binary file not shown.
Binary file modified srcs/piping.o
Binary file not shown.

0 comments on commit 7ef5a4a

Please sign in to comment.