X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdlib%2Fwcstombs.c;h=b78ddb7d53332f5ce5a05166c3589f5830b1a702;hp=08a639f7804f7393be906e5b9a34a55856482a9e;hb=0a5395faab237ba9008352b0f4bee9659bbd3d5f;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec diff --git a/functions/stdlib/wcstombs.c b/functions/stdlib/wcstombs.c index 08a639f..b78ddb7 100644 --- a/functions/stdlib/wcstombs.c +++ b/functions/stdlib/wcstombs.c @@ -6,3 +6,14 @@ // ---------------------------------------------------------------------------- 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)); +} +*/