everything in src|include should pass the norminette now
This commit is contained in:
parent
3ab3a384c3
commit
ed0c78d8a2
31 changed files with 453 additions and 384 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue