summaryrefslogtreecommitdiff
path: root/wince
diff options
context:
space:
mode:
Diffstat (limited to 'wince')
-rw-r--r--wince/stdlib.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/wince/stdlib.c b/wince/stdlib.c
index b3d5f3bb6e..c7f0c8428a 100644
--- a/wince/stdlib.c
+++ b/wince/stdlib.c
@@ -20,3 +20,20 @@ char *_fullpath(char *absPath, const char *relPath,
return absPath;
}
+int mblen(const char *mbstr, size_t count)
+{
+ const char *p = mbstr;
+ size_t i;
+ int n=0;
+
+ for( i=0; i<count; i++ )
+ {
+ if( *p=='\0' ) break;
+ if( IsDBCSLeadByteEx( CP_ACP, *p ) )
+ n+=2;
+ else
+ n+=1;
+ }
+
+ return n;
+}