Lines Matching refs:pv

43     UPropsVectors *pv;  in upvec_open()  local
56 pv=(UPropsVectors *)uprv_malloc(sizeof(UPropsVectors)); in upvec_open()
58 if(pv==NULL || v==NULL) { in upvec_open()
59 uprv_free(pv); in upvec_open()
64 uprv_memset(pv, 0, sizeof(UPropsVectors)); in upvec_open()
65 pv->v=v; in upvec_open()
66 pv->columns=columns; in upvec_open()
67 pv->maxRows=UPVEC_INITIAL_ROWS; in upvec_open()
68 pv->rows=2+(UPVEC_MAX_CP-UPVEC_FIRST_SPECIAL_CP); in upvec_open()
71 row=pv->v; in upvec_open()
72 uprv_memset(row, 0, pv->rows*columns*4); in upvec_open()
81 return pv; in upvec_open()
85 upvec_close(UPropsVectors *pv) { in upvec_close() argument
86 if(pv!=NULL) { in upvec_close()
87 uprv_free(pv->v); in upvec_close()
88 uprv_free(pv); in upvec_close()
93 _findRow(UPropsVectors *pv, UChar32 rangeStart) { in _findRow() argument
97 columns=pv->columns; in _findRow()
98 limit=pv->rows; in _findRow()
99 prevRow=pv->prevRow; in _findRow()
102 row=pv->v+prevRow*columns; in _findRow()
109 pv->prevRow=prevRow+1; in _findRow()
113 pv->prevRow=prevRow+2; in _findRow()
122 pv->prevRow=prevRow; in _findRow()
125 } else if(rangeStart<(UChar32)pv->v[1]) { in _findRow()
127 pv->prevRow=0; in _findRow()
128 return pv->v; in _findRow()
135 row=pv->v+i*columns; in _findRow()
139 pv->prevRow=i; in _findRow()
147 pv->prevRow=start; in _findRow()
148 return pv->v+start*columns; in _findRow()
152 upvec_setValue(UPropsVectors *pv, in upvec_setValue() argument
166 if( pv==NULL || in upvec_setValue()
168 column<0 || column>=(pv->columns-2) in upvec_setValue()
173 if(pv->isCompacted) { in upvec_setValue()
180 columns=pv->columns; in upvec_setValue()
187 firstRow=_findRow(pv, start); in upvec_setValue()
188 lastRow=_findRow(pv, end); in upvec_setValue()
202 rows=pv->rows; in upvec_setValue()
203 if((rows+splitFirstRow+splitLastRow)>pv->maxRows) { in upvec_setValue()
207 if(pv->maxRows<UPVEC_MEDIUM_ROWS) { in upvec_setValue()
209 } else if(pv->maxRows<UPVEC_MAX_ROWS) { in upvec_setValue()
221 uprv_memcpy(newVectors, pv->v, rows*columns*4); in upvec_setValue()
222 firstRow=newVectors+(firstRow-pv->v); in upvec_setValue()
223 lastRow=newVectors+(lastRow-pv->v); in upvec_setValue()
224 uprv_free(pv->v); in upvec_setValue()
225 pv->v=newVectors; in upvec_setValue()
226 pv->maxRows=newMaxRows; in upvec_setValue()
230 count = (int32_t)((pv->v+rows*columns)-(lastRow+columns)); in upvec_setValue()
237 pv->rows=rows+splitFirstRow+splitLastRow; in upvec_setValue()
262 pv->prevRow=(int32_t)((lastRow-(pv->v))/columns); in upvec_setValue()
278 upvec_getValue(const UPropsVectors *pv, UChar32 c, int32_t column) { in upvec_getValue() argument
282 if(pv->isCompacted || c<0 || c>UPVEC_MAX_CP || column<0 || column>=(pv->columns-2)) { in upvec_getValue()
285 ncpv=(UPropsVectors *)pv; in upvec_getValue()
291 upvec_getRow(const UPropsVectors *pv, int32_t rowIndex, in upvec_getRow() argument
296 if(pv->isCompacted || rowIndex<0 || rowIndex>=pv->rows) { in upvec_getRow()
300 columns=pv->columns; in upvec_getRow()
301 row=pv->v+rowIndex*columns; in upvec_getRow()
314 const UPropsVectors *pv=(const UPropsVectors *)context; in upvec_compareRows() local
317 count=columns=pv->columns; /* includes start/limit columns */ in upvec_compareRows()
334 upvec_compact(UPropsVectors *pv, UPVecCompactHandler *handler, void *context, UErrorCode *pErrorCod… in upvec_compact() argument
347 if(pv->isCompacted) { in upvec_compact()
352 pv->isCompacted=TRUE; in upvec_compact()
354 rows=pv->rows; in upvec_compact()
355 columns=pv->columns; in upvec_compact()
360 uprv_sortArray(pv->v, rows, columns*4, in upvec_compact()
361 upvec_compareRows, pv, FALSE, pErrorCode); in upvec_compact()
371 row=pv->v; in upvec_compact()
408 row=pv->v; in upvec_compact()
416 if(count<0 || 0!=uprv_memcmp(row+2, pv->v+count, valueColumns*4)) { in upvec_compact()
418 uprv_memmove(pv->v+count, row+2, valueColumns*4); in upvec_compact()
422 handler(context, start, limit-1, count, pv->v+count, valueColumns, pErrorCode); in upvec_compact()
432 pv->rows=count/valueColumns+1; in upvec_compact()
436 upvec_getArray(const UPropsVectors *pv, int32_t *pRows, int32_t *pColumns) { in upvec_getArray() argument
437 if(!pv->isCompacted) { in upvec_getArray()
441 *pRows=pv->rows; in upvec_getArray()
444 *pColumns=pv->columns-2; in upvec_getArray()
446 return pv->v; in upvec_getArray()
450 upvec_cloneArray(const UPropsVectors *pv, in upvec_cloneArray() argument
458 if(!pv->isCompacted) { in upvec_cloneArray()
462 byteLength=pv->rows*(pv->columns-2)*4; in upvec_cloneArray()
468 uprv_memcpy(clonedArray, pv->v, byteLength); in upvec_cloneArray()
470 *pRows=pv->rows; in upvec_cloneArray()
473 *pColumns=pv->columns-2; in upvec_cloneArray()
479 upvec_compactToUTrie2WithRowIndexes(UPropsVectors *pv, UErrorCode *pErrorCode) { in upvec_compactToUTrie2WithRowIndexes() argument
481 upvec_compact(pv, upvec_compactToUTrie2Handler, &toUTrie2, pErrorCode); in upvec_compactToUTrie2WithRowIndexes()