56 lines
1.8 KiB
C
56 lines
1.8 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* bsq.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: lyvan-de <lyvan-de@student.codam.nl> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/06/24 11:57:06 by whaffman #+# #+# */
|
|
/* Updated: 2024/06/24 16:22:05 by lyvan-de ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef BSQ_H
|
|
# define BSQ_H
|
|
# include <unistd.h>
|
|
# include <stdlib.h>
|
|
# include <fcntl.h>
|
|
# define BUFFERSIZE 1000000
|
|
|
|
typedef struct s_map
|
|
{
|
|
char *charmap;
|
|
char *filename;
|
|
char empty;
|
|
char fill;
|
|
char obstacle;
|
|
char *filecontents;
|
|
int readlines;
|
|
int height;
|
|
int line_len;
|
|
int solution;
|
|
int *intmap;
|
|
int bsq;
|
|
size_t capacity;
|
|
ssize_t length;
|
|
} t_map;
|
|
|
|
char *ft_strcat(char *dest, char *src);
|
|
int check_invalid_map(t_map *map, int i);
|
|
int draw_biggest_square(t_map *map);
|
|
int ft_findmax(t_map *map);
|
|
int ft_min(int a, int b);
|
|
int ft_strlen(char *str);
|
|
int handle_filedescriptor(int fd);
|
|
int handle_first_line(t_map *map, char *str);
|
|
int make_charmap_and_metadata(t_map *map);
|
|
int make_intmap(t_map *map);
|
|
int read_file(int fd, t_map *map);
|
|
int solve(t_map *map);
|
|
t_map *get_map_ptr(void);
|
|
void free_willy(t_map *map);
|
|
void ft_puterror(t_map *map);
|
|
void ft_putstr(char *str);
|
|
|
|
#endif
|