ft_bzero: initial implementation

This commit is contained in:
Khaïs COLIN 2024-10-15 11:55:56 +02:00
parent 872595f75b
commit c820425285
3 changed files with 23 additions and 3 deletions

View file

@ -6,7 +6,7 @@
# By: kcolin <marvin@42.fr> +#+ +:+ +#+ # # By: kcolin <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2024/10/14 13:43:59 by kcolin #+# #+# # # Created: 2024/10/14 13:43:59 by kcolin #+# #+# #
# Updated: 2024/10/15 10:49:47 by kcolin ### ########.fr # # Updated: 2024/10/15 11:27:59 by kcolin ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #
@ -18,7 +18,8 @@ SOURCES = ft_isalpha.c \
ft_isascii.c \ ft_isascii.c \
ft_isprint.c \ ft_isprint.c \
ft_strlen.c \ ft_strlen.c \
ft_memset.c ft_memset.c \
ft_bzero.c
OBJECTS = $(SOURCES:.c=.o) OBJECTS = $(SOURCES:.c=.o)
CC = gcc CC = gcc

18
ft_bzero.c Normal file
View file

@ -0,0 +1,18 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/15 11:28:05 by kcolin #+# #+# */
/* Updated: 2024/10/15 11:30:40 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *b, t_size len)
{
ft_memset(b, 0, len);
}

View file

@ -6,7 +6,7 @@
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */ /* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/15 10:11:54 by kcolin #+# #+# */ /* Created: 2024/10/15 10:11:54 by kcolin #+# #+# */
/* Updated: 2024/10/15 10:46:35 by kcolin ### ########.fr */ /* Updated: 2024/10/15 11:30:58 by kcolin ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -24,5 +24,6 @@ int ft_isprint(int c);
t_size ft_strlen(const char *s); t_size ft_strlen(const char *s);
void *ft_memset(void *dest, int c, t_size len); void *ft_memset(void *dest, int c, t_size len);
void ft_bzero(void *b, t_size len);
#endif #endif