diff --git a/lib/libc/locale/multibyte_amd1.c b/lib/libc/locale/multibyte_amd1.c index 76e796a46af3..dfe8bbc2a273 100644 --- a/lib/libc/locale/multibyte_amd1.c +++ b/lib/libc/locale/multibyte_amd1.c @@ -1,4 +1,4 @@ -/* $NetBSD: multibyte_amd1.c,v 1.2 2002/03/18 09:56:49 yamt Exp $ */ +/* $NetBSD: multibyte_amd1.c,v 1.3 2002/03/26 06:10:27 yamt Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -28,7 +28,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: multibyte_amd1.c,v 1.2 2002/03/18 09:56:49 yamt Exp $"); +__RCSID("$NetBSD: multibyte_amd1.c,v 1.3 2002/03/26 06:10:27 yamt Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -80,6 +80,22 @@ mbsinit(const mbstate_t *ps) return ret; } +size_t +mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) +{ + size_t ret; + int err0; + + _fixup_ps(_CurrentRuneLocale, ps, s==NULL); + + err0 = _citrus_ctype_mbrtowc(_ps_to_ctype(ps), pwc, s, n, + _ps_to_private(ps), &ret); + if (err0) + errno = err0; + + return ret; +} + size_t mbsrtowcs(wchar_t *pwcs, const char **s, size_t n, mbstate_t *ps) { diff --git a/lib/libc/locale/multibyte_c90.c b/lib/libc/locale/multibyte_c90.c index 186187170f07..185eef0bb33d 100644 --- a/lib/libc/locale/multibyte_c90.c +++ b/lib/libc/locale/multibyte_c90.c @@ -1,4 +1,4 @@ -/* $NetBSD: multibyte_c90.c,v 1.2 2002/03/18 09:56:50 yamt Exp $ */ +/* $NetBSD: multibyte_c90.c,v 1.3 2002/03/26 06:10:27 yamt Exp $ */ /*- * Copyright (c)2002 Citrus Project, @@ -28,7 +28,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: multibyte_c90.c,v 1.2 2002/03/18 09:56:50 yamt Exp $"); +__RCSID("$NetBSD: multibyte_c90.c,v 1.3 2002/03/26 06:10:27 yamt Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -53,22 +53,6 @@ mblen(const char *s, size_t n) return ret; } -size_t -mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) -{ - size_t ret; - int err0; - - _fixup_ps(_CurrentRuneLocale, ps, s==NULL); - - err0 = _citrus_ctype_mbrtowc(_ps_to_ctype(ps), pwc, s, n, - _ps_to_private(ps), &ret); - if (err0) - errno = err0; - - return ret; -} - size_t mbstowcs(wchar_t *pwcs, const char *s, size_t n) {