mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 00:41:57 +00:00
clean the include not used
This commit is contained in:
@@ -12,13 +12,6 @@
|
|||||||
|
|
||||||
#include "parsing.h"
|
#include "parsing.h"
|
||||||
|
|
||||||
// static int calcul_sign(char c)
|
|
||||||
// {
|
|
||||||
// if (c == '-')
|
|
||||||
// return (-1);
|
|
||||||
// return (1);
|
|
||||||
// }
|
|
||||||
|
|
||||||
static int verif_atoi(const char *nptr)
|
static int verif_atoi(const char *nptr)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ void adaptive(t_stacks *stacks, char **tab)
|
|||||||
i = 0;
|
i = 0;
|
||||||
while (!ft_isdigit(tab[i][0]) && tab[i])
|
while (!ft_isdigit(tab[i][0]) && tab[i])
|
||||||
i++;
|
i++;
|
||||||
disorder = compute_disorder(tab, i - 1);
|
disorder = stacks->disorder;
|
||||||
if (disorder < 0.3)
|
if (disorder < 0.3)
|
||||||
simple(stacks);
|
simple(stacks);
|
||||||
else if (disorder < 0.5)
|
else if (disorder < 0.5)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
#include "push_swap.h"
|
#include "push_swap.h"
|
||||||
#include "parsing.h"
|
#include "parsing.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
static void print_disorder(t_stacks *stacks)
|
static void print_disorder(t_stacks *stacks)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "parsing.h"
|
#include "parsing.h"
|
||||||
|
|
||||||
static size_t count_words(char const *s, char c)
|
static size_t count_words(char const *s, char c)
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "parsing.h"
|
#include "parsing.h"
|
||||||
|
|
||||||
char *ft_substr(char const *s, unsigned int start, size_t len)
|
char *ft_substr(char const *s, unsigned int start, size_t len)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
#include "push_swap.h"
|
#include "push_swap.h"
|
||||||
#include "parsing.h"
|
#include "parsing.h"
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
int wich_mod(int mod)
|
int wich_mod(int mod)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
#include "flags.h"
|
#include "flags.h"
|
||||||
#include "parsing.h"
|
#include "parsing.h"
|
||||||
#include "medium_headers.h"
|
#include "medium_headers.h"
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
int test1(char **tab, int len, int mod)
|
int test1(char **tab, int len, int mod)
|
||||||
{
|
{
|
||||||
@@ -31,6 +30,7 @@ int test1(char **tab, int len, int mod)
|
|||||||
free_all(stacks);
|
free_all(stacks);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
stacks->disorder = compute_disorder(tab, wich_mod(mod));
|
||||||
flags(pos_flag(tab, mod), pos_bench(tab, mod), tab, stacks);
|
flags(pos_flag(tab, mod), pos_bench(tab, mod), tab, stacks);
|
||||||
if (stacks->bench == 1)
|
if (stacks->bench == 1)
|
||||||
print_bench(stacks);
|
print_bench(stacks);
|
||||||
|
|||||||
Reference in New Issue
Block a user