update: integrated hashmaps in builtins, and replaced command calls by builtins
This commit is contained in:
@@ -6,33 +6,43 @@
|
||||
/* By: sede-san <sede-san@student.42madrid.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/10/29 22:09:51 by sede-san #+# #+# */
|
||||
/* Updated: 2025/11/02 03:13:46 by sede-san ### ########.fr */
|
||||
/* Updated: 2025/12/01 17:53:57 by sede-san ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef BUILTINS_H
|
||||
# define BUILTINS_H
|
||||
|
||||
# include "libft.h"
|
||||
# include "minishell.h"
|
||||
# include "ft_args.h"
|
||||
|
||||
typedef unsigned char (*t_builtin_func)(t_command cmd, t_minishell *msh);
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Functions */
|
||||
/******************************************************************************/
|
||||
|
||||
// cd.c
|
||||
/* builtins.c */
|
||||
|
||||
extern u_int8_t set_builtins(t_minishell *msh);
|
||||
|
||||
extern u_int8_t is_builtin(const char *command_name, t_minishell *msh);
|
||||
|
||||
/* cd.c */
|
||||
|
||||
extern u_int8_t builtin_cd(t_command cmd, t_minishell *msh);
|
||||
|
||||
// echo.c
|
||||
/* echo.c */
|
||||
|
||||
extern u_int8_t builtin_echo(t_command cmd);
|
||||
extern u_int8_t builtin_echo(t_command cmd, t_minishell *msh);
|
||||
|
||||
// exit.c
|
||||
/* exit.c */
|
||||
|
||||
extern u_int8_t builtin_exit(t_command cmd, t_minishell *msh);
|
||||
|
||||
// pwd.c
|
||||
/* pwd.c */
|
||||
|
||||
extern u_int8_t builtin_pwd(t_command cmd, t_minishell *msh);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user