update: Updated stuff so the scanner works great now
This commit is contained in:
parent
88c34b3904
commit
475038e2b7
21 changed files with 787 additions and 340 deletions
|
|
@ -9,11 +9,11 @@ me_alloc/merge_blocks \
|
|||
me_alloc/pages \
|
||||
me_alloc/realloc \
|
||||
vg/dummy_block \
|
||||
vg/dummy_mem_status \
|
||||
vg/dummy_mempool \
|
||||
vg/dummy_mempool_bis \
|
||||
vg/dummy_mem_status \
|
||||
vg/valgrind_block \
|
||||
vg/valgrind_mem_status \
|
||||
vg/valgrind_mempool \
|
||||
vg/valgrind_mempool_bis \
|
||||
vg/valgrind_mem_status \
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
SRC_FILES = \
|
||||
_here_doc \
|
||||
_not_done_boucle_print \
|
||||
_not_done_function \
|
||||
_not_done_scripting_print \
|
||||
ast_alloc/ast_alloc \
|
||||
ast_alloc/ast_alloc_scripting \
|
||||
ast_free/ast_free \
|
||||
|
|
@ -17,10 +21,6 @@ from_node/node_utils2 \
|
|||
from_node/redirect_node \
|
||||
from_node/scripting_node \
|
||||
from_node/string_node \
|
||||
_here_doc \
|
||||
_not_done_boucle_print \
|
||||
_not_done_function \
|
||||
_not_done_scripting_print \
|
||||
print_ast/ast_print \
|
||||
print_ast/ast_print_arithmetic \
|
||||
print_ast/ast_print_command \
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
SRC_FILES = \
|
||||
builtins/cd \
|
||||
builtins/_debug \
|
||||
builtins/cd \
|
||||
builtins/echo \
|
||||
builtins/env \
|
||||
builtins/exit \
|
||||
builtins/export \
|
||||
builtins/pwd \
|
||||
builtins/unset \
|
||||
run_arithmetic/arithmetic \
|
||||
run_arithmetic/arithmetic_operation \
|
||||
run_arithmetic/_get_op \
|
||||
run_arithmetic/operator_bis \
|
||||
run_arithmetic/_run_arith \
|
||||
run_arithmetic/_to_ast_node \
|
||||
run_arithmetic/arithmetic \
|
||||
run_arithmetic/arithmetic_operation \
|
||||
run_arithmetic/operator_bis \
|
||||
run_ast \
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ SRC_FILES = \
|
|||
line \
|
||||
line_edit_actions \
|
||||
line_edit_actions2 \
|
||||
line_editing \
|
||||
line_editing2 \
|
||||
line_edit_mode \
|
||||
line_edit_mode_interal \
|
||||
line_edit_mode_specific_key \
|
||||
line_editing \
|
||||
line_editing2 \
|
||||
line_globals \
|
||||
line_history \
|
||||
line_internals \
|
||||
|
|
|
|||
|
|
@ -65,11 +65,9 @@ t_error vec_ast_pop(t_vec_ast *vec, t_ast_node *value)
|
|||
t_ast_node temp_value;
|
||||
t_ast_node *ptr;
|
||||
|
||||
if (vec == NULL)
|
||||
if (vec == NULL || vec->len == 0)
|
||||
return (ERROR);
|
||||
ptr = value;
|
||||
if (vec->len == 0)
|
||||
return (ERROR);
|
||||
if (value == NULL)
|
||||
ptr = &temp_value;
|
||||
vec->len--;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
|
||||
t_ast_node *vec_ast_get(t_vec_ast *vec, t_usize i)
|
||||
{
|
||||
if (vec == NULL || vec->len >= i)
|
||||
if (vec == NULL || vec->buffer == NULL)
|
||||
return (NULL);
|
||||
if (i < vec->len)
|
||||
return (&vec->buffer[i]);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
t_ast_node *vec_ast_last(t_vec_ast *vec)
|
||||
|
|
|
|||
|
|
@ -65,11 +65,9 @@ t_error vec_estr_pop(t_vec_estr *vec, t_expandable_str *value)
|
|||
t_expandable_str temp_value;
|
||||
t_expandable_str *ptr;
|
||||
|
||||
if (vec == NULL)
|
||||
if (vec == NULL || vec->len == 0)
|
||||
return (ERROR);
|
||||
ptr = value;
|
||||
if (vec->len == 0)
|
||||
return (ERROR);
|
||||
if (value == NULL)
|
||||
ptr = &temp_value;
|
||||
vec->len--;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
|
||||
t_expandable_str *vec_estr_get(t_vec_estr *vec, t_usize i)
|
||||
{
|
||||
if (vec == NULL || vec->len >= i)
|
||||
if (vec == NULL || vec->buffer == NULL)
|
||||
return (NULL);
|
||||
if (i < vec->len)
|
||||
return (&vec->buffer[i]);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
t_expandable_str *vec_estr_last(t_vec_estr *vec)
|
||||
|
|
|
|||
|
|
@ -65,11 +65,9 @@ t_error vec_heredoc_pop(t_vec_heredoc *vec, t_heredoc *value)
|
|||
t_heredoc temp_value;
|
||||
t_heredoc *ptr;
|
||||
|
||||
if (vec == NULL)
|
||||
if (vec == NULL || vec->len == 0)
|
||||
return (ERROR);
|
||||
ptr = value;
|
||||
if (vec->len == 0)
|
||||
return (ERROR);
|
||||
if (value == NULL)
|
||||
ptr = &temp_value;
|
||||
vec->len--;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
|
||||
t_heredoc *vec_heredoc_get(t_vec_heredoc *vec, t_usize i)
|
||||
{
|
||||
if (vec == NULL || vec->len >= i)
|
||||
if (vec == NULL || vec->buffer == NULL)
|
||||
return (NULL);
|
||||
if (i < vec->len)
|
||||
return (&vec->buffer[i]);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
t_heredoc *vec_heredoc_last(t_vec_heredoc *vec)
|
||||
|
|
|
|||
|
|
@ -65,11 +65,9 @@ t_error vec_pid_pop(t_vec_pid *vec, t_pid *value)
|
|||
t_pid temp_value;
|
||||
t_pid *ptr;
|
||||
|
||||
if (vec == NULL)
|
||||
if (vec == NULL || vec->len == 0)
|
||||
return (ERROR);
|
||||
ptr = value;
|
||||
if (vec->len == 0)
|
||||
return (ERROR);
|
||||
if (value == NULL)
|
||||
ptr = &temp_value;
|
||||
vec->len--;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
|
||||
t_pid *vec_pid_get(t_vec_pid *vec, t_usize i)
|
||||
{
|
||||
if (vec == NULL || vec->len >= i)
|
||||
if (vec == NULL || vec->buffer == NULL)
|
||||
return (NULL);
|
||||
if (i < vec->len)
|
||||
return (&vec->buffer[i]);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
t_pid *vec_pid_last(t_vec_pid *vec)
|
||||
|
|
|
|||
|
|
@ -65,11 +65,9 @@ t_error vec_str_pop(t_vec_str *vec, t_str *value)
|
|||
t_str temp_value;
|
||||
t_str *ptr;
|
||||
|
||||
if (vec == NULL)
|
||||
if (vec == NULL || vec->len == 0)
|
||||
return (ERROR);
|
||||
ptr = value;
|
||||
if (vec->len == 0)
|
||||
return (ERROR);
|
||||
if (value == NULL)
|
||||
ptr = &temp_value;
|
||||
vec->len--;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
|
||||
t_str *vec_str_get(t_vec_str *vec, t_usize i)
|
||||
{
|
||||
if (vec == NULL || vec->len >= i)
|
||||
if (vec == NULL || vec->buffer == NULL)
|
||||
return (NULL);
|
||||
if (i < vec->len)
|
||||
return (&vec->buffer[i]);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
t_str *vec_str_last(t_vec_str *vec)
|
||||
|
|
|
|||
|
|
@ -65,11 +65,9 @@ t_error vec_subtree_pop(t_vec_subtree *vec, t_subtree *value)
|
|||
t_subtree temp_value;
|
||||
t_subtree *ptr;
|
||||
|
||||
if (vec == NULL)
|
||||
if (vec == NULL || vec->len == 0)
|
||||
return (ERROR);
|
||||
ptr = value;
|
||||
if (vec->len == 0)
|
||||
return (ERROR);
|
||||
if (value == NULL)
|
||||
ptr = &temp_value;
|
||||
vec->len--;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
|
||||
t_subtree *vec_subtree_get(t_vec_subtree *vec, t_usize i)
|
||||
{
|
||||
if (vec == NULL || vec->len >= i)
|
||||
if (vec == NULL || vec->buffer == NULL)
|
||||
return (NULL);
|
||||
if (i < vec->len)
|
||||
return (&vec->buffer[i]);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
t_subtree *vec_subtree_last(t_vec_subtree *vec)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -35,10 +35,10 @@ fs/fs_internal \
|
|||
fs/getters \
|
||||
fs/putfd \
|
||||
gnl/get_next_line \
|
||||
hash/hasher \
|
||||
hash/hash_signed \
|
||||
hash/hash_str \
|
||||
hash/hash_unsigned \
|
||||
hash/hasher \
|
||||
hash/sip/sip13 \
|
||||
hash/sip/sip_utils \
|
||||
hash/sip/sip_utils2 \
|
||||
|
|
@ -86,10 +86,6 @@ printf/printf \
|
|||
printf/printf_fd \
|
||||
printf/printf_str \
|
||||
printf/vprintf \
|
||||
string/mod \
|
||||
string/string_insert \
|
||||
string/string_remove \
|
||||
string/string_reserve \
|
||||
str/str_clone \
|
||||
str/str_compare \
|
||||
str/str_find_chr \
|
||||
|
|
@ -106,6 +102,10 @@ str/str_n_find_str \
|
|||
str/str_split \
|
||||
str/str_substring \
|
||||
str/str_trim \
|
||||
string/mod \
|
||||
string/string_insert \
|
||||
string/string_remove \
|
||||
string/string_reserve \
|
||||
|
||||
GEN_FILES = \
|
||||
convert/i16_to_str \
|
||||
|
|
|
|||
|
|
@ -65,11 +65,9 @@ t_error vec_C__PREFIX___pop(t_vec_C__PREFIX__ *vec, C__TYPENAME__ *value)
|
|||
C__TYPENAME__ temp_value;
|
||||
C__TYPENAME__ *ptr;
|
||||
|
||||
if (vec == NULL)
|
||||
if (vec == NULL || vec->len == 0)
|
||||
return (ERROR);
|
||||
ptr = value;
|
||||
if (vec->len == 0)
|
||||
return (ERROR);
|
||||
if (value == NULL)
|
||||
ptr = &temp_value;
|
||||
vec->len--;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
|
||||
C__TYPENAME__ *vec_C__PREFIX___get(t_vec_C__PREFIX__ *vec, t_usize i)
|
||||
{
|
||||
if (vec == NULL || vec->len >= i)
|
||||
if (vec == NULL || vec->buffer == NULL)
|
||||
return (NULL);
|
||||
if (i < vec->len)
|
||||
return (&vec->buffer[i]);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
C__TYPENAME__ *vec_C__PREFIX___last(t_vec_C__PREFIX__ *vec)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
make && valgrind --leak-check=full --show-leak-kinds=none --track-origins=yes --track-fds=yes --trace-children=yes --read-var-info=yes --read-inline-info=yes ./minishell <<<'cat <<EOF
|
||||
make && valgrind --leak-check=full --show-leak-kinds=none --track-origins=yes --track-fds=yes --trace-children=yes --read-var-info=yes --read-inline-info=yes ./minishell <<<'cat <<EOF | xargs printf "\x1b[32m%s \x1b[0m\n"
|
||||
bonjour je suis un heredoc
|
||||
le saviez tu je dois finir par EOF mais qui est sur la ligne
|
||||
donc par example si j ai cette ligne qui fini avec EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue