You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
1.4 KiB

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vector.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hroussea <hroussea@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/02/27 23:05:39 by hroussea #+# #+# */
/* Updated: 2021/09/16 22:12:17 by hroussea ### ########lyon.fr */
/* */
/* ************************************************************************** */
#ifndef VECTOR_H
# define VECTOR_H
# include "types.h"
# include "alloc.h"
# include "string.h"
typedef struct s_vector {
void *data;
size_t capacity;
size_t length;
size_t realloc_size;
size_t data_size;
} t_vector;
t_vector *ft_vecnew(size_t def_alloc, size_t data_size, size_t reall_size);
void ft_vecpush(t_vector *vec, const void *data);
void ft_vecfree(t_vector *vec);
void ft_vecalloc(t_vector *vec, size_t alloc_size);
t_vector *ft_veccpy(const t_vector *const vec);
#endif