xref: /titanic_44/usr/src/lib/libc/port/locale/mbsinit.c (revision 2d08521bd15501c8370ba2153b9cca4f094979d0)
14297a3b0SGarrett D'Amore /*
2*2d08521bSGarrett D'Amore  * This file and its contents are supplied under the terms of the
3*2d08521bSGarrett D'Amore  * Common Development and Distribution License ("CDDL"), version 1.0.
4*2d08521bSGarrett D'Amore  * You may only use this file in accordance with the terms of version
5*2d08521bSGarrett D'Amore  * 1.0 of the CDDL.
64297a3b0SGarrett D'Amore  *
7*2d08521bSGarrett D'Amore  * A full copy of the text of the CDDL should have accompanied this
8*2d08521bSGarrett D'Amore  * source.  A copy of the CDDL is also available via the Internet at
9*2d08521bSGarrett D'Amore  * http://www.illumos.org/license/CDDL.
10*2d08521bSGarrett D'Amore  */
11*2d08521bSGarrett D'Amore 
12*2d08521bSGarrett D'Amore /*
13*2d08521bSGarrett D'Amore  * Copyright 2013 Garrett D'Amore <garrett@damore.org>
144297a3b0SGarrett D'Amore  */
154297a3b0SGarrett D'Amore 
164297a3b0SGarrett D'Amore #include "lint.h"
17*2d08521bSGarrett D'Amore #include <locale.h>
18*2d08521bSGarrett D'Amore #include "localeimpl.h"
19*2d08521bSGarrett D'Amore #include "lctype.h"
204297a3b0SGarrett D'Amore 
214297a3b0SGarrett D'Amore int
mbsinit_l(const mbstate_t * s,locale_t loc)22*2d08521bSGarrett D'Amore mbsinit_l(const mbstate_t *s, locale_t loc)
234297a3b0SGarrett D'Amore {
24*2d08521bSGarrett D'Amore 	return (loc->ctype->lc_mbsinit(s));
25*2d08521bSGarrett D'Amore }
264297a3b0SGarrett D'Amore 
27*2d08521bSGarrett D'Amore int
mbsinit(const mbstate_t * s)28*2d08521bSGarrett D'Amore mbsinit(const mbstate_t *s)
29*2d08521bSGarrett D'Amore {
30*2d08521bSGarrett D'Amore 	return (mbsinit_l(s, uselocale(NULL)));
314297a3b0SGarrett D'Amore }
32