crt: Remove static helper function mbrtowc_cp()

Both users of this function (mbrlen and mbrtowc) calls it with the current
locale and maximum character length for current locale.

So replace the mbrtowc_cp() usage in mbrlen() directly by mbrtowc().

Also replace MB_CUR_MAX macro by the ___mb_cur_max_func() function to show
that the maximum character length depends on the locale and is not a
constant value.

Signed-off-by: Martin Storsjö <martin@martin.st>
1 file changed