1231673Stheraven/*- 2231673Stheraven * Copyright (c) 2011, 2012 The FreeBSD Foundation 3231673Stheraven * All rights reserved. 4231673Stheraven * 5231673Stheraven * This software was developed by David Chisnall under sponsorship from 6231673Stheraven * the FreeBSD Foundation. 7231673Stheraven * 8231673Stheraven * Redistribution and use in source and binary forms, with or without 9231673Stheraven * modification, are permitted provided that the following conditions 10231673Stheraven * are met: 11231673Stheraven * 1. Redistributions of source code must retain the above copyright 12231673Stheraven * notice, this list of conditions and the following disclaimer. 13231673Stheraven * 2. Redistributions in binary form must reproduce the above copyright 14231673Stheraven * notice, this list of conditions and the following disclaimer in the 15231673Stheraven * documentation and/or other materials provided with the distribution. 16231673Stheraven * 17231673Stheraven * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18231673Stheraven * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19231673Stheraven * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20231673Stheraven * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21231673Stheraven * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22231673Stheraven * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23231673Stheraven * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24231673Stheraven * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25231673Stheraven * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26231673Stheraven * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27231673Stheraven * SUCH DAMAGE. 28231673Stheraven * 29231673Stheraven * $FreeBSD: releng/11.0/include/xlocale/_locale.h 231673 2012-02-14 12:03:23Z theraven $ 30231673Stheraven */ 31231673Stheraven 32231673Stheraven#ifndef _XLOCALE_LOCALE_H 33231673Stheraven#define _XLOCALE_LOCALE_H 34231673Stheraven 35231673Stheraven#define LC_COLLATE_MASK (1<<0) 36231673Stheraven#define LC_CTYPE_MASK (1<<1) 37231673Stheraven#define LC_MESSAGES_MASK (1<<2) 38231673Stheraven#define LC_MONETARY_MASK (1<<3) 39231673Stheraven#define LC_NUMERIC_MASK (1<<4) 40231673Stheraven#define LC_TIME_MASK (1<<5) 41231673Stheraven#define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \ 42231673Stheraven LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK) 43231673Stheraven#define LC_GLOBAL_LOCALE ((locale_t)-1) 44231673Stheraven 45231673Stheraven#ifndef _LOCALE_T_DEFINED 46231673Stheraven#define _LOCALE_T_DEFINED 47231673Stheraventypedef struct _xlocale *locale_t; 48231673Stheraven#endif 49231673Stheraven 50231673Stheravenlocale_t duplocale(locale_t base); 51231673Stheravenint freelocale(locale_t loc); 52231673Stheravenlocale_t newlocale(int mask, const char *locale, locale_t base); 53231673Stheravenconst char *querylocale(int mask, locale_t loc); 54231673Stheravenlocale_t uselocale(locale_t loc); 55231673Stheraven 56231673Stheraven#endif /* _XLOCALE_LOCALE_H */ 57