summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2001-09-18 21:14:19 +0000
committerMarcus Brinkmann <marcus@gnu.org>2001-09-18 21:14:19 +0000
commit289e43817788b2ae6ad1d111808d1ea53dd1948b (patch)
treeb2143c1fce9b77e890c62be62af69eb015a7c0a5 /linux
parent08efa582578c4ad600742032b83f02bccb8f36be (diff)
2001-09-18 Marcus Brinkmann <marcus@gnu.org>
* linux/dev/glue/misc.c: Do not include <linux/types.h> and <linux/string.h>. Remove global variable ___strtok. Remove implementation of strspn, strpbrk, strtok and strstr. * Makefile.in: Add strpbrk and strtok.
Diffstat (limited to 'linux')
-rw-r--r--linux/dev/glue/misc.c107
1 files changed, 0 insertions, 107 deletions
diff --git a/linux/dev/glue/misc.c b/linux/dev/glue/misc.c
index 10a9128..d8ca3c2 100644
--- a/linux/dev/glue/misc.c
+++ b/linux/dev/glue/misc.c
@@ -204,113 +204,6 @@ set_device_ro (kdev_t dev, int flag)
ro_bits[major][minor >> 5] &= ~(1 << (minor & 31));
}
-/*
- * linux/lib/string.c
- *
- * Copyright (C) 1991, 1992 Linus Torvalds
- */
-
-/*
- * stupid library routines.. The optimized versions should generally be found
- * as inline code in <asm-xx/string.h>
- *
- * These are buggy as well..
- */
-
-#include <linux/types.h>
-#include <linux/string.h>
-
-char *___strtok = NULL;
-
-#ifndef __HAVE_ARCH_STRSPN
-size_t
-strspn (const char *s, const char *accept)
-{
- const char *p;
- const char *a;
- size_t count = 0;
-
- for (p = s; *p != '\0'; ++p)
- {
- for (a = accept; *a != '\0'; ++a)
- {
- if (*p == *a)
- break;
- }
- if (*a == '\0')
- return count;
- ++count;
- }
-
- return count;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRPBRK
-char *
-strpbrk (const char *cs, const char *ct)
-{
- const char *sc1, *sc2;
-
- for (sc1 = cs; *sc1 != '\0'; ++sc1)
- {
- for (sc2 = ct; *sc2 != '\0'; ++sc2)
- {
- if (*sc1 == *sc2)
- return (char *) sc1;
- }
- }
- return NULL;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRTOK
-char *
-strtok (char *s, const char *ct)
-{
- char *sbegin, *send;
-
- sbegin = s ? s : ___strtok;
- if (!sbegin)
- {
- return NULL;
- }
- sbegin += strspn (sbegin, ct);
- if (*sbegin == '\0')
- {
- ___strtok = NULL;
- return (NULL);
- }
- send = strpbrk (sbegin, ct);
- if (send && *send != '\0')
- *send++ = '\0';
- ___strtok = send;
- return (sbegin);
-}
-#endif
-
-
-#ifndef __HAVE_ARCH_STRSTR
-char *
-strstr (const char *s1, const char *s2)
-{
- int l1, l2;
-
- l2 = strlen (s2);
- if (! l2)
- return (char *) s1;
- l1 = strlen (s1);
- while (l1 >= l2)
- {
- l1--;
- if (! memcmp (s1,s2,l2))
- return (char *) s1;
- s1++;
- }
- return NULL;
-}
-#endif
-
struct proc_dir_entry proc_scsi;
struct inode_operations proc_scsi_inode_operations;
struct proc_dir_entry proc_net;