mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
52 lines
1.7 KiB
C
52 lines
1.7 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* cmdlist_builder.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/02/26 13:50:25 by khais #+# #+# */
|
|
/* Updated: 2025/03/18 15:02:53 by khais ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef CMDLIST_BUILDER_H
|
|
# define CMDLIST_BUILDER_H
|
|
|
|
# include "cmdlist.h"
|
|
|
|
typedef struct s_cmdlist_builder
|
|
{
|
|
/*
|
|
** list of cmds that we are building
|
|
*/
|
|
t_cmdlist *cmdlist;
|
|
/*
|
|
** wordlist for the next pipeline
|
|
*/
|
|
t_wordlist *current_wordlist;
|
|
/*
|
|
** word we are currently examining
|
|
*/
|
|
t_worddesc *current_word;
|
|
/*
|
|
** index of the pipeline that is about to be inserted into the cmdlist
|
|
*/
|
|
int idx;
|
|
/*
|
|
** set to true in an error was encountered that requires stopping the
|
|
** processing.
|
|
*/
|
|
bool error;
|
|
} t_cmdlist_builder;
|
|
|
|
t_cmdlist_builder *setup_cmdlist_builder(
|
|
t_cmdlist_builder *builder,
|
|
t_wordlist **words);
|
|
bool cmdlist_builder_at_last_pipeline(
|
|
t_cmdlist_builder *builder);
|
|
void cmdlist_builder_next_word(
|
|
t_cmdlist_builder *builder,
|
|
t_wordlist **words);
|
|
|
|
#endif // CMDLIST_BUILDER_H
|