Mercurial > hg > nginx
comparison src/core/ngx_hunk.h @ 148:5afee0074707
nginx-0.0.1-2003-10-17-00:19:16 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 16 Oct 2003 20:19:16 +0000 |
parents | be71fca7f9d7 |
children | eac26585476e |
comparison
equal
deleted
inserted
replaced
147:be71fca7f9d7 | 148:5afee0074707 |
---|---|
83 | 83 |
84 #define ngx_hunk_special(h) \ | 84 #define ngx_hunk_special(h) \ |
85 (h->type == (h->type & (NGX_HUNK_FLUSH|NGX_HUNK_LAST))) | 85 (h->type == (h->type & (NGX_HUNK_FLUSH|NGX_HUNK_LAST))) |
86 | 86 |
87 | 87 |
88 #define nxg_hunk_size(h) \ | 88 #define ngx_hunk_size(h) \ |
89 (h->type & NGX_HUNK_IN_MEMORY) ? h->last - h->pos: \ | 89 ((h->type & NGX_HUNK_IN_MEMORY) ? h->last - h->pos: \ |
90 (size_t) h->file_last - h->file_pos | 90 (size_t) (h->file_last - h->file_pos)) |
91 | 91 |
92 | 92 |
93 ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, | 93 ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, |
94 int before, int after); | 94 int before, int after); |
95 | 95 |
106 } while (0); | 106 } while (0); |
107 | 107 |
108 #define ngx_alloc_ce_and_set_hunk ngx_add_hunk_to_chain | 108 #define ngx_alloc_ce_and_set_hunk ngx_add_hunk_to_chain |
109 | 109 |
110 | 110 |
111 #define ngx_chain_add_ce(ngx_chain_t *chain, ngx_chain_t **last, \ | 111 #define ngx_chain_add_ce(chain, last, ce) \ |
112 ngx_chain_t *ce) \ | |
113 if (chain) { \ | 112 if (chain) { \ |
114 last->next = ce; \ | 113 *last = ce; \ |
115 } else { \ | 114 } else { \ |
116 chain = ce; \ | 115 chain = ce; \ |
117 } \ | 116 } \ |
118 last = ce; | 117 last = &ce->next |
119 | 118 |
120 | 119 |
121 int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in); | 120 int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in); |
122 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, | 121 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, |
123 ngx_chain_t **out); | 122 ngx_chain_t **out); |