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

Side by Side Diff: source/tools/toolutil/ppucd.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/tools/toolutil/pkgitems.cpp ('k') | source/tools/toolutil/swapimpl.cpp » ('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) 2011-2013, International Business Machines 3 * Copyright (C) 2011-2014, International Business Machines
4 * Corporation and others. All Rights Reserved. 4 * Corporation and others. All Rights Reserved.
5 ******************************************************************************* 5 *******************************************************************************
6 * file name: ppucd.cpp 6 * file name: ppucd.cpp
7 * encoding: US-ASCII 7 * encoding: US-ASCII
8 * tab size: 8 (not used) 8 * tab size: 8 (not used)
9 * indentation:4 9 * indentation:4
10 * 10 *
11 * created on: 2011dec11 11 * created on: 2011dec11
12 * created by: Markus W. Scherer 12 * created by: Markus W. Scherer
13 */ 13 */
14 14
15 #include "unicode/utypes.h" 15 #include "unicode/utypes.h"
16 #include "unicode/uchar.h" 16 #include "unicode/uchar.h"
17 #include "charstr.h" 17 #include "charstr.h"
18 #include "cstring.h" 18 #include "cstring.h"
19 #include "ppucd.h" 19 #include "ppucd.h"
20 #include "uassert.h" 20 #include "uassert.h"
21 #include "uparse.h" 21 #include "uparse.h"
22 22
23 #include <stdio.h> 23 #include <stdio.h>
24 #include <string.h> 24 #include <string.h>
25 25
26 #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
27
28 U_NAMESPACE_BEGIN 26 U_NAMESPACE_BEGIN
29 27
30 PropertyNames::~PropertyNames() {} 28 PropertyNames::~PropertyNames() {}
31 29
32 int32_t 30 int32_t
33 PropertyNames::getPropertyEnum(const char *name) const { 31 PropertyNames::getPropertyEnum(const char *name) const {
34 return u_getPropertyEnum(name); 32 return u_getPropertyEnum(name);
35 } 33 }
36 34
37 int32_t 35 int32_t
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } else { 289 } else {
292 binaryValue=-1; 290 binaryValue=-1;
293 // Copy out the property name rather than modifying the field (writing a NUL). 291 // Copy out the property name rather than modifying the field (writing a NUL).
294 pBuffer.append(p, (int32_t)(v-p), errorCode); 292 pBuffer.append(p, (int32_t)(v-p), errorCode);
295 p=pBuffer.data(); 293 p=pBuffer.data();
296 ++v; 294 ++v;
297 } 295 }
298 int32_t prop=pnames->getPropertyEnum(p); 296 int32_t prop=pnames->getPropertyEnum(p);
299 if(prop<0) { 297 if(prop<0) {
300 for(int32_t i=0;; ++i) { 298 for(int32_t i=0;; ++i) {
301 if(i==LENGTHOF(ppucdProperties)) { 299 if(i==UPRV_LENGTHOF(ppucdProperties)) {
302 // Ignore unknown property names. 300 // Ignore unknown property names.
303 return TRUE; 301 return TRUE;
304 } 302 }
305 if(0==uprv_stricmp(p, ppucdProperties[i].name)) { 303 if(0==uprv_stricmp(p, ppucdProperties[i].name)) {
306 prop=ppucdProperties[i].prop; 304 prop=ppucdProperties[i].prop;
307 U_ASSERT(prop>=0); 305 U_ASSERT(prop>=0);
308 break; 306 break;
309 } 307 }
310 } 308 }
311 } 309 }
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 break; 565 break;
568 } 566 }
569 } 567 }
570 if(scx.isEmpty()) { 568 if(scx.isEmpty()) {
571 fprintf(stderr, "error in preparsed UCD: empty scx= on line %ld\n", (lon g)lineNumber); 569 fprintf(stderr, "error in preparsed UCD: empty scx= on line %ld\n", (lon g)lineNumber);
572 errorCode=U_PARSE_ERROR; 570 errorCode=U_PARSE_ERROR;
573 } 571 }
574 } 572 }
575 573
576 U_NAMESPACE_END 574 U_NAMESPACE_END
OLDNEW
« no previous file with comments | « source/tools/toolutil/pkgitems.cpp ('k') | source/tools/toolutil/swapimpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698