Home | History | Annotate | Download | only in common

Lines Matching refs:Resource

19 *   06/24/02    weiv        Added support for resource sharing
35 * Resource access helpers
44 * the resource is of the expected type.
51 static Resource
52 _res_getArrayItem(Resource *pRoot, Resource res, int32_t indexR) {
55 return ((const Resource *)(p))[1+indexR];
67 * In order to 4-align the Resource item values, there is a padding
75 _res_getTableKey(const Resource *pRoot, const Resource res, int32_t indexS) {
85 _res_getTable32Key(const Resource *pRoot, const Resource res, int32_t indexS) {
95 static Resource
96 _res_getTableItem(const Resource *pRoot, const Resource res, int32_t indexR) {
100 return ((const Resource *)(p+1+count+(~count&1)))[indexR];
106 static Resource
107 _res_getTable32Item(const Resource *pRoot, const Resource res, int32_t indexR) {
111 return ((const Resource *)(p+1+count))[indexR];
118 static Resource
119 _res_findTableItem(const Resource *pRoot, const Resource res, const char *key,
149 return ((const Resource *)(p+limit+(~limit&1)))[mid];
158 static Resource
159 _res_findTable32Item(const Resource *pRoot, const Resource res, const char *key,
188 return ((const Resource *)(p+(*(p-1))))[mid];
230 /* get its memory and root resource */
231 pResData->pRoot=(Resource *)udata_getMemory(pResData->data);
264 res_getString(const ResourceData *pResData, const Resource res, int32_t *pLength) {
288 res_getAlias(const ResourceData *pResData, const Resource res, int32_t *pLength) {
304 res_getBinary(const ResourceData *pResData, const Resource res, int32_t *pLength) {
320 res_getIntVector(const ResourceData *pResData, const Resource res, int32_t *pLength) {
335 res_countArrayItems(const ResourceData *pResData, const Resource res) {
360 U_CFUNC Resource
371 U_CFUNC Resource
372 res_getArrayItem(const ResourceData *pResData, Resource array, const int32_t indexR) {
376 U_CFUNC Resource
377 res_findResource(const ResourceData *pResData, Resource r, char** path, const char** key) {
379 * iterates over a path and stops when a scalar resource is found. This
385 Resource t1 = r;
386 Resource t2;
390 /* if you come in with an empty path, you'll be getting back the same resource */
395 /* one needs to have an aggregate resource in order to search in it */
404 * resource (t1 == RES_BOGUS) or we found a scalar resource (including alias)
417 /* if the resource is a table */
422 /* if we fail to get the resource by key, maybe we got an index */
432 /* if we fail to get the resource by key, maybe we got an index */
452 /* position pathP to next resource key/index */
459 U_CFUNC Resource
460 res_getTableItemByKey(const ResourceData *pResData, Resource table,
473 U_CFUNC Resource
474 res_getTableItemByIndex(const ResourceData *pResData, Resource table,
493 /* resource bundle swapping ------------------------------------------------- */
510 * These swapping functions assume that a resource bundle always has a length
514 * array of resource items (uint32_t values) is always last.
554 /* resource table key for collation binaries: "%%CollationBin" */
563 * preflight one resource item and set bottom and top values;
564 * length, bottom, and top count Resource item offsets (4 bytes each), not bytes
568 const Resource *inBundle, int32_t length,
569 Resource res,
572 const Resource *p;
583 udata_printError(ds, "ures_preflightResource(res=%08x) resource offset exceeds bundle length %d\n",
606 Resource item;
650 Resource item;
679 udata_printError(ds, "ures_preflightResource(res=%08x) unknown resource type\n", res);
687 udata_printError(ds, "ures_preflightResource(res=%08x) resource limit exceeds bundle length %d\n",
696 * swap one resource item
701 const Resource *inBundle, Resource *outBundle,
702 Resource res, /* caller swaps res itself */
706 const Resource *p;
707 Resource *q;
752 Resource item;
902 Resource *r;
908 r=(Resource *)pTempTable->resort;
922 Resource item;
961 const Resource *inBundle;
962 Resource rootRes;
969 /* the following integers count Resource item offsets (4 bytes each), not bytes */
987 udata_printError(ds, "ures_swap(): data format %02x.%02x.%02x.%02x (format version %02x) is not a resource bundle\n",
995 /* a resource bundle must contain at least one resource item */
1005 udata_printError(ds, "ures_swap(): too few bytes (%d after header) for a resource bundle\n",
1012 inBundle=(const Resource *)((const char *)inData+headerSize);
1040 udata_printError(ds, "ures_swap(): resource top %d exceeds bundle length %d\n",
1048 Resource *outBundle=(Resource *)((char *)outData+headerSize);
1063 /* allocate the temporary table for sorting resource tables */
1090 /* swap the root resource and indexes */