Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mbrlen.c « stdlib « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8f0c648b96f1e14be7c22a94254875b5112a68d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <wchar.h>
#include <stdlib.h>
#include <stdio.h>
#include <reent.h>
#include <errno.h>

size_t
mbrlen(const char *s, size_t n, mbstate_t *ps)
{
  mbstate_t internal;

  return mbrtowc(NULL, s, n, ps != NULL ? ps : &internal);
}