Lines Matching defs:pool

23 void printStringPool(const ResStringPool* pool)
25 const size_t NS = pool->size();
28 const char *str = (const char*)pool->string8At(s, &len);
30 str = String8(pool->stringAt(s, &len)).string();
103 NOISY(printf("Adding string %s to pool: pos=%d eidx=%d vidx=%d\n",
166 sp<AaptFile> pool = new AaptFile(String8(), AaptGroupEntry(),
168 status_t err = writeStringBlock(pool);
169 return err == NO_ERROR ? pool : NULL;
182 status_t StringPool::writeStringBlock(const sp<AaptFile>& pool)
185 if (pool->getSize() > 0) {
190 ssize_t res = pool->writeData(block->getData(), block->getSize());
194 // First we need to add all style span names to the string pool.
196 // will appear at the end of the pool, not disrupting the order
219 // Now build the pool of unique strings.
225 if (pool->editData(preSize) == NULL) {
226 fprintf(stderr, "ERROR: Out of memory for string pool\n");
254 void* dat = (void*)pool->editData(preSize + strPos + totalSize);
256 fprintf(stderr, "ERROR: Out of memory for string pool\n");
283 uint8_t* dat = (uint8_t*)pool->editData(preSize + padPos);
285 fprintf(stderr, "ERROR: Out of memory padding string pool\n");
292 // Build the pool of style spans.
302 uint8_t* dat = (uint8_t*)pool->editData(preSize + styPos + totalSize);
321 // the end of the pool is fully terminated to simplify error
324 uint8_t* dat = (uint8_t*)pool->editData(preSize + styPos + extra);
340 (ResStringPool_header*)pool->padData(sizeof(uint32_t));
342 fprintf(stderr, "ERROR: Out of memory for string pool\n");
348 header->header.size = htodl(pool->getSize());