]> pd.if.org Git - pdclib/blobdiff - functions/locale/_PDCLIB_mb_cur_max.c
PDCLIB-2 PDCLIB-9: MB_CUR_MAX macro and implementation
[pdclib] / functions / locale / _PDCLIB_mb_cur_max.c
diff --git a/functions/locale/_PDCLIB_mb_cur_max.c b/functions/locale/_PDCLIB_mb_cur_max.c
new file mode 100644 (file)
index 0000000..a5f459d
--- /dev/null
@@ -0,0 +1,27 @@
+/* _PDCLIB_mb_cur_max( void ) 
+
+   This file is part of the Public Domain C Library (PDCLib).
+   Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+#include <locale.h>
+#ifndef REGTEST
+#include <_PDCLIB_locale.h>
+#include <_PDCLIB_encoding.h>
+
+size_t _PDCLIB_mb_cur_max( void )
+{
+    return _PDCLIB_threadlocale()->_Codec->__mb_max;
+}
+
+#endif
+
+#ifdef TEST
+#include <_PDCLIB_test.h>
+
+int main( void )
+{
+    TESTCASE( NO_TESTDRIVER );
+    return TEST_RESULTS;
+}
+#endif