Mercurial > hg > nginx
comparison src/core/ngx_hunk.h @ 167:8aef3c72e5da
nginx-0.0.1-2003-10-30-19:51:33 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 30 Oct 2003 16:51:33 +0000 |
parents | 389d7ee9fa60 |
children | c42be4185301 |
comparison
equal
deleted
inserted
replaced
166:389d7ee9fa60 | 167:8aef3c72e5da |
---|---|
65 }; | 65 }; |
66 | 66 |
67 | 67 |
68 typedef struct { | 68 typedef struct { |
69 int num; | 69 int num; |
70 ssize_t size; | 70 size_t size; |
71 } ngx_bufs_t; | 71 } ngx_bufs_t; |
72 | 72 |
73 | 73 |
74 typedef int (*ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *out); | 74 typedef int (*ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *out); |
75 | 75 |
115 #define ngx_hunk_special(h) \ | 115 #define ngx_hunk_special(h) \ |
116 (h->type == (h->type & (NGX_HUNK_FLUSH|NGX_HUNK_LAST))) | 116 (h->type == (h->type & (NGX_HUNK_FLUSH|NGX_HUNK_LAST))) |
117 | 117 |
118 | 118 |
119 #define ngx_hunk_size(h) \ | 119 #define ngx_hunk_size(h) \ |
120 ((h->type & NGX_HUNK_IN_MEMORY) ? h->last - h->pos: \ | 120 ((h->type & NGX_HUNK_IN_MEMORY) ? (size_t) (h->last - h->pos): \ |
121 (size_t) (h->file_last - h->file_pos)) | 121 (size_t) (h->file_last - h->file_pos)) |
122 | 122 |
123 | 123 |
124 ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size); | 124 ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size); |
125 | 125 |
126 #define ngx_alloc_hunk(pool) ngx_palloc(pool, sizeof(ngx_hunk_t)) | 126 #define ngx_alloc_hunk(pool) ngx_palloc(pool, sizeof(ngx_hunk_t)) |