summaryrefslogtreecommitdiffstats
path: root/src/lib/string.c
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-03-05 10:01:45 -0600
committerPatrick Williams <iawillia@us.ibm.com>2011-03-05 10:01:45 -0600
commit706243ac48cf646d503a3f1ec9e6a28c916694bd (patch)
tree5d583486a145a9646eccb9d3c4bce4dad45a2a84 /src/lib/string.c
parent5c20d316d21e231daee6455f0a78d5940d59cf23 (diff)
downloadtalos-hostboot-706243ac48cf646d503a3f1ec9e6a28c916694bd.tar.gz
talos-hostboot-706243ac48cf646d503a3f1ec9e6a28c916694bd.zip
Merge of PowerHAL project up to commit:
dd45c30bd53d8e6c123165b83842d08117558a3c
Diffstat (limited to 'src/lib/string.c')
-rw-r--r--src/lib/string.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/lib/string.c b/src/lib/string.c
deleted file mode 100644
index c267c11d7..000000000
--- a/src/lib/string.c
+++ /dev/null
@@ -1,45 +0,0 @@
-#include <string.h>
-
-void* memset(void* s, int c, size_t n)
-{
- char* _s = s;
- while(n)
- {
- *_s = c;
- _s++; n--;
- }
- return s;
-}
-
-char* strcpy(char* d, const char* s)
-{
- char* d1 = d;
-
- do
- {
- *d1 = *s;
- if (*s == '\0') return d;
- d1++; s++;
- } while(1);
-}
-
-int strcmp(const char* a, const char* b)
-{
- while((*a != '\0') && (*b != '\0'))
- {
- if (*a == *b)
- {
- a++; b++;
- }
- else
- {
- return (*a > *b) ? 1 : -1;
- }
- }
- if (*a == *b)
- return 0;
- if (*a == '\0')
- return -1;
- else
- return 1;
-}
OpenPOWER on IntegriCloud