X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdlib%2Fwcstombs.c;h=dc964f7a320cc6aa444e0c9d197e53db5e846486;hp=08a639f7804f7393be906e5b9a34a55856482a9e;hb=1d9d92ba957a0b8307c9a65c35867fde68e6533b;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/stdlib/wcstombs.c b/functions/stdlib/wcstombs.c index 08a639f..dc964f7 100644 --- a/functions/stdlib/wcstombs.c +++ b/functions/stdlib/wcstombs.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 wcstombs( char * restrict s, const wchar_t * restrict wcs, size_t n ) { /* TODO */ }; + +/* PDPC code - unreviewed +{ + strncpy(s, (const char *)pwcs, n); + if (strlen((const char *)pwcs) >= n) + { + return (n); + } + return (strlen(s)); +} +*/