4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore/*
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * This file and its contents are supplied under the terms of the
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * Common Development and Distribution License ("CDDL"), version 1.0.
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * You may only use this file in accordance with the terms of version
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * 1.0 of the CDDL.
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore *
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * A full copy of the text of the CDDL should have accompanied this
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * source. A copy of the CDDL is also available via the Internet at
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * http://www.illumos.org/license/CDDL.
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore */
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore/*
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore * Copyright 2013 Garrett D'Amore <garrett@damore.org>
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore */
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore#include "lint.h"
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore#include <locale.h>
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore#include "localeimpl.h"
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore#include "lctype.h"
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amoreint
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amorembsinit_l(const mbstate_t *s, locale_t loc)
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore{
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore return (loc->ctype->lc_mbsinit(s));
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore}
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amoreint
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amorembsinit(const mbstate_t *s)
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore{
2d08521bd15501c8370ba2153b9cca4f094979d0Garrett D'Amore return (mbsinit_l(s, uselocale(NULL)));
4297a3b0d0a35d80f86fff155e288e885a100e6dGarrett D'Amore}