OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************* | 2 ******************************************************************************* |
3 * | 3 * |
4 * Copyright (C) 2003-2014, 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: usprep.cpp | 8 * file name: usprep.cpp |
9 * encoding: US-ASCII | 9 * encoding: US-ASCII |
10 * tab size: 8 (not used) | 10 * tab size: 8 (not used) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 static void | 130 static void |
131 usprep_unload(UStringPrepProfile* data){ | 131 usprep_unload(UStringPrepProfile* data){ |
132 udata_close(data->sprepData); | 132 udata_close(data->sprepData); |
133 } | 133 } |
134 | 134 |
135 static int32_t | 135 static int32_t |
136 usprep_internal_flushCache(UBool noRefCount){ | 136 usprep_internal_flushCache(UBool noRefCount){ |
137 UStringPrepProfile *profile = NULL; | 137 UStringPrepProfile *profile = NULL; |
138 UStringPrepKey *key = NULL; | 138 UStringPrepKey *key = NULL; |
139 int32_t pos = -1; | 139 int32_t pos = UHASH_FIRST; |
140 int32_t deletedNum = 0; | 140 int32_t deletedNum = 0; |
141 const UHashElement *e; | 141 const UHashElement *e; |
142 | 142 |
143 /* | 143 /* |
144 * if shared data hasn't even been lazy evaluated yet | 144 * if shared data hasn't even been lazy evaluated yet |
145 * return 0 | 145 * return 0 |
146 */ | 146 */ |
147 umtx_lock(&usprepMutex); | 147 umtx_lock(&usprepMutex); |
148 if (SHARED_DATA_HASHTABLE == NULL) { | 148 if (SHARED_DATA_HASHTABLE == NULL) { |
149 umtx_unlock(&usprepMutex); | 149 umtx_unlock(&usprepMutex); |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 /* swap the uint16_t mappingTable[] */ | 863 /* swap the uint16_t mappingTable[] */ |
864 count=indexes[_SPREP_INDEX_MAPPING_DATA_SIZE]; | 864 count=indexes[_SPREP_INDEX_MAPPING_DATA_SIZE]; |
865 ds->swapArray16(ds, inBytes+offset, count, outBytes+offset, pErrorCode); | 865 ds->swapArray16(ds, inBytes+offset, count, outBytes+offset, pErrorCode); |
866 //offset+=count; | 866 //offset+=count; |
867 } | 867 } |
868 | 868 |
869 return headerSize+size; | 869 return headerSize+size; |
870 } | 870 } |
871 | 871 |
872 #endif /* #if !UCONFIG_NO_IDNA */ | 872 #endif /* #if !UCONFIG_NO_IDNA */ |
OLD | NEW |