minishell/inc/expander.h
whaffman ab72bd5bbb malloc_safe
- add freelist to minishell
- add t_minishell *minishell to all function calling malloc_free
- substituted all malloc calls but the first to malloc_safe
2025-02-25 14:54:17 +01:00

32 lines
1.4 KiB
C

/* ************************************************************************** */
/* */
/* :::::::: */
/* expander.h :+: :+: */
/* +:+ */
/* By: qmennen <qmennen@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/02/18 19:00:51 by qmennen #+# #+# */
/* Updated: 2025/02/25 14:32:18 by whaffman ######## odam.nl */
/* */
/* ************************************************************************** */
#ifndef EXPANDER_H
# define EXPANDER_H
# include "minishell.h"
t_environment *expander_get_var(const char *s, int idx,
t_minishell *minishell);
t_list *expander_parse_variables(const char *s,
t_minishell *minishell);
char *expander_allocate_memory(
t_minishell *minishell,
const char *s,
t_list *variables);
char *expander_parse_string(char *s, t_minishell *minishell);
int expander_character_valid(const char c);
int expander_expand_dollar(char *src, char *dest,
int *j, t_list *variables);
#endif