This commit is contained in:
kinou-p 2020-12-16 16:15:48 +01:00
parent c3dc01e968
commit 8d8f81bae9
5 changed files with 9 additions and 14 deletions

View File

@ -6,7 +6,7 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/29 00:09:57 by apommier #+# #+# */
/* Updated: 2020/12/13 20:29:08 by apommier ### ########.fr */
/* Updated: 2020/12/16 16:13:27 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
@ -16,7 +16,7 @@ void *ft_calloc(size_t nmemb, size_t size)
{
char *new;
int i;
i = 0;
new = malloc(size * nmemb);
if (new)

View File

@ -6,7 +6,7 @@
/* By: apommier <alexpomms@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/12/08 18:20:19 by apommier #+# #+# */
/* Updated: 2020/12/13 23:06:45 by apommier ### ########.fr */
/* Updated: 2020/12/16 16:14:02 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,7 +14,7 @@
static char *fill(long n, int j, int minus)
{
char *dest;
char *dest;
j += minus;
dest = (char*)malloc(sizeof(char) * (j + 1));

View File

@ -6,7 +6,7 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/29 00:12:03 by apommier #+# #+# */
/* Updated: 2020/12/13 21:14:36 by apommier ### ########.fr */
/* Updated: 2020/12/16 16:14:24 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
@ -22,7 +22,6 @@ void *ft_memcpy(void *dest, const void *src, size_t n)
return (dest);
p = (char*)dest;
p1 = (const char*)src;
i = 0;
while (i < n)
{

View File

@ -6,7 +6,7 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/29 00:13:52 by apommier #+# #+# */
/* Updated: 2020/12/12 19:19:34 by apommier ### ########.fr */
/* Updated: 2020/12/16 16:14:41 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
@ -18,7 +18,7 @@ char *ft_strrchr(const char *s, int c)
char *last;
str = (char*)s;
if(c == 0)
if (c == 0)
{
while (*str)
str++;

View File

@ -6,7 +6,7 @@
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/29 23:52:05 by apommier #+# #+# */
/* Updated: 2020/12/13 20:56:20 by apommier ### ########.fr */
/* Updated: 2020/12/16 16:15:30 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
@ -47,12 +47,8 @@ char *ft_strtrim(char const *s1, char const *set)
if (dest == 0 || s1 == 0)
return (0);
j = 0;
while (s1[i] && len - j && len > 0)
{
while (s1[i++] && len - j++ && len > 0)
dest[j] = s1[i];
i++;
j++;
}
dest[j] = 0;
return (dest);
}