]> pd.if.org Git - pdclib/blobdiff - functions/stdlib/mbtowc.c
Merged PDPCLIB and Therx code.
[pdclib] / functions / stdlib / mbtowc.c
index 89a68ca828b02440c98aad078e7088d6193b2547..7163019a0e7c18180b37b8b6af6eec7e5b1a009d 100644 (file)
@@ -6,3 +6,24 @@
 // ----------------------------------------------------------------------------
 
 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);
+    }
+}
+*/
\ No newline at end of file