ft_memset, ft_isalpha: add static to subfuntions
This commit is contained in:
parent
c4402c4b2d
commit
ca233d4b2f
3
Makefile
3
Makefile
@ -6,7 +6,7 @@
|
||||
# By: tmaze <marvin@42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2018/04/04 10:51:59 by tmaze #+# #+# #
|
||||
# Updated: 2018/04/05 14:13:58 by tmaze ### ########.fr #
|
||||
# Updated: 2018/04/05 15:43:32 by tmaze ### ########.fr #
|
||||
# #
|
||||
#******************************************************************************#
|
||||
|
||||
@ -17,6 +17,7 @@ CCSTD = -std=c99
|
||||
NAME = libft.a
|
||||
|
||||
SRCS = \
|
||||
ft_memset.c \
|
||||
ft_strlen.c \
|
||||
ft_strdup.c \
|
||||
ft_strcpy.c \
|
||||
|
@ -6,18 +6,18 @@
|
||||
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2018/04/04 10:56:47 by tmaze #+# #+# */
|
||||
/* Updated: 2018/04/04 11:23:21 by tmaze ### ########.fr */
|
||||
/* Updated: 2018/04/05 15:32:34 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
int ft_isupper(int c)
|
||||
static int ft_isupper(int c)
|
||||
{
|
||||
return (c >= 'A' && c <= 'Z');
|
||||
}
|
||||
|
||||
int ft_islower(int c)
|
||||
static int ft_islower(int c)
|
||||
{
|
||||
return (c >= 'a' && c <= 'z');
|
||||
}
|
||||
|
23
ft_memset.c
Normal file
23
ft_memset.c
Normal file
@ -0,0 +1,23 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_memset.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2018/04/05 15:22:55 by tmaze #+# #+# */
|
||||
/* Updated: 2018/04/05 16:19:06 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void *ft_memset(void *b, int c, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
i = 0;
|
||||
while (i < len)
|
||||
*((char*)b + i++) = c;
|
||||
return (b);
|
||||
}
|
4
libft.h
4
libft.h
@ -6,7 +6,7 @@
|
||||
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2018/04/04 10:40:01 by tmaze #+# #+# */
|
||||
/* Updated: 2018/04/05 13:51:17 by tmaze ### ########.fr */
|
||||
/* Updated: 2018/04/05 15:28:02 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
** fonctions obligatoires
|
||||
*/
|
||||
|
||||
void *ft_memset(void *s, int c, size_t n);
|
||||
void *ft_memset(void *b, int c, size_t len);
|
||||
void ft_bzero(void *s, size_t n);
|
||||
void *ft_memcpy(void *dest, const void *src, size_t n);
|
||||
void *ft_memccpy(void *dest, const void *src, int c, size_t n);
|
||||
|
Loading…
x
Reference in New Issue
Block a user