wip builtins: env, exit
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/03 19:14:46 by lperrey #+# #+# */
|
||||
/* Updated: 2021/10/08 03:04:26 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/10/10 03:37:29 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
# include "minishell_structs.h"
|
||||
# include "minishell_macro.h"
|
||||
# include "minishell_term_colors.h"
|
||||
# include "minishell_user_macro.h"
|
||||
# include "minishell_prototypes.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/08 02:59:58 by lperrey #+# #+# */
|
||||
/* Updated: 2021/10/08 09:28:29 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/10/10 08:55:48 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -14,7 +14,11 @@
|
||||
# define MINISHELL_PROTOTYPES_H
|
||||
|
||||
// Init
|
||||
int init(t_all *c);
|
||||
int init(t_all *c, char *envp[]);
|
||||
|
||||
// Builtins
|
||||
int builtin_env(int argc, char *argv[], t_all *c);
|
||||
int builtin_exit(int argc, char *argv[], t_all *c);
|
||||
|
||||
// Generic
|
||||
char *ft_strjoinfree(char *s1, char *s2);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/08 02:35:52 by lperrey #+# #+# */
|
||||
/* Updated: 2021/10/08 18:59:02 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/10/10 05:39:09 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
typedef struct s_all
|
||||
{
|
||||
char **envp;
|
||||
char *prompt_base;
|
||||
char *prompt;
|
||||
} t_all;
|
||||
|
||||
20
headers/minishell_user_macro.h
Normal file
20
headers/minishell_user_macro.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* minishell_user_macro.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/10 03:36:37 by lperrey #+# #+# */
|
||||
/* Updated: 2021/10/10 04:55:46 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef MINISHELL_USER_MACRO_H
|
||||
# define MINISHELL_USER_MACRO_H
|
||||
|
||||
# include "minishell_macro.h"
|
||||
|
||||
# define USER_PROMPT PROMPT_EURO
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user