mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 09:33:48 +00:00

- TSVN choked repeatedly when attempting to merge ~9000 revs into the branch (tried 3 times on 2 different computers) - If someone wants to delete aicom-network-fixes, they are welcome to - Lesson learned: Letting a branch get thousands of revs out of date is a horrible idea svn path=/branches/aicom-network-branch/; revision=44353
28 lines
403 B
C
28 lines
403 B
C
#include <precomp.h>
|
|
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
size_t mbstowcs (wchar_t *widechar, const char *multibyte, size_t number)
|
|
{
|
|
int bytes;
|
|
size_t n = 0;
|
|
|
|
while (n < number) {
|
|
|
|
if ((bytes = mbtowc (widechar, multibyte, MB_LEN_MAX)) < 0)
|
|
return (size_t) -1;
|
|
|
|
if (bytes == 0) {
|
|
*widechar = (wchar_t) '\0';
|
|
return n;
|
|
}
|
|
|
|
widechar++;
|
|
multibyte += bytes;
|
|
n++;
|
|
}
|
|
|
|
return n;
|
|
}
|