diff options
author | Igor Sysoev <igor@sysoev.ru> | 2002-09-02 14:48:24 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2002-09-02 14:48:24 +0000 |
commit | a58e3ca14300fce97b2124233afe140c8d59199f (patch) | |
tree | d24eff379cc7dfb5c6952f1bb15735cd63ba2179 /src/core/ngx_hunk.c | |
parent | 016b85270268989d769bade2004a7c628a47d726 (diff) | |
download | nginx-a58e3ca14300fce97b2124233afe140c8d59199f.tar.gz nginx-a58e3ca14300fce97b2124233afe140c8d59199f.zip |
nginx-0.0.1-2002-09-02-18:48:24 import
Diffstat (limited to 'src/core/ngx_hunk.c')
-rw-r--r-- | src/core/ngx_hunk.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/ngx_hunk.c b/src/core/ngx_hunk.c index f829b7e48..79a8ad748 100644 --- a/src/core/ngx_hunk.c +++ b/src/core/ngx_hunk.c @@ -1,13 +1,13 @@ -#include <ngx_file.h> #include <ngx_hunk.h> -ngx_hunk_t *ngx_get_hunk(ngx_pool_t *pool, int size, int before, int after) +ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, + int before, int after) { ngx_hunk_t *h = ngx_palloc(pool, sizeof(ngx_hunk_t)); -#ifndef OFF_EQUAL_PTR +#if !(HAVE_OFFSET_EQUAL_PTR) h->pos.file = h->last.file = 0; #endif @@ -18,16 +18,16 @@ ngx_hunk_t *ngx_get_hunk(ngx_pool_t *pool, int size, int before, int after) h->type = NGX_HUNK_TEMP; h->tag = 0; - h->fd = (ngx_fd_t) -1; + h->file = NULL; return h; } -ngx_hunk_t *ngx_get_hunk_before(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) +ngx_hunk_t *ngx_create_hunk_before(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) { ngx_hunk_t *h = ngx_palloc(pool, sizeof(ngx_hunk_t)); -#ifndef OFF_EQUAL_PTR +#if !(HAVE_OFFSET_EQUAL_PTR) h->pos.file = h->last.file = 0; #endif @@ -39,7 +39,7 @@ ngx_hunk_t *ngx_get_hunk_before(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) h->type = NGX_HUNK_TEMP; h->tag = 0; - h->fd = (ngx_fd_t) -1; + h->file = NULL; } else { h->pre_start = h->start = h->pos.mem = h->last.mem @@ -48,17 +48,17 @@ ngx_hunk_t *ngx_get_hunk_before(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) h->type = NGX_HUNK_TEMP; h->tag = 0; - h->fd = (ngx_fd_t) -1; + h->file = NULL; } return h; } -ngx_hunk_t *ngx_get_hunk_after(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) +ngx_hunk_t *ngx_create_hunk_after(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) { ngx_hunk_t *h = ngx_palloc(pool, sizeof(ngx_hunk_t)); -#ifndef OFF_EQUAL_PTR +#if !(HAVE_OFFSET_EQUAL_PTR) h->pos.file = h->last.file = 0; #endif @@ -71,7 +71,7 @@ ngx_hunk_t *ngx_get_hunk_after(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) hunk->last.mem; h->type = NGX_HUNK_TEMP; h->tag = 0; - h->fd = (ngx_fd_t) -1; + h->file = NULL; } else { h->pre_start = h->start = h->pos.mem = h->last.mem = @@ -80,7 +80,7 @@ ngx_hunk_t *ngx_get_hunk_after(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) h->type = NGX_HUNK_TEMP; h->tag = 0; - h->fd = (ngx_fd_t) -1; + h->file = NULL; } return h; |