Commit 68559674 authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Don't forward string functions to ntdll.

parent c474709f
......@@ -236,7 +236,7 @@
@ cdecl _mbstok(str str)
@ cdecl _mbstrlen(str)
@ cdecl _mbsupr(str)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _mkdir(str)
@ cdecl _mktemp(str)
......@@ -485,7 +485,7 @@
@ cdecl strncpy(ptr str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -518,15 +518,15 @@
@ cdecl wcscmp(wstr wstr)
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
@ cdecl wcspbrk(wstr wstr)
@ cdecl wcsrchr(wstr long)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -1204,7 +1204,7 @@
@ cdecl _mbsupr_s(str long)
@ stub _mbsupr_s_l
@ cdecl _mbtowc_l(ptr str long ptr)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _memicmp_l(str str long ptr)
@ cdecl _mkdir(str)
......@@ -1815,7 +1815,7 @@
@ cdecl strnlen(str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -1861,10 +1861,10 @@
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscpy_s(ptr long wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncat_s(wstr long wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
......@@ -1874,7 +1874,7 @@
@ cdecl wcsrchr(wstr long)
@ cdecl wcsrtombs(ptr ptr long ptr)
@ cdecl wcsrtombs_s(ptr ptr long ptr long ptr)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -1561,7 +1561,7 @@
@ cdecl _mbsupr_s(str long)
@ stub _mbsupr_s_l
@ cdecl _mbtowc_l(ptr str long ptr)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _memicmp_l(str str long ptr)
@ cdecl _mkdir(str)
......@@ -2173,7 +2173,7 @@
@ cdecl strnlen(str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -2219,10 +2219,10 @@
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscpy_s(ptr long wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncat_s(wstr long wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
......@@ -2232,7 +2232,7 @@
@ cdecl wcsrchr(wstr long)
@ cdecl wcsrtombs(ptr ptr long ptr)
@ cdecl wcsrtombs_s(ptr ptr long ptr long ptr)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -1571,7 +1571,7 @@
@ cdecl _mbsupr_s(str long)
@ stub _mbsupr_s_l
@ cdecl _mbtowc_l(ptr str long ptr)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _memicmp_l(str str long ptr)
@ cdecl _mkdir(str)
......@@ -2383,7 +2383,7 @@
@ cdecl strnlen(str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtof(str ptr)
......@@ -2454,10 +2454,10 @@
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscpy_s(ptr long wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncat_s(wstr long wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
......@@ -2467,7 +2467,7 @@
@ cdecl wcsrchr(wstr long)
@ cdecl wcsrtombs(ptr ptr long ptr)
@ cdecl wcsrtombs_s(ptr ptr long ptr long ptr)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstof(ptr ptr)
......
......@@ -473,7 +473,7 @@
@ cdecl _mbstok(str str)
@ cdecl _mbstrlen(str)
@ cdecl _mbsupr(str)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _mkdir(str)
@ cdecl _mktemp(str)
......@@ -833,7 +833,7 @@
@ cdecl strncpy(ptr str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -866,15 +866,15 @@
@ cdecl wcscmp(wstr wstr)
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
@ cdecl wcspbrk(wstr wstr)
@ cdecl wcsrchr(wstr long)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -468,7 +468,7 @@
@ cdecl _mbstok(str str)
@ cdecl _mbstrlen(str)
@ cdecl _mbsupr(str)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _mkdir(str)
@ cdecl _mktemp(str)
......@@ -828,7 +828,7 @@
@ cdecl strncpy(ptr str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -861,15 +861,15 @@
@ cdecl wcscmp(wstr wstr)
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
@ cdecl wcspbrk(wstr wstr)
@ cdecl wcsrchr(wstr long)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -876,7 +876,7 @@
@ cdecl _mbsupr_s(str long)
@ stub _mbsupr_s_l
@ cdecl _mbtowc_l(ptr str long ptr)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _memicmp_l(str str long ptr)
@ cdecl _mkdir(str)
......@@ -1496,7 +1496,7 @@
@ cdecl strnlen(str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -1542,10 +1542,10 @@
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscpy_s(ptr long wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncat_s(wstr long wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
......@@ -1555,7 +1555,7 @@
@ cdecl wcsrchr(wstr long)
@ cdecl wcsrtombs(ptr ptr long ptr)
@ cdecl wcsrtombs_s(ptr ptr long ptr long ptr)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -854,7 +854,7 @@
@ cdecl _mbsupr_s(str long)
@ stub _mbsupr_s_l
@ cdecl _mbtowc_l(ptr str long ptr)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _memicmp_l(str str long ptr)
@ cdecl _mkdir(str)
......@@ -1468,7 +1468,7 @@
@ cdecl strnlen(str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -1514,10 +1514,10 @@
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscpy_s(ptr long wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncat_s(wstr long wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
......@@ -1527,7 +1527,7 @@
@ cdecl wcsrchr(wstr long)
@ cdecl wcsrtombs(ptr ptr long ptr)
@ cdecl wcsrtombs_s(ptr ptr long ptr long ptr)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -824,7 +824,7 @@
@ cdecl _mbsupr_s(str long)
# stub _mbsupr_s_l(str long ptr)
@ cdecl _mbtowc_l(ptr str long ptr)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _memicmp_l(str str long ptr)
@ cdecl _mkdir(str)
......@@ -1448,7 +1448,7 @@
@ cdecl strnlen(str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -1500,10 +1500,10 @@
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscpy_s(ptr long wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncat_s(wstr long wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
......@@ -1513,7 +1513,7 @@
@ cdecl wcsrchr(wstr long)
@ cdecl wcsrtombs(ptr ptr long ptr)
@ cdecl wcsrtombs_s(ptr ptr long ptr long ptr)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -2855,6 +2855,18 @@ void * __cdecl memcpy(void *dst, const void *src, size_t n)
return memmove(dst, src, n);
}
/*********************************************************************
* _memccpy (MSVCRT.@)
*/
void * __cdecl _memccpy(void *dst, const void *src, int c, size_t n)
{
unsigned char *d = dst;
const unsigned char *s = src;
while (n--) if ((*d++ = *s++) == (unsigned char)c) return d;
return NULL;
}
static inline void memset_aligned_32(unsigned char *d, uint64_t v, size_t n)
{
unsigned char *end = d + n;
......@@ -3143,6 +3155,16 @@ size_t __cdecl strcspn(const char *str, const char *reject)
}
/*********************************************************************
* strspn (MSVCRT.@)
*/
size_t __cdecl strspn(const char *str, const char *accept)
{
const char *ptr;
for (ptr = str; *ptr; ptr++) if (!strchr( accept, *ptr )) break;
return ptr - str;
}
/*********************************************************************
* strpbrk (MSVCRT.@)
*/
char* __cdecl strpbrk(const char *str, const char *accept)
......
......@@ -489,6 +489,26 @@ wchar_t* CDECL _wcslwr( wchar_t* str )
}
/*********************************************************************
* wcscspn (MSVCRT.@)
*/
size_t __cdecl wcscspn(const wchar_t *str, const wchar_t *reject)
{
const wchar_t *ptr;
for (ptr = str; *ptr; ptr++) if (wcschr( reject, *ptr )) break;
return ptr - str;
}
/*********************************************************************
* wcsspn (MSVCRT.@)
*/
size_t __cdecl wcsspn(const wchar_t *str, const wchar_t *accept)
{
const wchar_t *ptr;
for (ptr = str; *ptr; ptr++) if (!wcschr( accept, *ptr )) break;
return ptr - str;
}
/*********************************************************************
* wcsncmp (MSVCRT.@)
*/
int CDECL wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t n)
......@@ -2482,6 +2502,18 @@ INT CDECL wcsncat_s(wchar_t *dst, size_t elem,
}
/*********************************************************************
* wcsncat (NTDLL.@)
*/
wchar_t * __cdecl wcsncat(wchar_t *s1, const wchar_t *s2, size_t n)
{
wchar_t *ret = s1;
while (*s1) s1++;
while (n-- > 0) if (!(*s1++ = *s2++)) return ret;
*s1 = 0;
return ret;
}
/*********************************************************************
* wctoint (INTERNAL)
*/
static int wctoint(WCHAR c, int base)
......
......@@ -451,7 +451,7 @@
@ cdecl _mbstok(str str)
@ cdecl _mbstrlen(str)
@ cdecl _mbsupr(str)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _mkdir(str)
@ cdecl _mktemp(str)
......@@ -786,7 +786,7 @@
@ cdecl strncpy(ptr str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtok(str str)
......@@ -819,15 +819,15 @@
@ cdecl wcscmp(wstr wstr)
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
@ cdecl wcspbrk(wstr wstr)
@ cdecl wcsrchr(wstr long)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstok(wstr wstr)
......
......@@ -719,7 +719,7 @@
@ cdecl _mbsupr_s(str long)
@ stub _mbsupr_s_l
@ cdecl _mbtowc_l(ptr str long ptr)
@ cdecl _memccpy(ptr ptr long long) ntdll._memccpy
@ cdecl _memccpy(ptr ptr long long)
@ cdecl _memicmp(str str long)
@ cdecl _memicmp_l(str str long ptr)
@ cdecl _mkdir(str)
......@@ -2516,7 +2516,7 @@
@ cdecl strnlen(str long)
@ cdecl strpbrk(str str)
@ cdecl strrchr(str long)
@ cdecl strspn(str str) ntdll.strspn
@ cdecl strspn(str str)
@ cdecl strstr(str str)
@ cdecl strtod(str ptr)
@ cdecl strtof(str ptr)
......@@ -2563,10 +2563,10 @@
@ cdecl wcscoll(wstr wstr)
@ cdecl wcscpy(ptr wstr)
@ cdecl wcscpy_s(ptr long wstr)
@ cdecl wcscspn(wstr wstr) ntdll.wcscspn
@ cdecl wcscspn(wstr wstr)
@ cdecl wcsftime(ptr long wstr ptr)
@ cdecl wcslen(wstr)
@ cdecl wcsncat(wstr wstr long) ntdll.wcsncat
@ cdecl wcsncat(wstr wstr long)
@ cdecl wcsncat_s(wstr long wstr long)
@ cdecl wcsncmp(wstr wstr long)
@ cdecl wcsncpy(ptr wstr long)
......@@ -2576,7 +2576,7 @@
@ cdecl wcsrchr(wstr long)
@ cdecl wcsrtombs(ptr ptr long ptr)
@ cdecl wcsrtombs_s(ptr ptr long ptr long ptr)
@ cdecl wcsspn(wstr wstr) ntdll.wcsspn
@ cdecl wcsspn(wstr wstr)
@ cdecl wcsstr(wstr wstr)
@ cdecl wcstod(wstr ptr)
@ cdecl wcstof(ptr ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment