X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Fmbtowc.c;h=c022d6e85612c41e5dcc41dd19f90f9a97eaf99a;hb=refs%2Ftags%2FOLD;hp=89a68ca828b02440c98aad078e7088d6193b2547;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec;p=pdclib diff --git a/functions/stdlib/mbtowc.c b/functions/stdlib/mbtowc.c index 89a68ca..c022d6e 100644 --- a/functions/stdlib/mbtowc.c +++ b/functions/stdlib/mbtowc.c @@ -1,8 +1,29 @@ -// ---------------------------------------------------------------------------- -// $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. + * --------------------------------------------------------------------------*/ int mbtowc( wchar_t * restrict pwc, const char * restrict s, size_t n ) { /* TODO */ }; + +/* PDPC code - unreviewed +{ + if (s == NULL) + { + return (0); + } + if (n == 1) + { + if (pwc != NULL) + { + *pwc = *s; + } + return (1); + } + else + { + return (-1); + } +} +*/