X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdlib%2Fmbstowcs.c;h=a7cd2a0fb8709af6e8ef34241c71da031216a52e;hp=e58d9b97eff940e80f9f0ac22f91fd7e40b87221;hb=1d9d92ba957a0b8307c9a65c35867fde68e6533b;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/stdlib/mbstowcs.c b/functions/stdlib/mbstowcs.c index e58d9b9..a7cd2a0 100644 --- a/functions/stdlib/mbstowcs.c +++ b/functions/stdlib/mbstowcs.c @@ -1,8 +1,19 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * --------------------------------------------------------------------------*/ size_t mbstowcs( wchar_t * restrict wcs, const char * restrict s, size_t n ) { /* TODO */ }; + +/* PDPC code - unreviewed +{ + strncpy((char *)pwcs, s, n); + if (strlen(s) >= n) + { + return (n); + } + return (strlen((char *)pwcs)); +} +*/