]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/locmap.h
ICU-62107.0.1.tar.gz
[apple/icu.git] / icuSources / common / locmap.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 *
6 * Copyright (C) 1996-2013, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 ******************************************************************************
10 *
11 * File locmap.h : Locale Mapping Classes
12 *
13 *
14 * Created by: Helena Shih
15 *
16 * Modification History:
17 *
18 * Date Name Description
19 * 3/11/97 aliu Added setId().
20 * 4/20/99 Madhu Added T_convertToPosix()
21 * 09/18/00 george Removed the memory leaks.
22 * 08/23/01 george Convert to C
23 *============================================================================
24 */
25
26 #ifndef LOCMAP_H
27 #define LOCMAP_H
28
29 #include "unicode/utypes.h"
30
31 #define LANGUAGE_LCID(hostID) (uint16_t)(0x03FF & hostID)
32
33 U_CAPI int32_t uprv_convertToPosix(uint32_t hostid, char* posixID, int32_t posixIDCapacity, UErrorCode* status);
34
35 /* Don't call these functions directly. Use uloc_getLCID instead. */
36 U_CAPI uint32_t uprv_convertToLCIDPlatform(const char *localeID); // Leverage platform conversion if possible
37 U_CAPI uint32_t uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status);
38
39 #endif /* LOCMAP_H */
40