minishell
Minishell Project for École 42
|
Functions used to make sure that the array storing execution commands, stores them correctly after expansion. More...
#include "minishell.h"
Functions | |
char ** | combine_execs (char **resplit, char **new_execs, char **execs) |
Combine resplit array with execs array into new_execs array. | |
int | after_expand (t_executor *current) |
Process the execs array of the current executor node after expansion. | |
bool | check_execs_after_expand (t_shell *shell) |
Checks and processes execution commands after expansion. | |
Functions used to make sure that the array storing execution commands, stores them correctly after expansion.
Functions used to make sure that the array storing execution commands, stores them correctly after expansion.
int after_expand | ( | t_executor * | current | ) |
Process the execs array of the current executor node after expansion.
Takes a node of the executor list, splits its execs array (execution command) and combines the resulting strings with the existing execs array.
[in,out] | current | The current executor node. |
bool check_execs_after_expand | ( | t_shell * | shell | ) |
Checks and processes execution commands after expansion.
Iterates through the executor list ands calls after_expand() on each of the nodes of that list. Retuns true if all processing is successfull, or false if any processing fails.
[in,out] | shell | The main data structure. |
char ** combine_execs | ( | char ** | resplit, |
char ** | new_execs, | ||
char ** | execs | ||
) |
Combine resplit array with execs array into new_execs array.
Takes 2 arrays of strings, 'resplit' and 'execs', combines them into a new array 'new_execs'. Also frees the memory of the input arrays.
[in] | resplit | The first array of strings. |
[in,out] | new_execs | The resulting array of strings after combining. |
[in] | execs | The second array of strings. |