Lines Matching refs:pool

51 void printStringPool(const ResStringPool* pool)
53 if (pool->getError() == NO_INIT) {
54 printf("String pool is unitialized.\n");
56 } else if (pool->getError() != NO_ERROR) {
57 printf("String pool is corrupt/invalid.\n");
62 const size_t N = pool->size();
65 if (pool->isUTF8()) {
66 uniqueStrings.add(pool->string8At(i, &len));
68 uniqueStrings.add(pool->stringAt(i, &len));
72 printf("String pool of " ZD " unique %s %s strings, " ZD " entries and "
74 (ZD_TYPE)uniqueStrings.size(), pool->isUTF8() ? "UTF-8" : "UTF-16",
75 pool->isSorted() ? "sorted" : "non-sorted",
76 (ZD_TYPE)N, (ZD_TYPE)pool->styleCount(), (ZD_TYPE)pool->bytes());
78 const size_t NS = pool->size();
80 String8 str = pool->string8ObjectAt(s);
208 printf("Adding string %s to pool: pos=%zd eidx=%zd vidx=%zd\n",
250 StringPool::ConfigSorter::ConfigSorter(const StringPool& pool) : pool(pool)
256 const StringPool::entry& lhe = pool.mEntries[pool.mEntryArray[l]];
257 const StringPool::entry& rhe = pool.mEntries[pool.mEntryArray[r]];
263 LOG_ALWAYS_FATAL_IF(mOriginalPosToNewPos.size() > 0, "Can't sort string pool after already sorted.");
385 sp<AaptFile> pool = new AaptFile(String8(), AaptGroupEntry(),
387 status_t err = writeStringBlock(pool);
388 return err == NO_ERROR ? pool : NULL;
401 status_t StringPool::writeStringBlock(const sp<AaptFile>& pool)
404 if (pool->getSize() > 0) {
409 ssize_t res = pool->writeData(block->getData(), block->getSize());
413 // First we need to add all style span names to the string pool.
415 // will appear at the end of the pool, not disrupting the order
438 // Now build the pool of unique strings.
444 if (pool->editData(preSize) == NULL) {
445 fprintf(stderr, "ERROR: Out of memory for string pool\n");
473 void* dat = (void*)pool->editData(preSize + strPos + totalSize);
475 fprintf(stderr, "ERROR: Out of memory for string pool\n");
502 uint8_t* dat = (uint8_t*)pool->editData(preSize + padPos);
504 fprintf(stderr, "ERROR: Out of memory padding string pool\n");
511 // Build the pool of style spans.
521 uint8_t* dat = (uint8_t*)pool->editData(preSize + styPos + totalSize);
540 // the end of the pool is fully terminated to simplify error
543 uint8_t* dat = (uint8_t*)pool->editData(preSize + styPos + extra);
559 (ResStringPool_header*)pool->padData(sizeof(uint32_t));
561 fprintf(stderr, "ERROR: Out of memory for string pool\n");
567 header->header.size = htodl(pool->getSize());