diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/arch/arm/boot/compressed/string.c | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/arch/arm/boot/compressed/string.c')
-rw-r--r-- | ANDROID_3.4.5/arch/arm/boot/compressed/string.c | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/ANDROID_3.4.5/arch/arm/boot/compressed/string.c b/ANDROID_3.4.5/arch/arm/boot/compressed/string.c deleted file mode 100644 index 36e53ef9..00000000 --- a/ANDROID_3.4.5/arch/arm/boot/compressed/string.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * arch/arm/boot/compressed/string.c - * - * Small subset of simple string routines - */ - -#include <linux/string.h> - -void *memcpy(void *__dest, __const void *__src, size_t __n) -{ - int i = 0; - unsigned char *d = (unsigned char *)__dest, *s = (unsigned char *)__src; - - for (i = __n >> 3; i > 0; i--) { - *d++ = *s++; - *d++ = *s++; - *d++ = *s++; - *d++ = *s++; - *d++ = *s++; - *d++ = *s++; - *d++ = *s++; - *d++ = *s++; - } - - if (__n & 1 << 2) { - *d++ = *s++; - *d++ = *s++; - *d++ = *s++; - *d++ = *s++; - } - - if (__n & 1 << 1) { - *d++ = *s++; - *d++ = *s++; - } - - if (__n & 1) - *d++ = *s++; - - return __dest; -} - -void *memmove(void *__dest, __const void *__src, size_t count) -{ - unsigned char *d = __dest; - const unsigned char *s = __src; - - if (__dest == __src) - return __dest; - - if (__dest < __src) - return memcpy(__dest, __src, count); - - while (count--) - d[count] = s[count]; - return __dest; -} - -size_t strlen(const char *s) -{ - const char *sc = s; - - while (*sc != '\0') - sc++; - return sc - s; -} - -int memcmp(const void *cs, const void *ct, size_t count) -{ - const unsigned char *su1 = cs, *su2 = ct, *end = su1 + count; - int res = 0; - - while (su1 < end) { - res = *su1++ - *su2++; - if (res) - break; - } - return res; -} - -int strcmp(const char *cs, const char *ct) -{ - unsigned char c1, c2; - int res = 0; - - do { - c1 = *cs++; - c2 = *ct++; - res = c1 - c2; - if (res) - break; - } while (c1); - return res; -} - -void *memchr(const void *s, int c, size_t count) -{ - const unsigned char *p = s; - - while (count--) - if ((unsigned char)c == *p++) - return (void *)(p - 1); - return NULL; -} - -char *strchr(const char *s, int c) -{ - while (*s != (char)c) - if (*s++ == '\0') - return NULL; - return (char *)s; -} - -#undef memset - -void *memset(void *s, int c, size_t count) -{ - char *xs = s; - while (count--) - *xs++ = c; - return s; -} - -void __memzero(void *s, size_t count) -{ - memset(s, 0, count); -} |