summaryrefslogtreecommitdiff
path: root/src/stem/lib/stdlib.c
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-02-06 20:51:56 +0100
committerAlexis211 <alexis211@gmail.com>2010-02-06 20:51:56 +0100
commit6a52d123672b7a00af6e22b4c138205be2042a94 (patch)
treecd9b0a13490159369a66c850850596fd4b418139 /src/stem/lib/stdlib.c
parent3558f18daf50281ee1cd68cca96cd967dbac04ba (diff)
downloadTCE-6a52d123672b7a00af6e22b4c138205be2042a94.tar.gz
TCE-6a52d123672b7a00af6e22b4c138205be2042a94.zip
Reorganisation
Diffstat (limited to 'src/stem/lib/stdlib.c')
-rw-r--r--src/stem/lib/stdlib.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/stem/lib/stdlib.c b/src/stem/lib/stdlib.c
deleted file mode 100644
index c5245e7..0000000
--- a/src/stem/lib/stdlib.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "stdlib.h"
-
-void *memcpy(void *vd, const void *vs, int count) {
- uint8_t *dest = (uint8_t*)vd, *src = (uint8_t*)vs;
- uint32_t f = count % 4, n = count / 4, i;
- const uint32_t* s = (uint32_t*)src;
- uint32_t* d = (uint32_t*)dest;
- for (i = 0; i < n; i++) {
- d[i] = s[i];
- }
- if (f != 0) {
- for (i = count - f; i < count; i++) {
- dest[i] = src[i];
- }
- }
- return vd;
-}
-
-uint8_t *memset(uint8_t *dest, uint8_t val, int count) {
- int i;
- for (i = 0; i < count; i++) {
- dest[i] = val;
- }
- return dest;
-}
-
-uint16_t *memsetw(uint16_t *dest, uint16_t val, int count) {
- int i;
- for (i = 0; i < count; i++) {
- dest[i] = val;
- }
- return dest;
-}
-
-int strlen(const char *str) {
- int i = 0;
- while (str[i++]);
- return i;
-}