allo to alloc

This commit is contained in:
Timo Schmidt 2023-03-26 07:58:28 +02:00
parent c275a18069
commit 345f3b1ecf
3 changed files with 6 additions and 6 deletions

View File

@ -6,14 +6,14 @@
/* By: smatthes <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/25 19:45:42 by smatthes #+# #+# */
/* Updated: 2023/03/26 07:27:15 by tischmid ### ########.fr */
/* Updated: 2023/03/26 07:58:12 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
#include <stdio.h>
int **allo_mem(int **board, int n)
int **alloc_mem(int **board, int n)
{
int i;

View File

@ -6,14 +6,14 @@
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/26 07:43:49 by tischmid #+# #+# */
/* Updated: 2023/03/26 07:44:09 by tischmid ### ########.fr */
/* Updated: 2023/03/26 07:58:02 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MAIN_H
# define MAIN_H
int **allo_mem(int **board, int n);
int **alloc_mem(int **board, int n);
void free_mem(int *borders, int **board, int n);
int handle_input(int argc, char **argv, int *borders, int n);
void put_error(void);

View File

@ -6,7 +6,7 @@
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/26 06:13:07 by tischmid #+# #+# */
/* Updated: 2023/03/26 07:57:08 by tischmid ### ########.fr */
/* Updated: 2023/03/26 07:57:54 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
@ -22,7 +22,7 @@ int main(int argc, char **argv)
n = 4;
borders = malloc(n * 4 * 4);
board = allo_mem(board, n);
board = alloc_mem(board, n);
if (!handle_input(argc, argv, borders, n))
{
put_error();