Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: source/common/locmap.c

Issue 2442923002: ICU update to 58 part 2 (Closed)
Patch Set: apply more patches and updates; almost ready to roll Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/common/dictbe.cpp ('k') | source/common/ucmndata.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (C) 2016 and later: Unicode, Inc. and others. 1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html 2 // License & terms of use: http://www.unicode.org/copyright.html
3 /* 3 /*
4 ********************************************************************** 4 **********************************************************************
5 * Copyright (C) 1996-2016, International Business Machines 5 * Copyright (C) 1996-2016, International Business Machines
6 * Corporation and others. All Rights Reserved. 6 * Corporation and others. All Rights Reserved.
7 ********************************************************************** 7 **********************************************************************
8 * 8 *
9 * Provides functionality for mapping between 9 * Provides functionality for mapping between
10 * LCID and Posix IDs or ICU locale to codepage 10 * LCID and Posix IDs or ICU locale to codepage
(...skipping 13 matching lines...) Expand all
24 * MAX_ID_LENGTH. 24 * MAX_ID_LENGTH.
25 * 04/23/99 stephen Added C wrapper for convertToPosix. 25 * 04/23/99 stephen Added C wrapper for convertToPosix.
26 * 09/18/00 george Removed the memory leaks. 26 * 09/18/00 george Removed the memory leaks.
27 * 08/23/01 george Convert to C 27 * 08/23/01 george Convert to C
28 */ 28 */
29 29
30 #include "locmap.h" 30 #include "locmap.h"
31 #include "cstring.h" 31 #include "cstring.h"
32 #include "cmemory.h" 32 #include "cmemory.h"
33 33
34 #if 0
34 #if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500) 35 #if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500)
35 /* 36 /*
36 * TODO: It seems like we should widen this to 37 * TODO: It seems like we should widen this to
37 * either U_PLATFORM_USES_ONLY_WIN32_API (includes MinGW) 38 * either U_PLATFORM_USES_ONLY_WIN32_API (includes MinGW)
38 * or U_PLATFORM_HAS_WIN32_API (includes MinGW and Cygwin) 39 * or U_PLATFORM_HAS_WIN32_API (includes MinGW and Cygwin)
39 * but those use gcc and won't have defined(_MSC_VER). 40 * but those use gcc and won't have defined(_MSC_VER).
40 * We might need to #include some Windows header and test for some version macro from there. 41 * We might need to #include some Windows header and test for some version macro from there.
41 * Or call some Windows function and see what it returns. 42 * Or call some Windows function and see what it returns.
42 */ 43 */
43 #define USE_WINDOWS_LOCALE_API 44 #define USE_WINDOWS_LOCALE_API
44 #endif 45 #endif
46 #endif
45 47
46 #ifdef USE_WINDOWS_LOCALE_API 48 #ifdef USE_WINDOWS_LOCALE_API
47 #include <windows.h> 49 #include <windows.h>
48 #include <winnls.h> 50 #include <winnls.h>
49 #endif 51 #endif
50 52
51 /* 53 /*
52 * Note: 54 * Note:
53 * The mapping from Win32 locale ID numbers to POSIX locale strings should 55 * The mapping from Win32 locale ID numbers to POSIX locale strings should
54 * be the faster one. 56 * be the faster one.
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 if (fallbackValue != (uint32_t)-1) { 1168 if (fallbackValue != (uint32_t)-1) {
1167 *status = U_USING_FALLBACK_WARNING; 1169 *status = U_USING_FALLBACK_WARNING;
1168 return fallbackValue; 1170 return fallbackValue;
1169 } 1171 }
1170 1172
1171 /* no match found */ 1173 /* no match found */
1172 *status = U_ILLEGAL_ARGUMENT_ERROR; 1174 *status = U_ILLEGAL_ARGUMENT_ERROR;
1173 return 0; /* return international (root) */ 1175 return 0; /* return international (root) */
1174 } 1176 }
1175 1177
OLDNEW
« no previous file with comments | « source/common/dictbe.cpp ('k') | source/common/ucmndata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698