-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ft_memclear to for function pairing with ft_lstclear
- Loading branch information
Matthew Yeow
committed
Apr 5, 2024
1 parent
f85edea
commit b28971d
Showing
5 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ MEMSRC = \ | |
bzero \ | ||
calloc \ | ||
memchr \ | ||
memclear \ | ||
memcmp \ | ||
memcpy \ | ||
memmove \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: myeow <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/02/15 16:11:56 by myeow #+# #+# */ | ||
/* Updated: 2024/04/05 19:04:15 by myeow ### ########.fr */ | ||
/* Updated: 2024/04/05 20:29:48 by myeow ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -15,6 +15,7 @@ | |
|
||
# include <stddef.h> | ||
|
||
void ft_memclear(void *content); | ||
char *ft_strendptr(char *str); | ||
int ft_isspace(int c); | ||
int ft_isalpha(int c); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* ************************************************************************** */ | ||
/* */ | ||
/* ::: :::::::: */ | ||
/* ft_memclear.c :+: :+: :+: */ | ||
/* +:+ +:+ +:+ */ | ||
/* By: myeow <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/04/05 20:26:45 by myeow #+# #+# */ | ||
/* Updated: 2024/04/05 20:30:52 by myeow ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include <stdlib.h> | ||
|
||
/* | ||
* Pair this with ft_lstclear. | ||
*/ | ||
void ft_memclear(void *content) | ||
{ | ||
free(content); | ||
return ; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,14 @@ | |
/* By: myeow <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/02/17 23:18:06 by myeow #+# #+# */ | ||
/* Updated: 2024/04/05 20:08:21 by myeow ### ########.fr */ | ||
/* Updated: 2024/04/05 20:17:02 by myeow ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include <stdlib.h> | ||
|
||
void ft_free_ft_split(char **str_array); | ||
|
||
static int ft_countwords(char const *s, char c) | ||
{ | ||
size_t n; | ||
|