X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Fwcstombs.c;h=b78ddb7d53332f5ce5a05166c3589f5830b1a702;hb=e5456e3c2697c4e17fc9aa3439f2e305517b4d96;hp=08a639f7804f7393be906e5b9a34a55856482a9e;hpb=dcc8a8e99f69e090a03b7b868443addbc0817820;p=pdclib.old 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)); +} +*/