mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
simple_cmd: initial setup of create/destroy functions
This commit is contained in:
parent
6f175dd792
commit
49d7a2b9ff
6 changed files with 96 additions and 3 deletions
28
src/parser/simple_cmd/simple_cmd.c
Normal file
28
src/parser/simple_cmd/simple_cmd.c
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* simple_cmd.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/21 12:30:07 by khais #+# #+# */
|
||||
/* Updated: 2025/02/21 12:36:08 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "simple_cmd.h"
|
||||
#include "libft.h"
|
||||
|
||||
/*
|
||||
** parse a wordlist and yield a simple command
|
||||
*/
|
||||
t_simple_cmd *simple_cmd_from_wordlist(t_wordlist *words)
|
||||
{
|
||||
(void)words;
|
||||
return (ft_calloc(1, sizeof(t_simple_cmd)));
|
||||
}
|
||||
|
||||
void simple_cmd_destroy(t_simple_cmd *cmd)
|
||||
{
|
||||
free(cmd);
|
||||
}
|
||||
25
src/parser/simple_cmd/simple_cmd.h
Normal file
25
src/parser/simple_cmd/simple_cmd.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* simple_cmd.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/21 12:24:57 by khais #+# #+# */
|
||||
/* Updated: 2025/02/21 12:33:00 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef SIMPLE_CMD_H
|
||||
# define SIMPLE_CMD_H
|
||||
|
||||
# include "../wordlist/wordlist.h"
|
||||
|
||||
typedef struct s_simple_cmd
|
||||
{
|
||||
} t_simple_cmd;
|
||||
|
||||
t_simple_cmd *simple_cmd_from_wordlist(t_wordlist *words);
|
||||
void simple_cmd_destroy(t_simple_cmd *cmd);
|
||||
|
||||
#endif
|
||||
|
|
@ -5,8 +5,8 @@
|
|||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/21 12:40:26 by khais #+# #+# */
|
||||
/* Updated: 2025/02/21 12:40:32 by khais ### ########.fr */
|
||||
/* Created: 2025/02/21 12:29:36 by khais #+# #+# */
|
||||
/* Updated: 2025/02/21 12:42:46 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue