diff --git a/reactos/lib/msvcrt/string/memchr.c b/reactos/lib/msvcrt/string/memchr.c deleted file mode 100644 index fd21697b3e8..00000000000 --- a/reactos/lib/msvcrt/string/memchr.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -void * -memchr(const void *s, int c, size_t n) -{ - if (n) - { - const char *p = s; - do { - if (*p++ == c) - return (void *)(p-1); - } while (--n != 0); - } - return 0; -} diff --git a/reactos/lib/msvcrt/string/memcmp.c b/reactos/lib/msvcrt/string/memcmp.c deleted file mode 100644 index 95d3d25f4c0..00000000000 --- a/reactos/lib/msvcrt/string/memcmp.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -#pragma function(memcmp) - -int memcmp(const void *s1, const void *s2, size_t n) -{ - if (n != 0) { - const unsigned char *p1 = s1, *p2 = s2; - do { - if (*p1++ != *p2++) - return (*--p1 - *--p2); - } while (--n != 0); - } - return 0; -} diff --git a/reactos/lib/msvcrt/string/memcpy.c b/reactos/lib/msvcrt/string/memcpy.c deleted file mode 100644 index 894bc8442af..00000000000 --- a/reactos/lib/msvcrt/string/memcpy.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -#pragma function(memcpy) - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -void* memcpy(void* to, const void* from, size_t count) -{ - register char* f = (char*)from; - register char* t = (char*)to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; - - return to; -} diff --git a/reactos/lib/msvcrt/string/memmove.c b/reactos/lib/msvcrt/string/memmove.c deleted file mode 100644 index a3d37265db3..00000000000 --- a/reactos/lib/msvcrt/string/memmove.c +++ /dev/null @@ -1,36 +0,0 @@ -#include - - -void * memmove(void *dest,const void *src,size_t count) -{ - char *char_dest = (char *)dest; - char *char_src = (char *)src; - - if ((char_dest <= char_src) || (char_dest >= (char_src+count))) - { - /* non-overlapping buffers */ - while(count > 0) - { - *char_dest = *char_src; - char_dest++; - char_src++; - count--; - } - } - else - { - /* overlaping buffers */ - char_dest = (char *)dest + count - 1; - char_src = (char *)src + count - 1; - - while(count > 0) - { - *char_dest = *char_src; - char_dest--; - char_src--; - count--; - } - } - - return dest; -} diff --git a/reactos/lib/msvcrt/string/memset.c b/reactos/lib/msvcrt/string/memset.c deleted file mode 100644 index 9bb4bf8766e..00000000000 --- a/reactos/lib/msvcrt/string/memset.c +++ /dev/null @@ -1,15 +0,0 @@ -#include - -#pragma function(memset) - -void* memset(void* src, int val, size_t count) -{ - char* char_src = (char*)src; - - while (count>0) { - *char_src = val; - char_src++; - count--; - } - return src; -} diff --git a/reactos/lib/msvcrt/string/strcat.c b/reactos/lib/msvcrt/string/strcat.c deleted file mode 100644 index 2b87ce9463a..00000000000 --- a/reactos/lib/msvcrt/string/strcat.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -#pragma function(strcat) - -char* strcat(char* s, const char* append) -{ - char* save = s; - - for (; *s; ++s); - while ((*s++ = *append++)); - return save; -} diff --git a/reactos/lib/msvcrt/string/strchr.c b/reactos/lib/msvcrt/string/strchr.c deleted file mode 100644 index 2e739a87505..00000000000 --- a/reactos/lib/msvcrt/string/strchr.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -char *strchr(const char *s, int c) -{ - char cc = c; - while (*s) - { - if (*s == cc) - return (char *)s; - s++; - } - if (cc == 0) - return (char *)s; - return 0; -} - diff --git a/reactos/lib/msvcrt/string/strcmp.c b/reactos/lib/msvcrt/string/strcmp.c deleted file mode 100644 index 35aa66f0cd9..00000000000 --- a/reactos/lib/msvcrt/string/strcmp.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -#pragma function(strcmp) - -int strcmp(const char* s1, const char* s2) -{ - while (*s1 == *s2) - { - if (*s1 == 0) - return 0; - s1++; - s2++; - } - return *(unsigned const char*)s1 - *(unsigned const char*)(s2); -} diff --git a/reactos/lib/msvcrt/string/strcpy.c b/reactos/lib/msvcrt/string/strcpy.c deleted file mode 100644 index 902254f99be..00000000000 --- a/reactos/lib/msvcrt/string/strcpy.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -#pragma function(strcpy) - -char* strcpy(char *to, const char *from) -{ - char *save = to; - - for (; (*to = *from); ++from, ++to); - return save; -} diff --git a/reactos/lib/msvcrt/string/strlen.c b/reactos/lib/msvcrt/string/strlen.c deleted file mode 100644 index ebac5d777f8..00000000000 --- a/reactos/lib/msvcrt/string/strlen.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - -#pragma function(strlen) - -size_t strlen(const char* str) -{ - const char* s; - - if (str == 0) - return 0; - for (s = str; *s; ++s); - return s-str; -} - diff --git a/reactos/lib/msvcrt/string/strncat.c b/reactos/lib/msvcrt/string/strncat.c deleted file mode 100644 index be963b47ab5..00000000000 --- a/reactos/lib/msvcrt/string/strncat.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -char * -strncat(char *dst, const char *src, size_t n) -{ - if (n != 0) - { - char *d = dst; - const char *s = src; - - while (*d != 0) - d++; - do { - if ((*d = *s++) == 0) - break; - d++; - } while (--n != 0); - *d = 0; - } - return dst; -} diff --git a/reactos/lib/msvcrt/string/strncmp.c b/reactos/lib/msvcrt/string/strncmp.c deleted file mode 100644 index 6a2352ddfd8..00000000000 --- a/reactos/lib/msvcrt/string/strncmp.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -int -strncmp(const char *s1, const char *s2, size_t n) -{ - - if (n == 0) - return 0; - do { - if (*s1 != *s2++) - return *(unsigned const char *)s1 - *(unsigned const char *)--s2; - if (*s1++ == 0) - break; - } while (--n != 0); - return 0; -} diff --git a/reactos/lib/msvcrt/string/strncpy.c b/reactos/lib/msvcrt/string/strncpy.c deleted file mode 100644 index 6981589407f..00000000000 --- a/reactos/lib/msvcrt/string/strncpy.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -char * -strncpy(char *dst, const char *src, size_t n) -{ - if (n != 0) { - char *d = dst; - const char *s = src; - - do { - if ((*d++ = *s++) == 0) - { - while (--n != 0) - *d++ = 0; - break; - } - } while (--n != 0); - } - return dst; -} diff --git a/reactos/lib/msvcrt/wstring/wcscat.c b/reactos/lib/msvcrt/wstring/wcscat.c deleted file mode 100644 index e56161700aa..00000000000 --- a/reactos/lib/msvcrt/wstring/wcscat.c +++ /dev/null @@ -1,18 +0,0 @@ - - -#include - -wchar_t * wcscat(wchar_t * dest,const wchar_t * src) -{ - wchar_t *d = dest; - for (; *dest !=0; dest++); - while (*src != 0) - { - *dest = *src; - dest++; - src++; - } - *dest = 0; - return d; -} - diff --git a/reactos/lib/msvcrt/wstring/wcschr.c b/reactos/lib/msvcrt/wstring/wcschr.c deleted file mode 100644 index 31ccb1dc80c..00000000000 --- a/reactos/lib/msvcrt/wstring/wcschr.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - -wchar_t* wcschr(const wchar_t* str, wchar_t ch) -{ - while ((*str)!=0) - { - if ((*str)==ch) - { - return((wchar_t *)str); - } - str++; - } - return(NULL); -} diff --git a/reactos/lib/msvcrt/wstring/wcscmp.c b/reactos/lib/msvcrt/wstring/wcscmp.c deleted file mode 100644 index 4d5a48fb40d..00000000000 --- a/reactos/lib/msvcrt/wstring/wcscmp.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - -int wcscmp(const wchar_t* cs,const wchar_t * ct) -{ - while (*cs == *ct) - { - if (*cs == 0) - return 0; - cs++; - ct++; - } - return *cs - *ct; -} diff --git a/reactos/lib/msvcrt/wstring/wcscpy.c b/reactos/lib/msvcrt/wstring/wcscpy.c deleted file mode 100644 index e63e91ffd5d..00000000000 --- a/reactos/lib/msvcrt/wstring/wcscpy.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - -wchar_t * wcscpy(wchar_t * str1,const wchar_t * str2) -{ - wchar_t *save = str1; - - for (; (*str1 = *str2); ++str2, ++str1); - return save; -} diff --git a/reactos/lib/msvcrt/wstring/wcslen.c b/reactos/lib/msvcrt/wstring/wcslen.c deleted file mode 100644 index 7829d2fca9b..00000000000 --- a/reactos/lib/msvcrt/wstring/wcslen.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - - -size_t wcslen(const wchar_t * s) -{ - const wchar_t *save; - - if (s == 0) - return 0; - for (save = s; *save; ++save); - return save-s; -} diff --git a/reactos/lib/msvcrt/wstring/wcsncat.c b/reactos/lib/msvcrt/wstring/wcsncat.c deleted file mode 100644 index bca5052d65a..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsncat.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -wchar_t *wcsncat(wchar_t *dst, const wchar_t *src, size_t n) -{ - if (n != 0) - { - wchar_t *d = dst; - const wchar_t *s = src; - - while (*d != 0) - d++; - do { - if ((*d = *s++) == 0) - break; - d++; - } while (--n != 0); - *d = 0; - } - return dst; -} diff --git a/reactos/lib/msvcrt/wstring/wcsncmp.c b/reactos/lib/msvcrt/wstring/wcsncmp.c deleted file mode 100644 index a3e0746f0d4..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsncmp.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -#if 0 - -int wcsncmp(const wchar_t* cs, const wchar_t* ct, size_t count) -{ - while ((*cs) == (*ct) && count > 0) { - if (*cs == 0) - return 0; - cs++; - ct++; - count--; - } - return (*cs) - (*ct); -} - -#else - -int wcsncmp(const wchar_t* cs, const wchar_t* ct, size_t count) -{ - if (count == 0) - return 0; - do { - if (*cs != *ct++) - //return *(unsigned const char *)cs - *(unsigned const char *)--ct; - return (*cs) - (*(--ct)); - if (*cs++ == 0) - break; - } while (--count != 0); - return 0; -} - -#endif diff --git a/reactos/lib/msvcrt/wstring/wcsncpy.c b/reactos/lib/msvcrt/wstring/wcsncpy.c deleted file mode 100644 index cd40d65c97f..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsncpy.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - -wchar_t * wcsncpy(wchar_t * dest,const wchar_t *src,size_t count) -{ - int i; - - for (i=0;i - -size_t _wcsnlen(const wchar_t * s, size_t count) -{ - unsigned int len=0; - - while(s[len]!=0 && len < count) - len++; - return len; -} diff --git a/reactos/lib/msvcrt/wstring/wcsrchr.c b/reactos/lib/msvcrt/wstring/wcsrchr.c deleted file mode 100644 index 19d9d9a9297..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsrchr.c +++ /dev/null @@ -1,15 +0,0 @@ -#include - -wchar_t* wcsrchr(const wchar_t* str, wchar_t ch) -{ - wchar_t *sp=(wchar_t *)0; - while (*str != 0) - { - if (*str == ch) - sp = (wchar_t *)str; - str++; - } - if (ch == 0) - sp = (wchar_t *)str; - return sp; -}