aboutsummaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-17 10:56:16 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-17 10:56:16 +0100
commitfe37597119353ce183fc404417b81bd4702f64b7 (patch)
treefaa20a8352092c062e2fd272fff2104d9f2ddb3f /src/mem
parent2e5ca2ab6276b7b24895ade28e1533356ef523dc (diff)
downloadlibft-fe37597119353ce183fc404417b81bd4702f64b7.tar.gz
libft-fe37597119353ce183fc404417b81bd4702f64b7.tar.bz2
libft-fe37597119353ce183fc404417b81bd4702f64b7.zip
Splited include like src/, Adding feature toggle protection in header
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/ft_memccpy.c12
-rw-r--r--src/mem/ft_memchr.c8
-rw-r--r--src/mem/ft_memcmp.c12
-rw-r--r--src/mem/ft_memcpy.c4
-rw-r--r--src/mem/ft_memmove.c4
-rw-r--r--src/mem/ft_memset.c4
6 files changed, 22 insertions, 22 deletions
diff --git a/src/mem/ft_memccpy.c b/src/mem/ft_memccpy.c
index f95aa03..8ce656a 100644
--- a/src/mem/ft_memccpy.c
+++ b/src/mem/ft_memccpy.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 10:01:53 by cacharle #+# #+# */
-/* Updated: 2019/11/20 03:30:45 by cacharle ### ########.fr */
+/* Updated: 2020/01/17 10:54:03 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,12 +14,12 @@
void *ft_memccpy(void *dest, const void *src, int c, size_t n)
{
- size_t i;
- t_byte *cast_dest;
- t_byte *cast_src;
+ size_t i;
+ t_ftbyte *cast_dest;
+ t_ftbyte *cast_src;
- cast_dest = (t_byte*)dest;
- cast_src = (t_byte*)src;
+ cast_dest = (t_ftbyte*)dest;
+ cast_src = (t_ftbyte*)src;
i = -1;
while (++i < n)
{
diff --git a/src/mem/ft_memchr.c b/src/mem/ft_memchr.c
index d2364db..27e9028 100644
--- a/src/mem/ft_memchr.c
+++ b/src/mem/ft_memchr.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 09:55:31 by cacharle #+# #+# */
-/* Updated: 2019/11/20 03:30:55 by cacharle ### ########.fr */
+/* Updated: 2020/01/17 10:53:57 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,10 +14,10 @@
void *ft_memchr(const void *s, int c, size_t n)
{
- size_t i;
- t_byte *cast_s;
+ size_t i;
+ t_ftbyte *cast_s;
- cast_s = (t_byte*)s;
+ cast_s = (t_ftbyte*)s;
i = -1;
while (++i < n)
if (cast_s[i] == (unsigned char)c)
diff --git a/src/mem/ft_memcmp.c b/src/mem/ft_memcmp.c
index 2c8e179..233d796 100644
--- a/src/mem/ft_memcmp.c
+++ b/src/mem/ft_memcmp.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 09:56:44 by cacharle #+# #+# */
-/* Updated: 2019/11/21 01:58:42 by cacharle ### ########.fr */
+/* Updated: 2020/01/17 10:54:15 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,12 +14,12 @@
int ft_memcmp(const void *s1, const void *s2, size_t n)
{
- size_t i;
- t_byte *cast_s1;
- t_byte *cast_s2;
+ size_t i;
+ t_ftbyte *cast_s1;
+ t_ftbyte *cast_s2;
- cast_s1 = (t_byte*)s1;
- cast_s2 = (t_byte*)s2;
+ cast_s1 = (t_ftbyte*)s1;
+ cast_s2 = (t_ftbyte*)s2;
if (n == 0)
return (0);
i = -1;
diff --git a/src/mem/ft_memcpy.c b/src/mem/ft_memcpy.c
index ca679fc..d0ef008 100644
--- a/src/mem/ft_memcpy.c
+++ b/src/mem/ft_memcpy.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 10:00:07 by cacharle #+# #+# */
-/* Updated: 2019/11/21 18:04:36 by cacharle ### ########.fr */
+/* Updated: 2020/01/17 10:39:04 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -22,7 +22,7 @@ void *ft_memcpy(void *dest, const void *src, size_t n)
while (n % 8 > 0)
{
n--;
- ((t_byte*)dest)[n] = ((t_byte*)src)[n];
+ ((t_ftbyte*)dest)[n] = ((t_ftbyte*)src)[n];
}
long_dest = dest;
long_src = src;
diff --git a/src/mem/ft_memmove.c b/src/mem/ft_memmove.c
index 73e26b8..2f794fd 100644
--- a/src/mem/ft_memmove.c
+++ b/src/mem/ft_memmove.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 10:03:21 by cacharle #+# #+# */
-/* Updated: 2019/11/21 18:43:26 by cacharle ### ########.fr */
+/* Updated: 2020/01/17 10:39:26 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -24,7 +24,7 @@ void *ft_memmove(void *dst, const void *src, size_t len)
while (len % 8 > 0)
{
len--;
- *(t_byte*)dst++ = *(t_byte*)src++;
+ *(t_ftbyte*)dst++ = *(t_ftbyte*)src++;
}
long_dst = dst;
long_src = src;
diff --git a/src/mem/ft_memset.c b/src/mem/ft_memset.c
index 4ede5f3..89f53ff 100644
--- a/src/mem/ft_memset.c
+++ b/src/mem/ft_memset.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 10:01:23 by cacharle #+# #+# */
-/* Updated: 2019/11/21 18:40:59 by cacharle ### ########.fr */
+/* Updated: 2020/01/17 10:39:10 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -19,7 +19,7 @@ void *ft_memset(void *s, int c, size_t n)
c = (unsigned char)c;
while (n % 8 > 0)
- *((t_byte*)s + --n) = c;
+ *((t_ftbyte*)s + --n) = c;
buf = (long int)c | (long int)c << 8 | (long int)c << 16
| (long int)c << 24 | (long int)c << 32 | (long int)c << 40
| (long int)c << 48 | (long int)c << 56;