]> pd.if.org Git - pdclib/blobdiff - functions/wchar/wcrtomb.c
Disabled unused function.
[pdclib] / functions / wchar / wcrtomb.c
index e692923c53121d322f31f679845bb8c9b09d1ea2..3fddc1fd6298fe15c38a389cd59e73c15c4d4642 100644 (file)
 #include <_PDCLIB_encoding.h>
 #include <_PDCLIB_locale.h>
 
-size_t wcrtomb_l(
+#if 0
+/*
+   TODO: Other conversion functions call static ..._l helpers, but this one
+   does not, making this function "defined but not used".
+*/
+static size_t wcrtomb_l(
     char        *restrict   s, 
     wchar_t                 wc,
     mbstate_t   *restrict   ps,
@@ -25,6 +30,7 @@ size_t wcrtomb_l(
 {
     return _PDCLIB_cwcrtomb_l(s, wc, ps, l);
 }
+#endif
 
 size_t wcrtomb(
     char        *restrict   s, 
@@ -32,7 +38,8 @@ size_t wcrtomb(
     mbstate_t   *restrict   ps
 )
 {
-    return _PDCLIB_cwcrtomb(s, wc, ps);
+    static mbstate_t st;
+    return _PDCLIB_cwcrtomb(s, wc, ps ? ps : &st);
 }
 
 #endif