Lines Matching refs:pResData
39 #define RES_GET_KEY16(pResData, keyOffset) \ argument
40 ((keyOffset)<(pResData)->localKeyLimit ? \
41 (const char *)(pResData)->pRoot+(keyOffset) : \
42 (pResData)->poolBundleKeys+(keyOffset)-(pResData)->localKeyLimit)
44 #define RES_GET_KEY32(pResData, keyOffset) \ argument
46 (const char *)(pResData)->pRoot+(keyOffset) : \
47 (pResData)->poolBundleKeys+((keyOffset)&0x7fffffff))
71 _res_findTableItem(const ResourceData *pResData, const uint16_t *keyOffsets, int32_t length, in _res_findTableItem() argument
82 tableKey = RES_GET_KEY16(pResData, keyOffsets[mid]); in _res_findTableItem()
83 if (pResData->useNativeStrcmp) { in _res_findTableItem()
102 _res_findTable32Item(const ResourceData *pResData, const int32_t *keyOffsets, int32_t length, in _res_findTable32Item() argument
113 tableKey = RES_GET_KEY32(pResData, keyOffsets[mid]); in _res_findTable32Item()
114 if (pResData->useNativeStrcmp) { in _res_findTable32Item()
154 res_init(ResourceData *pResData, in res_init() argument
160 pResData->pRoot=(const int32_t *)inBytes; in res_init()
161 pResData->rootRes=(Resource)*pResData->pRoot; in res_init()
162 pResData->p16BitUnits=&gEmpty16; in res_init()
167 res_unload(pResData); in res_init()
172 rootType=(UResType)RES_GET_TYPE(pResData->rootRes); in res_init()
175 res_unload(pResData); in res_init()
180 pResData->localKeyLimit=0x10000; /* greater than any 16-bit key string offset */ in res_init()
183 const int32_t *indexes=pResData->pRoot+1; in res_init()
187 res_unload(pResData); in res_init()
195 res_unload(pResData); in res_init()
199 pResData->localKeyLimit=indexes[URES_INDEX_KEYS_TOP]<<2; in res_init()
203 pResData->noFallback=(UBool)(att&URES_ATT_NO_FALLBACK); in res_init()
204 pResData->isPoolBundle=(UBool)((att&URES_ATT_IS_POOL_BUNDLE)!=0); in res_init()
205 pResData->usesPoolBundle=(UBool)((att&URES_ATT_USES_POOL_BUNDLE)!=0); in res_init()
207 …if((pResData->isPoolBundle || pResData->usesPoolBundle) && indexLength<=URES_INDEX_POOL_CHECKSUM) { in res_init()
209 res_unload(pResData); in res_init()
215 pResData->p16BitUnits=(const uint16_t *)(pResData->pRoot+indexes[URES_INDEX_KEYS_TOP]); in res_init()
224 pResData->useNativeStrcmp=TRUE; in res_init()
229 res_read(ResourceData *pResData, in res_read() argument
234 uprv_memset(pResData, 0, sizeof(ResourceData)); in res_read()
242 res_init(pResData, formatVersion, inBytes, length, errorCode); in res_read()
246 res_load(ResourceData *pResData, in res_load() argument
250 uprv_memset(pResData, 0, sizeof(ResourceData)); in res_load()
253 pResData->data=udata_openChoice(path, "res", name, isAcceptable, formatVersion, errorCode); in res_load()
259 res_init(pResData, formatVersion, udata_getMemory(pResData->data), -1, errorCode); in res_load()
263 res_unload(ResourceData *pResData) { in res_unload() argument
264 if(pResData->data!=NULL) { in res_unload()
265 udata_close(pResData->data); in res_unload()
266 pResData->data=NULL; in res_unload()
298 res_getString(const ResourceData *pResData, Resource res, int32_t *pLength) { in res_getString() argument
304 p=(const UChar *)(pResData->p16BitUnits+offset); in res_getString()
319 const int32_t *p32= res==0 ? &gEmptyString.length : pResData->pRoot+res; in res_getString()
333 res_getAlias(const ResourceData *pResData, Resource res, int32_t *pLength) { in res_getAlias() argument
338 const int32_t *p32= offset==0 ? &gEmptyString.length : pResData->pRoot+offset; in res_getAlias()
352 res_getBinary(const ResourceData *pResData, Resource res, int32_t *pLength) { in res_getBinary() argument
357 const int32_t *p32= offset==0 ? (const int32_t*)&gEmpty32 : pResData->pRoot+offset; in res_getBinary()
372 res_getIntVector(const ResourceData *pResData, Resource res, int32_t *pLength) { in res_getIntVector() argument
377 p= offset==0 ? (const int32_t *)&gEmpty32 : pResData->pRoot+offset; in res_getIntVector()
390 res_countArrayItems(const ResourceData *pResData, Resource res) { in res_countArrayItems() argument
402 return offset==0 ? 0 : *(pResData->pRoot+offset); in res_countArrayItems()
404 return offset==0 ? 0 : *((const uint16_t *)(pResData->pRoot+offset)); in res_countArrayItems()
407 return pResData->p16BitUnits[offset]; in res_countArrayItems()
414 res_getTableItemByKey(const ResourceData *pResData, Resource table, in res_getTableItemByKey() argument
425 const uint16_t *p= (const uint16_t *)(pResData->pRoot+offset); in res_getTableItemByKey()
427 *indexR=idx=_res_findTableItem(pResData, p, length, *key, key); in res_getTableItemByKey()
436 const uint16_t *p=pResData->p16BitUnits+offset; in res_getTableItemByKey()
438 *indexR=idx=_res_findTableItem(pResData, p, length, *key, key); in res_getTableItemByKey()
446 const int32_t *p= pResData->pRoot+offset; in res_getTableItemByKey()
448 *indexR=idx=_res_findTable32Item(pResData, p, length, *key, key); in res_getTableItemByKey()
462 res_getTableItemByIndex(const ResourceData *pResData, Resource table, in res_getTableItemByIndex() argument
470 const uint16_t *p= (const uint16_t *)(pResData->pRoot+offset); in res_getTableItemByIndex()
475 *key=RES_GET_KEY16(pResData, p[indexR]); in res_getTableItemByIndex()
483 const uint16_t *p=pResData->p16BitUnits+offset; in res_getTableItemByIndex()
487 *key=RES_GET_KEY16(pResData, p[indexR]); in res_getTableItemByIndex()
495 const int32_t *p= pResData->pRoot+offset; in res_getTableItemByIndex()
499 *key=RES_GET_KEY32(pResData, p[indexR]); in res_getTableItemByIndex()
513 res_getResource(const ResourceData *pResData, const char *key) { in res_getResource() argument
516 return res_getTableItemByKey(pResData, pResData->rootRes, &idx, &realKey); in res_getResource()
520 res_getArrayItem(const ResourceData *pResData, Resource array, int32_t indexR) { in res_getArrayItem() argument
526 const int32_t *p= pResData->pRoot+offset; in res_getArrayItem()
534 const uint16_t *p=pResData->p16BitUnits+offset; in res_getArrayItem()
547 res_findResource(const ResourceData *pResData, Resource r, char** path, const char** key) { in res_findResource() argument
589 t2 = res_getTableItemByKey(pResData, t1, &indexR, key); in res_findResource()
595 t2 = res_getTableItemByIndex(pResData, t1, indexR, key); in res_findResource()
601 t2 = res_getArrayItem(pResData, t1, indexR); in res_findResource()