Import MSL headers and files
This commit is contained in:
parent
0de51f3ffa
commit
b0ed90ff26
40 changed files with 2736 additions and 29 deletions
18
src/MSL_C.PPCEABI.bare.H/mbstring.c
Normal file
18
src/MSL_C.PPCEABI.bare.H/mbstring.c
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include "PowerPC_EABI_Support/Msl/MSL_C/MSL_Common/mbstring.h"
|
||||
|
||||
size_t wcstombs(char* s, const wchar_t* pwcs, size_t n)
|
||||
{
|
||||
wchar_t next;
|
||||
size_t chars_written;
|
||||
int i;
|
||||
|
||||
chars_written = 0;
|
||||
for (i = 0; i < n; ++i) {
|
||||
next = *pwcs++;
|
||||
*s++ = (char)next;
|
||||
if ((char)next == '\0')
|
||||
break;
|
||||
++chars_written;
|
||||
}
|
||||
return chars_written;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue