norminette: split parse_command.c

This commit is contained in:
mcolonna 2024-06-27 14:53:45 +02:00
parent f144aa5b6a
commit 6b2360ab6b
17 changed files with 622 additions and 411 deletions

View file

@ -6,7 +6,7 @@
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
/* Updated: 2024/06/18 13:53:15 by mcolonna ### ########.fr */
/* Updated: 2024/06/27 13:48:28 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -32,6 +32,7 @@
# include "libtf.h"
# include "main.h"
# include "variables.h"
# include "cool_readline.h"
# include "ask_command.h"
# include "parse_command.h"

View file

@ -6,7 +6,7 @@
/* By: jschaft <cecile.schaft@orange.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/23 14:15:12 by mcolonna #+# #+# */
/* Updated: 2024/06/25 15:43:15 by mcolonna ### ########.fr */
/* Updated: 2024/06/27 13:47:56 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,12 +15,6 @@
# include "include.h"
typedef struct s_variable
{
const char *name;
const char *value;
} t_variable;
// Represents a call to a program (the program name and its arguments)
typedef struct s_call
{

28
include/variables.h Normal file
View file

@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* variables.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/27 13:43:21 by mcolonna #+# #+# */
/* Updated: 2024/06/27 14:43:36 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef VARIABLES_H
# define VARIABLES_H
typedef struct s_variable
{
const char *name;
const char *value;
} t_variable;
// Set a variable to a new value.
void variables_set(t_list *variables, const t_variable var);
// Get the value of a variable from its name.
const char *variables_get(t_list *variables, const char *name);
#endif