comparison src/core/ngx_hunk.h @ 100:7ebc8b7fb816

nginx-0.0.1-2003-06-03-19:42:58 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 03 Jun 2003 15:42:58 +0000
parents a059e1aa65d4
children 7a886b9a67dc
comparison
equal deleted inserted replaced
99:a059e1aa65d4 100:7ebc8b7fb816
1 #ifndef _NGX_CHUNK_H_INCLUDED_ 1 #ifndef _NGX_HUNK_H_INCLUDED_
2 #define _NGX_CHUNK_H_INCLUDED_ 2 #define _NGX_HUNK_H_INCLUDED_
3 3
4 4
5 #include <ngx_config.h> 5 #include <ngx_config.h>
6 #include <ngx_types.h> 6 #include <ngx_core.h>
7 #include <ngx_file.h>
8 #include <ngx_alloc.h>
9 7
10 8
11 /* hunk type */ 9 /* hunk type */
12 10
13 /* the hunk is in memory */ 11 /* the hunk is in memory */
33 #define NGX_HUNK_LAST 0x2000 31 #define NGX_HUNK_LAST 0x2000
34 #define NGX_HUNK_LAST_SHADOW 0x4000 32 #define NGX_HUNK_LAST_SHADOW 0x4000
35 33
36 34
37 35
38 typedef struct ngx_hunk_s ngx_hunk_t; 36 typedef struct ngx_hunk_s ngx_hunk_t;
37
39 struct ngx_hunk_s { 38 struct ngx_hunk_s {
40 char *pos; 39 char *pos;
41 char *last; 40 char *last;
42 off_t file_pos; 41 off_t file_pos;
43 off_t file_last; 42 off_t file_last;
51 ngx_file_t *file; 50 ngx_file_t *file;
52 ngx_hunk_t *shadow; 51 ngx_hunk_t *shadow;
53 }; 52 };
54 53
55 54
56 typedef struct ngx_chain_s ngx_chain_t; 55 typedef struct ngx_chain_s ngx_chain_t;
56
57 struct ngx_chain_s { 57 struct ngx_chain_s {
58 ngx_hunk_t *hunk; 58 ngx_hunk_t *hunk;
59 ngx_chain_t *next; 59 ngx_chain_t *next;
60 }; 60 };
61 61
81 chain->hunk = h; \ 81 chain->hunk = h; \
82 chain->next = NULL; \ 82 chain->next = NULL; \
83 } while (0); 83 } while (0);
84 84
85 85
86 #endif /* _NGX_CHUNK_H_INCLUDED_ */ 86 #endif /* _NGX_HUNK_H_INCLUDED_ */