everything in src|include should pass the norminette now

This commit is contained in:
Maieul BOYER 2024-02-08 14:27:45 +01:00
parent 3ab3a384c3
commit ed0c78d8a2
No known key found for this signature in database
31 changed files with 453 additions and 384 deletions

View file

@ -11,25 +11,25 @@
/* ************************************************************************** */
#ifndef STATE_H
#define STATE_H
# define STATE_H
#include "me/types.h"
#include "me/vec/vec_i64.h"
#include "me/vec/vec_i64_bool.h"
# include "me/types.h"
# include "me/vec/vec_i64.h"
# include "me/vec/vec_i64_bool.h"
typedef struct s_state
{
t_vec_i64_bool sorted;
t_vec_i64 stack_a;
t_vec_i64 stack_b;
} t_state;
t_vec_i64_bool sorted;
t_vec_i64 stack_a;
t_vec_i64 stack_b;
} t_state;
t_state parses_arguments(t_usize count, t_str nums[]);
void free_state(t_state state);
t_state parses_arguments(t_usize count, t_str nums[]);
void free_state(t_state state);
static inline void make_sorted_true_for_elem(t_state *s, t_i64 elem)
static inline void make_sorted_true_for_elem(t_state *s, t_i64 elem)
{
t_usize i;
t_usize i;
i = 0;
while (i < s->sorted.len)
@ -37,15 +37,15 @@ static inline void make_sorted_true_for_elem(t_state *s, t_i64 elem)
if (s->sorted.buffer[i].value == elem)
{
s->sorted.buffer[i].active = true;
return;
return ;
}
i++;
}
}
static inline void make_sorted_true_from_stack(t_state *s, t_vec_i64 *stack)
static inline void make_sorted_true_from_stack(t_state *s, t_vec_i64 *stack)
{
t_usize i;
t_usize i;
i = 0;
while (i < stack->len)
@ -54,9 +54,9 @@ static inline void make_sorted_true_from_stack(t_state *s, t_vec_i64 *stack)
}
}
static inline void make_sorted_all_false(t_state *s)
static inline void make_sorted_all_false(t_state *s)
{
t_usize i;
t_usize i;
i = 0;
while (i < s->sorted.len)