update: changed some stuff
This commit is contained in:
parent
78b9506885
commit
cfbb84c028
10 changed files with 31 additions and 51 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/17 21:43:33 by rparodi #+# #+# */
|
||||
/* Updated: 2024/10/12 17:51:19 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/23 15:33:10 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -58,6 +58,7 @@ t_error listing_files(t_string path, t_vec_str *out)
|
|||
continue ;
|
||||
vec_str_push(&ret, str_clone(entry->d_name));
|
||||
}
|
||||
close_dir(tmp);
|
||||
return (*out = ret, NO_ERROR);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/07 14:13:41 by rparodi #+# #+# */
|
||||
/* Updated: 2024/10/13 17:24:39 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/10/23 15:23:27 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -37,8 +37,7 @@ static void _assign_export(t_usize idx, t_str *arg, void *vctx)
|
|||
hmap_env_insert(ctx->state->env, *arg, NULL);
|
||||
key = str_substring(*arg, 0, first_eq - *arg);
|
||||
value = str_substring(first_eq, 1, ~0llu);
|
||||
if (hmap_env_insert(ctx->state->env, key, value))
|
||||
ctx->err = ERROR;
|
||||
hmap_env_insert(ctx->state->env, key, value);
|
||||
}
|
||||
|
||||
static t_error handle_quotes(t_str raw, t_string *out)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/14 12:34:33 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/10/12 17:51:26 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/23 15:01:54 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -46,12 +46,12 @@ t_error run_list(t_ast_list *list, t_state *state, t_list_result *out)
|
|||
left = -1;
|
||||
right = -1;
|
||||
if (_run_get_exit_code(list->left, state, &left))
|
||||
return (ERROR);
|
||||
left = 127;
|
||||
if ((list->op == AST_LIST_OR && left != 0) || (list->op == AST_LIST_AND
|
||||
&& left == 0))
|
||||
{
|
||||
if (_run_get_exit_code(list->right, state, &right))
|
||||
return (ERROR);
|
||||
right = 127;
|
||||
out->exit = right;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/14 12:35:02 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/10/13 17:24:55 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/10/23 15:31:55 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue