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

Side by Side Diff: source/test/letest/letsutil.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 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
« no previous file with comments | « source/test/letest/letsutil.h ('k') | source/test/letest/xmlreader.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 * 3 *
4 * Copyright (C) 1999-2008, International Business Machines 4 * Copyright (C) 1999-2014, International Business Machines
5 * Corporation and others. All Rights Reserved. 5 * Corporation and others. All Rights Reserved.
6 * 6 *
7 ******************************************************************************* 7 *******************************************************************************
8 * file name: letsutil.cpp 8 * file name: letsutil.cpp
9 * 9 *
10 * created on: 04/25/2006 10 * created on: 04/25/2006
11 * created by: Eric R. Mader 11 * created by: Eric R. Mader
12 */ 12 */
13 13
14 #include "unicode/utypes.h" 14 #include "unicode/utypes.h"
15 #include "unicode/unistr.h" 15 #include "unicode/unistr.h"
16 #include "unicode/ubidi.h" 16 #include "unicode/ubidi.h"
17 17
18 #include "layout/LETypes.h" 18 #include "layout/LETypes.h"
19 #include "layout/LEScripts.h" 19 #include "layout/LEScripts.h"
20 #include "layout/LayoutEngine.h" 20 #include "layout/LayoutEngine.h"
21 #include "layout/LELanguages.h" 21 #include "layout/LELanguages.h"
22 22
23 #ifndef USING_ICULEHB
23 #include "OpenTypeLayoutEngine.h" 24 #include "OpenTypeLayoutEngine.h"
25 #endif
24 26
25 #include "letest.h" 27 #include "letest.h"
26 #include "letsutil.h" 28 #include "letsutil.h"
27 29
28 U_NAMESPACE_USE 30 U_NAMESPACE_USE
29 31
30 char *getCString(const UnicodeString *uString) 32 char *getCString(const UnicodeString *uString)
31 { 33 {
32 if (uString == NULL) { 34 if (uString == NULL) {
33 return NULL; 35 return NULL;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 97 }
96 98
97 le_int32 getLanguageCode(const char *lang) 99 le_int32 getLanguageCode(const char *lang)
98 { 100 {
99 if (strlen(lang) != 3) { 101 if (strlen(lang) != 3) {
100 return -1; 102 return -1;
101 } 103 }
102 104
103 LETag langTag = (LETag) ((lang[0] << 24) + (lang[1] << 16) + (lang[2] << 8) + 0x20); 105 LETag langTag = (LETag) ((lang[0] << 24) + (lang[1] << 16) + (lang[2] << 8) + 0x20);
104 106
107 #ifndef USING_ICULEHB
105 for (le_int32 i = 0; i < languageCodeCount; i += 1) { 108 for (le_int32 i = 0; i < languageCodeCount; i += 1) {
106 if (langTag == OpenTypeLayoutEngine::languageTags[i]) { 109 if (langTag == OpenTypeLayoutEngine::languageTags[i]) {
107 return i; 110 return i;
108 } 111 }
109 } 112 }
113 #endif
110 114
111 return -1; 115 return -1;
112 } 116 }
113 117
OLDNEW
« no previous file with comments | « source/test/letest/letsutil.h ('k') | source/test/letest/xmlreader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698