This commit is contained in:
Ladebeze66
2024-01-30 15:17:15 +01:00
parent ecbd62360c
commit 233d9d5cec
39 changed files with 17 additions and 16 deletions

BIN
utils/ft_utils_convert.o Normal file

Binary file not shown.

BIN
utils/ft_utils_gnl.o Normal file

Binary file not shown.

View File

@@ -6,7 +6,7 @@
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/30 12:33:22 by fgras-ca #+# #+# */
/* Updated: 2024/01/30 13:58:28 by fgras-ca ### ########.fr */
/* Updated: 2024/01/30 15:13:41 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
@@ -39,25 +39,24 @@ void *ft_calloc(size_t nmemb, size_t size)
return (ptr);
}
void *ft_realloc(void *ptr, size_t size)
void *ft_realloc(void *ptr, size_t newsize, size_t oldsize)
{
void *new_ptr;
char *newptr;
if (ptr == NULL)
{
return (malloc(size));
return (malloc(newsize));
}
if (size == 0)
if (newsize <= oldsize)
{
free(ptr);
return (NULL);
return (ptr);
}
new_ptr = malloc(size);
if (new_ptr == NULL)
newptr = malloc(newsize);
if (newptr == NULL)
{
return (NULL);
}
ft_memcpy(new_ptr, ptr, size);
ft_memcpy(newptr, ptr, oldsize);
free(ptr);
return (new_ptr);
return (newptr);
}

BIN
utils/ft_utils_mem.o Normal file

Binary file not shown.

BIN
utils/ft_utils_split.o Normal file

Binary file not shown.

BIN
utils/ft_utils_str_1.o Normal file

Binary file not shown.