diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-01-26 05:55:58 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-01-26 05:55:58 +0200 |
commit | 08ee51002bcead39798f309116e6bb4aaf8a1d3e (patch) | |
tree | b1f86f20682e1dc577b53bb79b9ab80119d33448 /node.c | |
parent | b7c60a781d7a027df7f388d099f79014cec79f3b (diff) | |
parent | 6b12d4f726b9578d5c878fa765d5c167c9d71618 (diff) | |
download | egawk-08ee51002bcead39798f309116e6bb4aaf8a1d3e.tar.gz egawk-08ee51002bcead39798f309116e6bb4aaf8a1d3e.tar.bz2 egawk-08ee51002bcead39798f309116e6bb4aaf8a1d3e.zip |
Merge branch 'master' into feature/api-mpfr
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -993,37 +993,37 @@ void init_btowc_cache() #define BLOCKCHUNK 100 -BLOCK nextfree[BLOCK_MAX] = { - { 0, NULL}, /* invalid */ - { sizeof(NODE), NULL }, - { sizeof(BUCKET), NULL }, +struct block_header nextfree[BLOCK_MAX] = { + { NULL, 0}, /* invalid */ + { NULL, sizeof(NODE) }, + { NULL, sizeof(BUCKET) }, #ifdef HAVE_MPFR - { sizeof(mpfr_t), NULL }, - { sizeof(mpz_t), NULL }, + { NULL, sizeof(mpfr_t) }, + { NULL, sizeof(mpz_t) }, #endif }; /* more_blocks --- get more blocks of memory and add to the free list; - size of a block must be >= sizeof(BLOCK) + size of a block must be >= sizeof(struct block_item) */ void * more_blocks(int id) { - BLOCK *freep, *np, *next; + struct block_item *freep, *np, *next; char *p, *endp; size_t size; size = nextfree[id].size; - assert(size >= sizeof(BLOCK)); - emalloc(freep, BLOCK *, BLOCKCHUNK * size, "more_blocks"); + assert(size >= sizeof(struct block_item)); + emalloc(freep, struct block_item *, BLOCKCHUNK * size, "more_blocks"); p = (char *) freep; endp = p + BLOCKCHUNK * size; for (np = freep; ; np = next) { - next = (BLOCK *) (p += size); + next = (struct block_item *) (p += size); if (p >= endp) { np->freep = NULL; break; |