| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /* | 
|  | 2 | * Copyright (C) 2008 The Android Open Source Project | 
|  | 3 | * All rights reserved. | 
|  | 4 | * | 
|  | 5 | * Redistribution and use in source and binary forms, with or without | 
|  | 6 | * modification, are permitted provided that the following conditions | 
|  | 7 | * are met: | 
|  | 8 | *  * Redistributions of source code must retain the above copyright | 
|  | 9 | *    notice, this list of conditions and the following disclaimer. | 
|  | 10 | *  * Redistributions in binary form must reproduce the above copyright | 
|  | 11 | *    notice, this list of conditions and the following disclaimer in | 
|  | 12 | *    the documentation and/or other materials provided with the | 
|  | 13 | *    distribution. | 
|  | 14 | * | 
|  | 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 
|  | 16 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 
|  | 17 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 
|  | 18 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | 
|  | 19 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | 
|  | 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | 
|  | 21 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | 
|  | 22 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | 
|  | 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 
|  | 24 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | 
|  | 25 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 
|  | 26 | * SUCH DAMAGE. | 
|  | 27 | */ | 
| Elliott Hughes | 5470c18 | 2016-07-22 11:36:17 -0700 | [diff] [blame] | 28 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | #ifndef _LOCALE_H_ | 
|  | 30 | #define _LOCALE_H_ | 
|  | 31 |  | 
|  | 32 | #include <sys/cdefs.h> | 
| Elliott Hughes | c4936e2 | 2014-04-08 17:05:05 -0700 | [diff] [blame] | 33 | #include <xlocale.h> | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 |  | 
| Elliott Hughes | c553788 | 2016-08-12 10:28:08 -0700 | [diff] [blame] | 35 | #define __need_NULL | 
|  | 36 | #include <stddef.h> | 
|  | 37 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 38 | __BEGIN_DECLS | 
|  | 39 |  | 
| Dan Albert | db68e56 | 2014-04-18 12:36:06 -0700 | [diff] [blame] | 40 | #define LC_CTYPE           0 | 
|  | 41 | #define LC_NUMERIC         1 | 
|  | 42 | #define LC_TIME            2 | 
|  | 43 | #define LC_COLLATE         3 | 
|  | 44 | #define LC_MONETARY        4 | 
|  | 45 | #define LC_MESSAGES        5 | 
|  | 46 | #define LC_ALL             6 | 
|  | 47 | #define LC_PAPER           7 | 
|  | 48 | #define LC_NAME            8 | 
|  | 49 | #define LC_ADDRESS         9 | 
|  | 50 | #define LC_TELEPHONE      10 | 
|  | 51 | #define LC_MEASUREMENT    11 | 
|  | 52 | #define LC_IDENTIFICATION 12 | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 53 |  | 
| Elliott Hughes | c4936e2 | 2014-04-08 17:05:05 -0700 | [diff] [blame] | 54 | #define LC_CTYPE_MASK          (1 << LC_CTYPE) | 
|  | 55 | #define LC_NUMERIC_MASK        (1 << LC_NUMERIC) | 
|  | 56 | #define LC_TIME_MASK           (1 << LC_TIME) | 
|  | 57 | #define LC_COLLATE_MASK        (1 << LC_COLLATE) | 
|  | 58 | #define LC_MONETARY_MASK       (1 << LC_MONETARY) | 
|  | 59 | #define LC_MESSAGES_MASK       (1 << LC_MESSAGES) | 
|  | 60 | #define LC_PAPER_MASK          (1 << LC_PAPER) | 
|  | 61 | #define LC_NAME_MASK           (1 << LC_NAME) | 
|  | 62 | #define LC_ADDRESS_MASK        (1 << LC_ADDRESS) | 
|  | 63 | #define LC_TELEPHONE_MASK      (1 << LC_TELEPHONE) | 
|  | 64 | #define LC_MEASUREMENT_MASK    (1 << LC_MEASUREMENT) | 
|  | 65 | #define LC_IDENTIFICATION_MASK (1 << LC_IDENTIFICATION) | 
|  | 66 |  | 
|  | 67 | #define LC_ALL_MASK (LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK | \ | 
|  | 68 | LC_MONETARY_MASK | LC_MESSAGES_MASK | LC_PAPER_MASK | LC_NAME_MASK | \ | 
|  | 69 | LC_ADDRESS_MASK | LC_TELEPHONE_MASK | LC_MEASUREMENT_MASK | \ | 
|  | 70 | LC_IDENTIFICATION_MASK) | 
|  | 71 |  | 
| Pavel Chupin | 50282f7 | 2014-03-25 13:43:04 +0400 | [diff] [blame] | 72 | struct lconv { | 
| Elliott Hughes | 5470c18 | 2016-07-22 11:36:17 -0700 | [diff] [blame] | 73 | char* decimal_point; | 
|  | 74 | char* thousands_sep; | 
|  | 75 | char* grouping; | 
|  | 76 | char* int_curr_symbol; | 
|  | 77 | char* currency_symbol; | 
|  | 78 | char* mon_decimal_point; | 
|  | 79 | char* mon_thousands_sep; | 
|  | 80 | char* mon_grouping; | 
|  | 81 | char* positive_sign; | 
|  | 82 | char* negative_sign; | 
|  | 83 | char int_frac_digits; | 
|  | 84 | char frac_digits; | 
|  | 85 | char p_cs_precedes; | 
|  | 86 | char p_sep_by_space; | 
|  | 87 | char n_cs_precedes; | 
|  | 88 | char n_sep_by_space; | 
|  | 89 | char p_sign_posn; | 
|  | 90 | char n_sign_posn; | 
|  | 91 | char int_p_cs_precedes; | 
|  | 92 | char int_p_sep_by_space; | 
|  | 93 | char int_n_cs_precedes; | 
|  | 94 | char int_n_sep_by_space; | 
|  | 95 | char int_p_sign_posn; | 
|  | 96 | char int_n_sign_posn; | 
| Pavel Chupin | 50282f7 | 2014-03-25 13:43:04 +0400 | [diff] [blame] | 97 | }; | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 98 |  | 
| Dan Albert | cb0b143 | 2016-09-06 16:51:00 -0700 | [diff] [blame] | 99 | struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD; | 
| Elliott Hughes | c4936e2 | 2014-04-08 17:05:05 -0700 | [diff] [blame] | 100 |  | 
| Elliott Hughes | ff26a16 | 2017-08-17 22:34:21 +0000 | [diff] [blame] | 101 | locale_t duplocale(locale_t __l) __INTRODUCED_IN(21); | 
|  | 102 | void freelocale(locale_t __l) __INTRODUCED_IN(21); | 
|  | 103 | locale_t newlocale(int __category_mask, const char* __locale_name, locale_t __base) __INTRODUCED_IN(21); | 
|  | 104 | char* setlocale(int __category, const char* __locale_name); | 
|  | 105 | locale_t uselocale(locale_t __l) __INTRODUCED_IN(21); | 
| Elliott Hughes | c4936e2 | 2014-04-08 17:05:05 -0700 | [diff] [blame] | 106 |  | 
| Elliott Hughes | 5470c18 | 2016-07-22 11:36:17 -0700 | [diff] [blame] | 107 | #define LC_GLOBAL_LOCALE __BIONIC_CAST(reinterpret_cast, locale_t, -1L) | 
| Pavel Chupin | 50282f7 | 2014-03-25 13:43:04 +0400 | [diff] [blame] | 108 |  | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 109 | __END_DECLS | 
|  | 110 |  | 
| Elliott Hughes | ff26a16 | 2017-08-17 22:34:21 +0000 | [diff] [blame] | 111 | #endif |