OLD | NEW |
1 /* | 1 /* |
2 ********************************************************************** | 2 ********************************************************************** |
3 * Copyright (C) 1999-2015, International Business Machines | 3 * Copyright (C) 1999-2015, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ********************************************************************** | 5 ********************************************************************** |
6 * Date Name Description | 6 * Date Name Description |
7 * 11/17/99 aliu Creation. | 7 * 11/17/99 aliu Creation. |
8 ********************************************************************** | 8 ********************************************************************** |
9 */ | 9 */ |
10 | 10 |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 // NULL pointer check | 1095 // NULL pointer check |
1096 if (data->variables == NULL) { | 1096 if (data->variables == NULL) { |
1097 status = U_MEMORY_ALLOCATION_ERROR; | 1097 status = U_MEMORY_ALLOCATION_ERROR; |
1098 return; | 1098 return; |
1099 } | 1099 } |
1100 data->variablesAreOwned = (i == 0); | 1100 data->variablesAreOwned = (i == 0); |
1101 } | 1101 } |
1102 | 1102 |
1103 for (int32_t j = 0; j < data->variablesLength; j++) { | 1103 for (int32_t j = 0; j < data->variablesLength; j++) { |
1104 data->variables[j] = | 1104 data->variables[j] = |
1105 ((UnicodeSet*)variablesVector.elementAt(j)); | 1105 ((UnicodeFunctor*)variablesVector.elementAt(j)); |
1106 } | 1106 } |
1107 | 1107 |
1108 data->variableNames.removeAll(); | 1108 data->variableNames.removeAll(); |
1109 int32_t pos = UHASH_FIRST; | 1109 int32_t pos = UHASH_FIRST; |
1110 const UHashElement* he = variableNames.nextElement(pos); | 1110 const UHashElement* he = variableNames.nextElement(pos); |
1111 while (he != NULL) { | 1111 while (he != NULL) { |
1112 UnicodeString* tempus = (UnicodeString*)(((UnicodeString*)(he->v
alue.pointer))->clone()); | 1112 UnicodeString* tempus = (UnicodeString*)(((UnicodeString*)(he->v
alue.pointer))->clone()); |
1113 if (tempus == NULL) { | 1113 if (tempus == NULL) { |
1114 status = U_MEMORY_ALLOCATION_ERROR; | 1114 status = U_MEMORY_ALLOCATION_ERROR; |
1115 return; | 1115 return; |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 U16_APPEND_UNSAFE(target, index, c); | 1736 U16_APPEND_UNSAFE(target, index, c); |
1737 target+=index; | 1737 target+=index; |
1738 } | 1738 } |
1739 if (target < targetLimit) { | 1739 if (target < targetLimit) { |
1740 *target = 0; | 1740 *target = 0; |
1741 } | 1741 } |
1742 return (int32_t)(target-targetStart); | 1742 return (int32_t)(target-targetStart); |
1743 } | 1743 } |
1744 | 1744 |
1745 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ | 1745 #endif /* #if !UCONFIG_NO_TRANSLITERATION */ |
OLD | NEW |