minishell/src/subst/subst.h
2025-03-21 10:11:58 +01:00

36 lines
1.6 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* subst.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jguelen <jguelen@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/23 15:01:40 by jguelen #+# #+# */
/* Updated: 2025/03/14 14:28:20 by jguelen ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SUBST_H
# define SUBST_H
# include "../parser/wordlist/wordlist.h"
# include "../parser/wordlist/wordlist_quicksort.h"
# include "../minishell.h"
# include <dirent.h>
# include <unistd.h>
# include <errno.h>
# define PATH_SIZE_INIT 64
char *expand_question_mark(t_minishell *app);
t_wordlist *wordlist_var_expansion(t_wordlist *list, t_minishell *app);
t_worddesc *word_var_expansion(t_worddesc *word, t_minishell *app);
void build_pattern_checks(char *str, t_worddesc *pattern,
char **pattern_check);
char fits_pattern(char *str, t_worddesc *pattern);
t_wordlist *expand_star(t_worddesc *file_pattern);
char *construct_repeting_char_string(char c, size_t len);
char *ft_get_longest_identifier(char *str);
#endif