mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-13 16:08:45 +02:00
「✏️」 norm: normed project.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/21 11:59:34 by adjoly #+# #+# */
|
||||
/* Updated: 2024/07/17 17:14:35 by adjoly ### ########.fr */
|
||||
/* Updated: 2024/07/18 13:01:49 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
char *go_to_nxt_quote(char *rl, t_quote quote_type)
|
||||
{
|
||||
while (*rl && __is_quote(*rl) != quote_type)
|
||||
while (*rl && __is_quote(*rl) != quote_type)
|
||||
rl++;
|
||||
return (rl);
|
||||
}
|
||||
|
31
src/parsing/check_error/run_checks.c
Normal file
31
src/parsing/check_error/run_checks.c
Normal file
@ -0,0 +1,31 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* run_checks.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/18 13:30:27 by adjoly #+# #+# */
|
||||
/* Updated: 2024/07/18 13:31:33 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "parsing.h"
|
||||
#include "error_msg.h"
|
||||
#include <readline/history.h>
|
||||
|
||||
bool run_checks(char *rl)
|
||||
{
|
||||
if (!*rl)
|
||||
return (true);
|
||||
if (check_space(rl))
|
||||
return (true);
|
||||
add_history(rl);
|
||||
if (check_syntax(rl))
|
||||
return (true);
|
||||
if (check_quote(rl))
|
||||
return (true);
|
||||
if (check_pipe(rl))
|
||||
return (true);
|
||||
return (false);
|
||||
}
|
@ -6,16 +6,13 @@
|
||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/04 15:00:32 by adjoly #+# #+# */
|
||||
/* Updated: 2024/07/17 16:04:23 by adjoly ### ########.fr */
|
||||
/* Updated: 2024/07/18 13:02:26 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "parsing.h"
|
||||
#include "libft.h"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
t_cmd *split_cmd(char *cmd_av, t_cmd *cmd)
|
||||
{
|
||||
char **split;
|
||||
@ -27,6 +24,5 @@ t_cmd *split_cmd(char *cmd_av, t_cmd *cmd)
|
||||
if (!cmd->cmd)
|
||||
return (NULL);
|
||||
cmd->argv = split;
|
||||
printf("%s\n", cmd->cmd);
|
||||
return (cmd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user