1 /* 2 ** Copyright 2011, Oliver Tappe, zooey@hirschkaefer.de. All rights reserved. 3 ** Distributed under the terms of the Haiku License. 4 */ 5 6 #include <wchar_private.h> 7 8 9 size_t 10 __mbrlen(const char* s, size_t n, mbstate_t* ps) 11 { 12 if (ps == NULL) { 13 static mbstate_t internalMbState; 14 ps = &internalMbState; 15 } 16 17 return __mbrtowc(NULL, s, n, ps); 18 } 19 20 21 B_DEFINE_WEAK_ALIAS(__mbrlen, mbrlen); 22