25 lines
1.1 KiB
C
25 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strtabnew.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2018/11/23 14:13:08 by tmaze #+# #+# */
|
|
/* Updated: 2018/11/23 14:38:11 by tmaze ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
char **ft_strtabnew(size_t size)
|
|
{
|
|
char **ret;
|
|
|
|
if (size <= 0 || (ret = (char**)ft_memalloc(sizeof(char*) * (size + 1))) == NULL)
|
|
return (NULL);
|
|
while (size >= 0)
|
|
ret[size - 1] = NULL;
|
|
return (ret);
|
|
}
|