Minishell
Loading...
Searching...
No Matches
env.c File Reference
#include <stdlib.h>
#include <string.h>
#include "../../include/utils.h"
#include "../../include/main.h"
#include "../../include/env.h"
Include dependency graph for env.c:

Functions

bool valid_path (char *path)
 
int fill_env (data_t *data, char **env)
 
env_node_tfind_env (data_t *data, char *name)
 
int free_env (data_t *data)
 

Function Documentation

◆ fill_env()

int fill_env ( data_t * data,
char ** env )

This function will save the env array in a linked list and then convert it to an array again to have a duplicated that can be modified

Parameters
dataGlobal program structure
envThe env received as params in main
Returns
0 means everything OK. 84 when error ocurred
Here is the call graph for this function:

◆ find_env()

env_node_t * find_env ( data_t * data,
char * name )
Here is the call graph for this function:

◆ free_env()

int free_env ( data_t * data)
Here is the call graph for this function:

◆ valid_path()

bool valid_path ( char * path)