memorybook functionnal, with add
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
# include <stdio.h> // for printf()
|
||||
|
||||
# include "colors.h"
|
||||
# include "memorybook.h"
|
||||
|
||||
# include "cube3d_macro.h"
|
||||
# include "cube3d_struct.h"
|
||||
|
||||
@@ -45,14 +45,4 @@ int is_go_backward(int *k_hook);
|
||||
// draw.c
|
||||
void draw(t_game *game);
|
||||
|
||||
// -------------------------------
|
||||
// SRC/MEM
|
||||
// -------------------------------
|
||||
// g_alloc_free_exit.c
|
||||
void gexit_init(void(*f)(void*), void *param);
|
||||
void *gmalloc(size_t size);
|
||||
void gfree(void *addr);
|
||||
void gexit(char *str);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
18
headers/memorybook.h
Normal file
18
headers/memorybook.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef MEMORYBOOK_H
|
||||
# define MEMORYBOOK_H
|
||||
|
||||
typedef void(*t_mb_func_exit)(void*);
|
||||
|
||||
typedef struct s_exit
|
||||
{
|
||||
t_mb_func_exit f;
|
||||
void *param;
|
||||
} t_exit;
|
||||
|
||||
void mb_init(void(*f)(void*), void *param);
|
||||
void *mb_alloc(size_t size);
|
||||
void mb_add(void *addr);
|
||||
void mb_free(void *addr);
|
||||
void mb_exit(char *str);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user