Minishell
 
Loading...
Searching...
No Matches
env.h File Reference
#include "garbage.h"
#include "libft.h"
#include <stddef.h>
Include dependency graph for env.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  s_env_vars
 
struct  s_var
 
struct  s_params
 
struct  s_vars
 
struct  s_supp
 

Macros

#define DEFAULT_PROMPT   "Minishell$ "
 
#define PROMPT_COLOR   1
 
#define COLOR_OFF   "\033[0m"
 
#define CYAN_COLOR   "\033[0;36m"
 
#define PURPLE_COLOR   "\033[0;35m"
 

Typedefs

typedef struct s_vars t_vars
 
typedef struct s_supp t_supp
 

Functions

int check_args_export (const char *str)
 
size_t ft_strlen_choose_c (const char *str, char c)
 
int ft_strcmp (const char *s1, const char *s2)
 
void print_env_vars (t_env_vars *env)
 
t_bool detect_equal (char *str)
 
char ** build_elements (char *str)
 
t_env_varsinit_env (char **envp)
 
t_env_varscopy_env (t_garbage *garbage, t_env_vars *env)
 
void set_env (t_data *data, char *envp[])
 
void sort_ascii_order (t_garbage *garbage, t_env_vars *env)
 
char * search_env_str (t_garbage *garbage, t_env_vars *env, const char *var, size_t size)
 
t_varsearch_env_var (t_env_vars *env, char *var)
 
int count_env (t_env_vars env)
 
void update_shlvl (t_garbage *garbage, t_env_vars *env)
 
char ** env_to_array (t_data *data)
 
char * create_str_with_params (t_garbage *garbage, t_params *params)
 
t_paramsget_param (t_garbage *garbage, char *content, size_t detect_equal)
 
t_paramsft_paramlast (t_params *params)
 
void replace_param (t_garbage *garbage, t_var *var, char *new_content, size_t equal)
 
void ft_paramsadd_back (t_params **params, t_params *new)
 
void print_export (t_env_vars *env)
 
t_varft_varlast (t_var *var)
 
t_varget_var (t_garbage *garbage, const char *var)
 
void ft_varsadd_back (t_var **var, t_var *new)
 
void ft_varsadd_front (t_var **head, t_var *new)
 
void supp_var (t_garbage *garbage, t_var **head, char *str)
 
void swap_vars (t_garbage *garbage, t_var **head, char *str, char *str_1)
 
void bubble_sort (t_garbage *garbage, t_var **head)
 
void free_params (t_garbage *garbage, t_params *element)
 
void free_env (t_garbage *garbage, t_env_vars *env)
 

Macro Definition Documentation

◆ COLOR_OFF

#define COLOR_OFF   "\033[0m"

◆ CYAN_COLOR

#define CYAN_COLOR   "\033[0;36m"

◆ DEFAULT_PROMPT

#define DEFAULT_PROMPT   "Minishell$ "

◆ PROMPT_COLOR

#define PROMPT_COLOR   1

◆ PURPLE_COLOR

#define PURPLE_COLOR   "\033[0;35m"

Typedef Documentation

◆ t_supp

typedef struct s_supp t_supp

◆ t_vars

typedef struct s_vars t_vars

Function Documentation

◆ bubble_sort()

void bubble_sort ( t_garbage * garbage,
t_var ** head )
Here is the call graph for this function:

◆ build_elements()

char ** build_elements ( char * str)
Here is the call graph for this function:

◆ check_args_export()

int check_args_export ( const char * str)

◆ copy_env()

t_env_vars * copy_env ( t_garbage * garbage,
t_env_vars * env )
Here is the call graph for this function:

◆ count_env()

int count_env ( t_env_vars env)
Here is the call graph for this function:

◆ create_str_with_params()

char * create_str_with_params ( t_garbage * garbage,
t_params * params )
Here is the call graph for this function:

◆ detect_equal()

t_bool detect_equal ( char * str)

◆ env_to_array()

char ** env_to_array ( t_data * data)
Here is the call graph for this function:

◆ free_env()

void free_env ( t_garbage * garbage,
t_env_vars * env )
Here is the call graph for this function:

◆ free_params()

void free_params ( t_garbage * garbage,
t_params * element )
Here is the call graph for this function:

◆ ft_paramlast()

t_params * ft_paramlast ( t_params * params)

◆ ft_paramsadd_back()

void ft_paramsadd_back ( t_params ** params,
t_params * new )
Here is the call graph for this function:

◆ ft_strcmp()

int ft_strcmp ( const char * s1,
const char * s2 )

◆ ft_strlen_choose_c()

size_t ft_strlen_choose_c ( const char * str,
char c )

◆ ft_varlast()

t_var * ft_varlast ( t_var * var)

◆ ft_varsadd_back()

void ft_varsadd_back ( t_var ** var,
t_var * new )
Here is the call graph for this function:

◆ ft_varsadd_front()

void ft_varsadd_front ( t_var ** head,
t_var * new )

◆ get_param()

t_params * get_param ( t_garbage * garbage,
char * content,
size_t detect_equal )
Here is the call graph for this function:

◆ get_var()

t_var * get_var ( t_garbage * garbage,
const char * var )
Here is the call graph for this function:

◆ init_env()

t_env_vars * init_env ( char ** envp)

◆ print_env_vars()

void print_env_vars ( t_env_vars * env)

◆ print_export()

void print_export ( t_env_vars * env)

◆ replace_param()

void replace_param ( t_garbage * garbage,
t_var * var,
char * new_content,
size_t equal )
Here is the call graph for this function:

◆ search_env_str()

char * search_env_str ( t_garbage * garbage,
t_env_vars * env,
const char * var,
size_t size )
Here is the call graph for this function:

◆ search_env_var()

t_var * search_env_var ( t_env_vars * env,
char * var )
Here is the call graph for this function:

◆ set_env()

void set_env ( t_data * data,
char * envp[] )
Here is the call graph for this function:

◆ sort_ascii_order()

void sort_ascii_order ( t_garbage * garbage,
t_env_vars * env )
Here is the call graph for this function:

◆ supp_var()

void supp_var ( t_garbage * garbage,
t_var ** head,
char * str )
Here is the call graph for this function:

◆ swap_vars()

void swap_vars ( t_garbage * garbage,
t_var ** head,
char * str,
char * str_1 )
Here is the call graph for this function:

◆ update_shlvl()

void update_shlvl ( t_garbage * garbage,
t_env_vars * env )
Here is the call graph for this function: