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

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

Issue 224943002: icu local change part1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: function indentation changed Created 6 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « icu52/source/common/dictbe.cpp ('k') | icu52/source/common/putilimp.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 /* 1 /*
2 ********************************************************************** 2 **********************************************************************
3 * Copyright (C) 1996-2013, International Business Machines 3 * Copyright (C) 1996-2013, International Business Machines
4 * Corporation and others. All Rights Reserved. 4 * Corporation and others. All Rights Reserved.
5 ********************************************************************** 5 **********************************************************************
6 * 6 *
7 * Provides functionality for mapping between 7 * Provides functionality for mapping between
8 * LCID and Posix IDs or ICU locale to codepage 8 * LCID and Posix IDs or ICU locale to codepage
9 * 9 *
10 * Note: All classes and code in this file are 10 * Note: All classes and code in this file are
(...skipping 11 matching lines...) Expand all
22 * MAX_ID_LENGTH. 22 * MAX_ID_LENGTH.
23 * 04/23/99 stephen Added C wrapper for convertToPosix. 23 * 04/23/99 stephen Added C wrapper for convertToPosix.
24 * 09/18/00 george Removed the memory leaks. 24 * 09/18/00 george Removed the memory leaks.
25 * 08/23/01 george Convert to C 25 * 08/23/01 george Convert to C
26 */ 26 */
27 27
28 #include "locmap.h" 28 #include "locmap.h"
29 #include "cstring.h" 29 #include "cstring.h"
30 #include "cmemory.h" 30 #include "cmemory.h"
31 31
32 /**
33 * Chromium has its own implementation to determine the default locale that uses
34 * Windows locale API where available and falls back to the old API at run-time.
35 */
36 #if 0
32 #if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500) 37 #if U_PLATFORM == U_PF_WINDOWS && defined(_MSC_VER) && (_MSC_VER >= 1500)
33 /* 38 /*
34 * TODO: It seems like we should widen this to 39 * TODO: It seems like we should widen this to
35 * either U_PLATFORM_USES_ONLY_WIN32_API (includes MinGW) 40 * either U_PLATFORM_USES_ONLY_WIN32_API (includes MinGW)
36 * or U_PLATFORM_HAS_WIN32_API (includes MinGW and Cygwin) 41 * or U_PLATFORM_HAS_WIN32_API (includes MinGW and Cygwin)
37 * but those use gcc and won't have defined(_MSC_VER). 42 * but those use gcc and won't have defined(_MSC_VER).
38 * We might need to #include some Windows header and test for some version macro from there. 43 * We might need to #include some Windows header and test for some version macro from there.
39 * Or call some Windows function and see what it returns. 44 * Or call some Windows function and see what it returns.
40 */ 45 */
41 #define USE_WINDOWS_LOCALE_API 46 #define USE_WINDOWS_LOCALE_API
42 #endif 47 #endif
48 #endif
43 49
44 #ifdef USE_WINDOWS_LOCALE_API 50 #ifdef USE_WINDOWS_LOCALE_API
45 #include <windows.h> 51 #include <windows.h>
46 #include <winnls.h> 52 #include <winnls.h>
47 #endif 53 #endif
48 54
49 /* 55 /*
50 * Note: 56 * Note:
51 * The mapping from Win32 locale ID numbers to POSIX locale strings should 57 * The mapping from Win32 locale ID numbers to POSIX locale strings should
52 * be the faster one. 58 * be the faster one.
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 if (fallbackValue != (uint32_t)-1) { 1134 if (fallbackValue != (uint32_t)-1) {
1129 *status = U_USING_FALLBACK_WARNING; 1135 *status = U_USING_FALLBACK_WARNING;
1130 return fallbackValue; 1136 return fallbackValue;
1131 } 1137 }
1132 1138
1133 /* no match found */ 1139 /* no match found */
1134 *status = U_ILLEGAL_ARGUMENT_ERROR; 1140 *status = U_ILLEGAL_ARGUMENT_ERROR;
1135 return 0; /* return international (root) */ 1141 return 0; /* return international (root) */
1136 } 1142 }
1137 1143
OLDNEW
« no previous file with comments | « icu52/source/common/dictbe.cpp ('k') | icu52/source/common/putilimp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698