Lines Matching defs:pool

267   STRING_POOL pool;
416 poolAppend(STRING_POOL *pool, const ENCODING *enc,
419 poolStoreString(STRING_POOL *pool, const ENCODING *enc,
421 static XML_Bool FASTCALL poolGrow(STRING_POOL *pool);
423 poolCopyString(STRING_POOL *pool, const XML_Char *s);
425 poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n);
427 poolAppendString(STRING_POOL *pool, const XML_Char *s);
447 #define poolStart(pool) ((pool)->start)
448 #define poolEnd(pool) ((pool)->ptr)
449 #define poolLength(pool) ((pool)->ptr - (pool)->start)
450 #define poolChop(pool) ((void)--(pool->ptr))
451 #define poolLastChar(pool) (((pool)->ptr)[-1])
452 #define poolDiscard(pool) ((pool)->ptr = (pool)->start)
453 #define poolFinish(pool) ((pool)->start = (pool)->ptr)
454 #define poolAppendChar(pool, c) \
455 (((pool)->ptr == (pool)->end && !poolGrow(pool)) \
457 : ((*((pool)->ptr)++ = c), 1))
1236 p = poolCopyString(&_dtd->pool, p);
2321 name = poolStoreString(&dtd->pool, enc,
2327 poolDiscard(&dtd->pool);
2718 const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
3913 XML_Char *tem = poolStoreString(&dtd->pool,
3921 poolFinish(&dtd->pool);
4114 &dtd->pool);
4117 attVal = poolStart(&dtd->pool);
4118 poolFinish(&dtd->pool);
4213 declEntity->systemId = poolStoreString(&dtd->pool, enc,
4219 poolFinish(&dtd->pool);
4240 declEntity->notation = poolStoreString(&dtd->pool, enc, s, next);
4243 poolFinish(&dtd->pool);
4274 const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
4282 poolDiscard(&dtd->pool);
4286 poolFinish(&dtd->pool);
4298 poolDiscard(&dtd->pool);
4306 const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
4314 poolDiscard(&dtd->pool);
4318 poolFinish(&dtd->pool);
4330 poolDiscard(&dtd->pool);
4486 name = poolStoreString(&dtd->pool, enc,
4492 poolDiscard(&dtd->pool);
4924 STRING_POOL *pool)
4927 end, pool);
4930 if (!isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
4931 poolChop(pool);
4932 if (!poolAppendChar(pool, XML_T('\0')))
4940 STRING_POOL *pool)
4969 && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
4978 if (!poolAppendChar(pool, buf[i]))
4984 if (!poolAppend(pool, enc, ptr, next))
4992 if (!isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
4994 if (!poolAppendChar(pool, 0x20))
5006 if (!poolAppendChar(pool, ch))
5020 if (pool == &dtd->pool) /* are we called from prolog? */
5028 else /* if (pool == &tempPool): we are called from content */
5044 if ((pool == &tempPool) && defaultHandler)
5070 (char *)textEnd, pool);
5094 STRING_POOL *pool = &(dtd->entityValuePool);
5103 if (!pool->blocks) {
5104 if (!poolGrow(pool))
5186 if (!poolAppend(pool, enc, entityTextPtr, next)) {
5195 if (pool->end == pool->ptr && !poolGrow(pool)) {
5199 *(pool->ptr)++ = 0xA;
5220 if (pool->end == pool->ptr && !poolGrow(pool)) {
5224 *(pool->ptr)++ = buf[i];
5409 if (!poolAppendChar(&dtd->pool, *s))
5412 if (!poolAppendChar(&dtd->pool, XML_T('\0')))
5414 prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
5418 if (prefix->name == poolStart(&dtd->pool))
5419 poolFinish(&dtd->pool);
5421 poolDiscard(&dtd->pool);
5436 if (!poolAppendChar(&dtd->pool, XML_T('\0')))
5438 name = poolStoreString(&dtd->pool, enc, start, end);
5447 poolDiscard(&dtd->pool);
5449 poolFinish(&dtd->pool);
5471 if (!poolAppendChar(&dtd->pool, name[j]))
5474 if (!poolAppendChar(&dtd->pool, XML_T('\0')))
5476 id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
5478 if (id->prefix->name == poolStart(&dtd->pool))
5479 poolFinish(&dtd->pool);
5481 poolDiscard(&dtd->pool);
5592 prefix->name = poolCopyString(&dtd->pool, prefix->name);
5650 poolInit(&(p->pool), ms);
5697 poolClear(&(p->pool));
5738 poolDestroy(&(p->pool));
5763 name = poolCopyString(&(newDtd->pool), oldP->name);
5782 if (!poolAppendChar(&(newDtd->pool), XML_T('\0')))
5784 name = poolCopyString(&(newDtd->pool), oldA->name);
5814 name = poolCopyString(&(newDtd->pool), oldE->name);
5842 = poolCopyString(&(newDtd->pool), oldE->defaultAtts[i].value);
5854 &(newDtd->pool),
5861 &(newDtd->pool),
6097 poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms)
6099 pool->blocks = NULL;
6100 pool->freeBlocks = NULL;
6101 pool->start = NULL;
6102 pool->ptr = NULL;
6103 pool->end = NULL;
6104 pool->mem = ms;
6108 poolClear(STRING_POOL *pool)
6110 if (!pool->freeBlocks)
6111 pool->freeBlocks = pool->blocks;
6113 BLOCK *p = pool->blocks;
6116 p->next = pool->freeBlocks;
6117 pool->freeBlocks = p;
6121 pool->blocks = NULL;
6122 pool->start = NULL;
6123 pool->ptr = NULL;
6124 pool->end = NULL;
6128 poolDestroy(STRING_POOL *pool)
6130 BLOCK *p = pool->blocks;
6133 pool->mem->free_fcn(p);
6136 p = pool->freeBlocks;
6139 pool->mem->free_fcn(p);
6145 poolAppend(STRING_POOL *pool, const ENCODING *enc,
6148 if (!pool->ptr && !poolGrow(pool))
6151 XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end);
6154 if (!poolGrow(pool))
6157 return pool->start;
6161 poolCopyString(STRING_POOL *pool, const XML_Char *s)
6164 if (!poolAppendChar(pool, *s))
6167 s = pool->start;
6168 poolFinish(pool);
6173 poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n)
6175 if (!pool->ptr && !poolGrow(pool))
6178 if (!poolAppendChar(pool, *s))
6181 s = pool->start;
6182 poolFinish(pool);
6187 poolAppendString(STRING_POOL *pool, const XML_Char *s)
6190 if (!poolAppendChar(pool, *s))
6194 return pool->start;
6198 poolStoreString(STRING_POOL *pool, const ENCODING *enc,
6201 if (!poolAppend(pool, enc, ptr, end))
6203 if (pool->ptr == pool->end && !poolGrow(pool))
6205 *(pool->ptr)++ = 0;
6206 return pool->start;
6210 poolGrow(STRING_POOL *pool)
6212 if (pool->freeBlocks) {
6213 if (pool->start == 0) {
6214 pool->blocks = pool->freeBlocks;
6215 pool->freeBlocks = pool->freeBlocks->next;
6216 pool->blocks->next = NULL;
6217 pool->start = pool->blocks->s;
6218 pool->end = pool->start + pool->blocks->size;
6219 pool->ptr = pool->start;
6222 if (pool->end - pool->start < pool->freeBlocks->size) {
6223 BLOCK *tem = pool->freeBlocks->next;
6224 pool->freeBlocks->next = pool->blocks;
6225 pool->blocks = pool->freeBlocks;
6226 pool->freeBlocks = tem;
6227 memcpy(pool->blocks->s, pool->start,
6228 (pool->end - pool->start) * sizeof(XML_Char));
6229 pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
6230 pool->start = pool->blocks->s;
6231 pool->end = pool->start + pool->blocks->size;
6235 if (pool->blocks && pool->start == pool->blocks->s) {
6236 int blockSize = (int)(pool->end - pool->start)*2;
6238 pool->mem->realloc_fcn(pool->blocks,
6243 pool->blocks = temp;
6244 pool->blocks->size = blockSize;
6245 pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
6246 pool->start = pool->blocks->s;
6247 pool->end = pool->start + blockSize;
6251 int blockSize = (int)(pool->end - pool->start);
6256 tem = (BLOCK *)pool->mem->malloc_fcn(offsetof(BLOCK, s)
6261 tem->next = pool->blocks;
6262 pool->blocks = tem;
6263 if (pool->ptr != pool->start)
6264 memcpy(tem->s, pool->start,
6265 (pool->ptr - pool->start) * sizeof(XML_Char));
6266 pool->ptr = tem->s + (pool->ptr - pool->start);
6267 pool->start = tem->s;
6268 pool->end = tem->s + blockSize;
6387 const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
6396 poolDiscard(&dtd->pool);
6398 poolFinish(&dtd->pool);