style: noming ast_function2.c

This commit is contained in:
Raphael 2024-09-19 15:32:44 +02:00
parent b8cc83a5c0
commit 70519085be

View file

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vec_ast.c :+: :+: :+: */
/* ast_functions2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/30 17:59:28 by maiboyer #+# #+# */
/* Updated: 2023/12/30 17:59:28 by maiboyer ### ########.fr */
/* Updated: 2024/09/19 15:32:36 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -17,10 +17,10 @@
#include "me/vec/vec_ast.h"
#include <stdlib.h>
t_error vec_ast_find(t_vec_ast *vec,
bool (*fn)(const t_ast_node *), t_usize *index)
t_error vec_ast_find(t_vec_ast *vec, bool (*fn)(\
const t_ast_node *), t_usize *index)
{
t_usize idx;
t_usize idx;
if (vec == NULL || fn == NULL || index == NULL)
return (ERROR);
@ -37,11 +37,10 @@ t_error vec_ast_find(t_vec_ast *vec,
return (ERROR);
}
t_error vec_ast_find_starting(t_vec_ast *vec,
bool (*fn)(const t_ast_node *),
t_usize starting_index, t_usize *index)
t_error vec_ast_find_starting(t_vec_ast *vec, bool (*fn)(\
const t_ast_node *), t_usize starting_index, t_usize *index)
{
t_usize idx;
t_usize idx;
if (vec == NULL || fn == NULL || index == NULL)
return (ERROR);
@ -58,10 +57,10 @@ t_error vec_ast_find_starting(t_vec_ast *vec,
return (ERROR);
}
t_error vec_ast_all(t_vec_ast *vec,
bool (*fn)(const t_ast_node *), bool *result)
t_error vec_ast_all(t_vec_ast *vec, bool (*fn)(\
const t_ast_node *), bool *result)
{
t_usize idx;
t_usize idx;
if (vec == NULL || fn == NULL || result == NULL)
return (ERROR);
@ -76,10 +75,10 @@ t_error vec_ast_all(t_vec_ast *vec,
return (ERROR);
}
t_error vec_ast_any(t_vec_ast *vec,
bool (*fn)(const t_ast_node *), bool *result)
t_error vec_ast_any(t_vec_ast *vec, bool (*fn)(\
const t_ast_node *), bool *result)
{
t_usize idx;
t_usize idx;
if (vec == NULL || fn == NULL || result == NULL)
return (ERROR);
@ -94,15 +93,13 @@ t_error vec_ast_any(t_vec_ast *vec,
return (ERROR);
}
void vec_ast_iter(t_vec_ast *vec,
void (*fn)(t_usize index, t_ast_node *value,
void *state),
void *state)
void vec_ast_iter(t_vec_ast *vec, void (*fn)(\
t_usize index, t_ast_node *value, void *state), void *state)
{
t_usize idx;
t_usize idx;
if (vec == NULL || fn == NULL)
return;
return ;
idx = 0;
while (idx < vec->len)
{