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

Side by Side Diff: source/common/uidna.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/common/udataswp.c ('k') | source/common/uinit.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 * 3 *
4 * Copyright (C) 2003-2009, International Business Machines 4 * Copyright (C) 2003-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: uidna.cpp 8 * file name: uidna.cpp
9 * encoding: US-ASCII 9 * encoding: US-ASCII
10 * tab size: 8 (not used) 10 * tab size: 8 (not used)
11 * indentation:4 11 * indentation:4
12 * 12 *
13 * created on: 2003feb1 13 * created on: 2003feb1
14 * created by: Ram Viswanadha 14 * created by: Ram Viswanadha
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 401
402 //get the options 402 //get the options
403 //UBool useSTD3ASCIIRules = (UBool)((options & UIDNA_USE_STD3_RULES) != 0); 403 //UBool useSTD3ASCIIRules = (UBool)((options & UIDNA_USE_STD3_RULES) != 0);
404 int32_t namePrepOptions = ((options & UIDNA_ALLOW_UNASSIGNED) != 0) ? USPREP _ALLOW_UNASSIGNED: 0; 404 int32_t namePrepOptions = ((options & UIDNA_ALLOW_UNASSIGNED) != 0) ? USPREP _ALLOW_UNASSIGNED: 0;
405 405
406 // TODO Revisit buffer handling. The label should not be over 63 ASCII chara cters. ICU4J may need to be updated too. 406 // TODO Revisit buffer handling. The label should not be over 63 ASCII chara cters. ICU4J may need to be updated too.
407 UChar b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE], b3Stac k[MAX_LABEL_BUFFER_SIZE]; 407 UChar b1Stack[MAX_LABEL_BUFFER_SIZE], b2Stack[MAX_LABEL_BUFFER_SIZE], b3Stac k[MAX_LABEL_BUFFER_SIZE];
408 408
409 //initialize pointers to stack buffers 409 //initialize pointers to stack buffers
410 UChar *b1 = b1Stack, *b2 = b2Stack, *b1Prime=NULL, *b3=b3Stack; 410 UChar *b1 = b1Stack, *b2 = b2Stack, *b1Prime=NULL, *b3=b3Stack;
411 int32_t b1Len, b2Len, b1PrimeLen, b3Len, 411 int32_t b1Len = 0, b2Len, b1PrimeLen, b3Len,
412 b1Capacity = MAX_LABEL_BUFFER_SIZE, 412 b1Capacity = MAX_LABEL_BUFFER_SIZE,
413 b2Capacity = MAX_LABEL_BUFFER_SIZE, 413 b2Capacity = MAX_LABEL_BUFFER_SIZE,
414 b3Capacity = MAX_LABEL_BUFFER_SIZE, 414 b3Capacity = MAX_LABEL_BUFFER_SIZE,
415 reqLength=0; 415 reqLength=0;
416 416
417 b1Len = 0;
418 UBool* caseFlags = NULL; 417 UBool* caseFlags = NULL;
419 418
420 UBool srcIsASCII = TRUE; 419 UBool srcIsASCII = TRUE;
421 /*UBool srcIsLDH = TRUE; 420 /*UBool srcIsLDH = TRUE;
422 int32_t failPos =0;*/ 421 int32_t failPos =0;*/
423 422
424 // step 1: find out if all the codepoints in src are ASCII 423 // step 1: find out if all the codepoints in src are ASCII
425 if(srcLength==-1){ 424 if(srcLength==-1){
426 srcLength = 0; 425 srcLength = 0;
427 for(;src[srcLength]!=0;){ 426 for(;src[srcLength]!=0;){
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 } 911 }
913 912
914 if(b2 != b2Stack){ 913 if(b2 != b2Stack){
915 uprv_free(b2); 914 uprv_free(b2);
916 } 915 }
917 916
918 return result; 917 return result;
919 } 918 }
920 919
921 #endif /* #if !UCONFIG_NO_IDNA */ 920 #endif /* #if !UCONFIG_NO_IDNA */
OLDNEW
« no previous file with comments | « source/common/udataswp.c ('k') | source/common/uinit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698