summaryrefslogtreecommitdiff
path: root/rushs/tinyprintf/my_memmove
diff options
context:
space:
mode:
Diffstat (limited to 'rushs/tinyprintf/my_memmove')
-rw-r--r--rushs/tinyprintf/my_memmove/my_memmove.c23
-rw-r--r--rushs/tinyprintf/my_memmove/my_memmove.h8
2 files changed, 0 insertions, 31 deletions
diff --git a/rushs/tinyprintf/my_memmove/my_memmove.c b/rushs/tinyprintf/my_memmove/my_memmove.c
deleted file mode 100644
index bb360a5..0000000
--- a/rushs/tinyprintf/my_memmove/my_memmove.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "my_memmove.h"
-
-void *my_memmove(void *dest, const void *src, size_t n)
-{
- char *d = dest;
- const char *s = src;
- if (dest > src) // reverse array
- {
- size_t l = n;
- for (; l > 0; l--)
- {
- d[l - 1] = s[l - 1];
- }
- }
- else
- {
- for (size_t i = 0; i < n; i++)
- {
- d[i] = s[i];
- }
- }
- return dest;
-}
diff --git a/rushs/tinyprintf/my_memmove/my_memmove.h b/rushs/tinyprintf/my_memmove/my_memmove.h
deleted file mode 100644
index cb253b7..0000000
--- a/rushs/tinyprintf/my_memmove/my_memmove.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef MY_MEMMOVE_H
-#define MY_MEMMOVE_H
-
-#include <stddef.h>
-
-void *my_memmove(void *dest, const void *src, size_t n);
-
-#endif /* ! MY_MEMMOVE_H */