norm: splitted functions in main into appropriate file

Moved lstdelenvelem & env2lst to ms_env.c
Normed out files
This commit is contained in:
Tanguy MAZE
2019-09-20 12:06:44 +02:00
parent 852248636f
commit cf62dae53b
124 changed files with 4850 additions and 30 deletions

26
libft/srcs/ft_memchr.c Normal file
View File

@@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/06 16:07:52 by tmaze #+# #+# */
/* Updated: 2018/04/06 16:27:54 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memchr(const void *s, int c, size_t n)
{
int i;
char *tmp;
i = -1;
tmp = (char*)s;
while ((unsigned int)++i < n)
if ((char)tmp[i] == (char)c)
return ((void*)&tmp[i]);
return (NULL);
}