diff options
Diffstat (limited to 'src/strings')
| -rw-r--r-- | src/strings/bcmp.c | 16 | ||||
| -rw-r--r-- | src/strings/bcopy.c | 17 | ||||
| -rw-r--r-- | src/strings/bzero.c | 16 | ||||
| -rw-r--r-- | src/strings/ffs.c | 25 | ||||
| -rw-r--r-- | src/strings/index.c | 16 | ||||
| -rw-r--r-- | src/strings/rindex.c | 16 | ||||
| -rw-r--r-- | src/strings/strcasecmp.c | 31 | ||||
| -rw-r--r-- | src/strings/strncasecmp.c | 36 |
8 files changed, 0 insertions, 173 deletions
diff --git a/src/strings/bcmp.c b/src/strings/bcmp.c deleted file mode 100644 index 7c5010e7..00000000 --- a/src/strings/bcmp.c +++ /dev/null @@ -1,16 +0,0 @@ -#if 0 - -#include <string.h> -#include <strings.h> - -int bcmp(const void *s1, const void *s2, size_t n) -{ - return memcmp(s1, s2, n); -} - -/* -XOPEN(400,700) -*/ - - -#endif diff --git a/src/strings/bcopy.c b/src/strings/bcopy.c deleted file mode 100644 index 3cc0ac6b..00000000 --- a/src/strings/bcopy.c +++ /dev/null @@ -1,17 +0,0 @@ -#if 0 - -#include <string.h> -#include <strings.h> - -int bcopy(const void *s1, void *s2, size_t n) -{ - memcpy(s1, s2, n); - return n; -} - -/* -XOPEN(400,700) -*/ - - -#endif diff --git a/src/strings/bzero.c b/src/strings/bzero.c deleted file mode 100644 index dd28c8b6..00000000 --- a/src/strings/bzero.c +++ /dev/null @@ -1,16 +0,0 @@ -#if 0 - -#include <string.h> -#include <strings.h> - -void bzero(void* s, size_t n) -{ - (void)memset(s, '\0', n); -} - -/* -XOPEN(400,700) -*/ - - -#endif diff --git a/src/strings/ffs.c b/src/strings/ffs.c deleted file mode 100644 index 8c37ed0b..00000000 --- a/src/strings/ffs.c +++ /dev/null @@ -1,25 +0,0 @@ -#if 0 - -#include <strings.h> - -int ffs(int i) -{ - int bit = 0; - - if (i == 0) { - return 0; - } - - while (!(i & (1 << bit))) { - bit++; - } - - return bit; -} - -/* -XOPEN(400) -*/ - - -#endif diff --git a/src/strings/index.c b/src/strings/index.c deleted file mode 100644 index 5531451f..00000000 --- a/src/strings/index.c +++ /dev/null @@ -1,16 +0,0 @@ -#if 0 - -#include <string.h> -#include <strings.h> - -char *index(const char *s, int c) -{ - return strchr(s, c); -} - -/* -XOPEN(400,700) -*/ - - -#endif diff --git a/src/strings/rindex.c b/src/strings/rindex.c deleted file mode 100644 index 4f381cc0..00000000 --- a/src/strings/rindex.c +++ /dev/null @@ -1,16 +0,0 @@ -#if 0 - -#include <string.h> -#include <strings.h> - -char *rindex(const char *s, int c) -{ - return strrchr(s, c); -} - -/* -XOPEN(400,700) -*/ - - -#endif diff --git a/src/strings/strcasecmp.c b/src/strings/strcasecmp.c deleted file mode 100644 index b8f6ea11..00000000 --- a/src/strings/strcasecmp.c +++ /dev/null @@ -1,31 +0,0 @@ -#if 0 - -#include <strings.h> -#include <ctype.h> - -int strcasecmp(const char *s1, const char *s2) -{ - while (*s1 && *s2) { - char c1 = tolower(*s1); - char c2 = tolower(*s2); - if (c1 != c2) { - return c1 - c2; - } - } - - if (*s1) { - return -1; - } else if (*s2) { - return 1; - } - - return 0; -} - -/* -XOPEN(400) -POSIX(200809) -*/ - - -#endif diff --git a/src/strings/strncasecmp.c b/src/strings/strncasecmp.c deleted file mode 100644 index 7942be88..00000000 --- a/src/strings/strncasecmp.c +++ /dev/null @@ -1,36 +0,0 @@ -#if 0 - -#include <strings.h> -#include <ctype.h> - -int strncasecmp(const char *s1, const char *s2, size_t n) -{ - while (n > 0 && *s1 && *s2) { - char c1 = tolower(*s1); - char c2 = tolower(*s2); - if (c1 != c2) { - return c1 - c2; - } - n--; - } - - if (n == 0) { - return 0; - } - - if (*s1) { - return -1; - } else if (*s2) { - return 1; - } - - return 0; -} - -/* -XOPEN(400) -POSIX(200809) -*/ - - -#endif |
