comparison src/core/ngx_hunk.c @ 76:6127d7075471

nginx-0.0.1-2003-04-15-19:06:52 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 15 Apr 2003 15:06:52 +0000
parents 5a7d1aaa1618
children 738fe44c70d5
comparison
equal deleted inserted replaced
75:869b10be682f 76:6127d7075471
16 h->file_pos = h->file_last = 0; 16 h->file_pos = h->file_last = 0;
17 h->end = h->last + size; 17 h->end = h->last + size;
18 h->post_end = h->end + after; 18 h->post_end = h->end + after;
19 19
20 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; 20 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY;
21 h->file = NULL;
22 h->shadow = NULL;
23
21 h->tag = 0; 24 h->tag = 0;
22 h->file = NULL;
23 25
24 return h; 26 return h;
25 } 27 }
26 28
27 ngx_hunk_t *ngx_create_hunk_before(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) 29 ngx_hunk_t *ngx_create_hunk_before(ngx_pool_t *pool, ngx_hunk_t *hunk, int size)
36 h->end = h->post_end = hunk->pre_start = hunk->pos; 38 h->end = h->post_end = hunk->pre_start = hunk->pos;
37 h->start = h->pos = h->last = h->end - size; 39 h->start = h->pos = h->last = h->end - size;
38 h->file_pos = h->file_last = 0; 40 h->file_pos = h->file_last = 0;
39 41
40 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; 42 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY;
43 h->file = NULL;
44 h->shadow = NULL;
45
41 h->tag = 0; 46 h->tag = 0;
42 h->file = NULL;
43 47
44 } else { 48 } else {
45 ngx_test_null(h->pre_start, ngx_palloc(pool, size), NULL); 49 ngx_test_null(h->pre_start, ngx_palloc(pool, size), NULL);
46 h->start = h->pos = h->last = h->pre_start; 50 h->start = h->pos = h->last = h->pre_start;
47 h->end = h->post_end = h->start + size; 51 h->end = h->post_end = h->start + size;
48 h->file_pos = h->file_last = 0; 52 h->file_pos = h->file_last = 0;
49 53
50 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; 54 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY;
55 h->file = NULL;
56 h->shadow = NULL;
57
51 h->tag = 0; 58 h->tag = 0;
52 h->file = NULL;
53 } 59 }
54 60
55 return h; 61 return h;
56 } 62 }
57 63
69 h->pre_start = h->start = h->pos = h->last = hunk->post_end = 75 h->pre_start = h->start = h->pos = h->last = hunk->post_end =
70 hunk->last; 76 hunk->last;
71 h->file_pos = h->file_last = 0; 77 h->file_pos = h->file_last = 0;
72 78
73 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; 79 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY;
80 h->file = NULL;
81 h->shadow = NULL;
82
74 h->tag = 0; 83 h->tag = 0;
75 h->file = NULL;
76 84
77 } else { 85 } else {
78 ngx_test_null(h->pre_start, ngx_palloc(pool, size), NULL); 86 ngx_test_null(h->pre_start, ngx_palloc(pool, size), NULL);
79 h->start = h->pos = h->last = h->pre_start; 87 h->start = h->pos = h->last = h->pre_start;
80 h->end = h->post_end = h->start + size; 88 h->end = h->post_end = h->start + size;
81 h->file_pos = h->file_last = 0; 89 h->file_pos = h->file_last = 0;
82 90
83 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY; 91 h->type = NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY;
92 h->file = NULL;
93 h->shadow = NULL;
94
84 h->tag = 0; 95 h->tag = 0;
85 h->file = NULL;
86 } 96 }
87 97
88 return h; 98 return h;
89 } 99 }