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

Side by Side Diff: source/i18n/msgfmt.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/i18n/measure.cpp ('k') | source/i18n/nfrs.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 * COPYRIGHT: 2 * COPYRIGHT:
3 * Copyright (c) 1997-2013, International Business Machines Corporation and 3 * Copyright (c) 1997-2014, International Business Machines Corporation and
4 * others. All Rights Reserved. 4 * others. All Rights Reserved.
5 ******************************************************************** 5 ********************************************************************
6 * 6 *
7 * File MSGFMT.CPP 7 * File MSGFMT.CPP
8 * 8 *
9 * Modification History: 9 * Modification History:
10 * 10 *
11 * Date Name Description 11 * Date Name Description
12 * 02/19/97 aliu Converted from java. 12 * 02/19/97 aliu Converted from java.
13 * 03/20/97 helena Finished first cut of implementation. 13 * 03/20/97 helena Finished first cut of implementation.
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 779
780 int32_t argNumber = MessagePattern::validateArgumentName(formatName); 780 int32_t argNumber = MessagePattern::validateArgumentName(formatName);
781 if (argNumber < UMSGPAT_ARG_NAME_NOT_NUMBER) { 781 if (argNumber < UMSGPAT_ARG_NAME_NOT_NUMBER) {
782 status = U_ILLEGAL_ARGUMENT_ERROR; 782 status = U_ILLEGAL_ARGUMENT_ERROR;
783 return; 783 return;
784 } 784 }
785 for (int32_t partIndex = 0; 785 for (int32_t partIndex = 0;
786 (partIndex = nextTopLevelArgStart(partIndex)) >= 0 && U_SUCCESS(status); 786 (partIndex = nextTopLevelArgStart(partIndex)) >= 0 && U_SUCCESS(status);
787 ) { 787 ) {
788 if (argNameMatches(partIndex + 1, formatName, argNumber)) { 788 if (argNameMatches(partIndex + 1, formatName, argNumber)) {
789 if (&newFormat == NULL) { 789 Format* new_format = newFormat.clone();
790 setCustomArgStartFormat(partIndex, NULL, status); 790 if (new_format == NULL) {
791 } else { 791 status = U_MEMORY_ALLOCATION_ERROR;
792 Format* new_format = newFormat.clone(); 792 return;
793 if (new_format == NULL) {
794 status = U_MEMORY_ALLOCATION_ERROR;
795 return;
796 }
797 setCustomArgStartFormat(partIndex, new_format, status);
798 } 793 }
794 setCustomArgStartFormat(partIndex, new_format, status);
799 } 795 }
800 } 796 }
801 } 797 }
802 798
803 // ------------------------------------- 799 // -------------------------------------
804 // Gets the format array. 800 // Gets the format array.
805 const Format** 801 const Format**
806 MessageFormat::getFormats(int32_t& cnt) const 802 MessageFormat::getFormats(int32_t& cnt) const
807 { 803 {
808 // This old API returns an array (which we hold) of Format* 804 // This old API returns an array (which we hold) of Format*
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 delete rules; 1966 delete rules;
1971 rules = NULL; 1967 rules = NULL;
1972 } 1968 }
1973 1969
1974 1970
1975 U_NAMESPACE_END 1971 U_NAMESPACE_END
1976 1972
1977 #endif /* #if !UCONFIG_NO_FORMATTING */ 1973 #endif /* #if !UCONFIG_NO_FORMATTING */
1978 1974
1979 //eof 1975 //eof
OLDNEW
« no previous file with comments | « source/i18n/measure.cpp ('k') | source/i18n/nfrs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698