Unidiff1 files changed, 3 insertions, 0 deletions
|
diff --git a/cgit.h b/cgit.h index cb2f176..4fe94c6 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -40,48 +40,49 @@ |
40 | |
40 | |
41 | /* |
41 | /* |
42 | * Default encoding |
42 | * Default encoding |
43 | */ |
43 | */ |
44 | #define PAGE_ENCODING "UTF-8" |
44 | #define PAGE_ENCODING "UTF-8" |
45 | |
45 | |
46 | typedef void (*configfn)(const char *name, const char *value); |
46 | typedef void (*configfn)(const char *name, const char *value); |
47 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
47 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
48 | typedef void (*linediff_fn)(char *line, int len); |
48 | typedef void (*linediff_fn)(char *line, int len); |
49 | |
49 | |
50 | struct cgit_repo { |
50 | struct cgit_repo { |
51 | char *url; |
51 | char *url; |
52 | char *name; |
52 | char *name; |
53 | char *path; |
53 | char *path; |
54 | char *desc; |
54 | char *desc; |
55 | char *owner; |
55 | char *owner; |
56 | char *defbranch; |
56 | char *defbranch; |
57 | char *group; |
57 | char *group; |
58 | char *module_link; |
58 | char *module_link; |
59 | char *readme; |
59 | char *readme; |
60 | char *clone_url; |
60 | char *clone_url; |
61 | int snapshots; |
61 | int snapshots; |
62 | int enable_log_filecount; |
62 | int enable_log_filecount; |
63 | int enable_log_linecount; |
63 | int enable_log_linecount; |
| |
64 | int max_stats; |
64 | time_t mtime; |
65 | time_t mtime; |
65 | }; |
66 | }; |
66 | |
67 | |
67 | struct cgit_repolist { |
68 | struct cgit_repolist { |
68 | int length; |
69 | int length; |
69 | int count; |
70 | int count; |
70 | struct cgit_repo *repos; |
71 | struct cgit_repo *repos; |
71 | }; |
72 | }; |
72 | |
73 | |
73 | struct commitinfo { |
74 | struct commitinfo { |
74 | struct commit *commit; |
75 | struct commit *commit; |
75 | char *author; |
76 | char *author; |
76 | char *author_email; |
77 | char *author_email; |
77 | unsigned long author_date; |
78 | unsigned long author_date; |
78 | char *committer; |
79 | char *committer; |
79 | char *committer_email; |
80 | char *committer_email; |
80 | unsigned long committer_date; |
81 | unsigned long committer_date; |
81 | char *subject; |
82 | char *subject; |
82 | char *msg; |
83 | char *msg; |
83 | char *msg_encoding; |
84 | char *msg_encoding; |
84 | }; |
85 | }; |
85 | |
86 | |
86 | struct taginfo { |
87 | struct taginfo { |
87 | char *tagger; |
88 | char *tagger; |
@@ -99,88 +100,90 @@ struct refinfo { |
99 | }; |
100 | }; |
100 | }; |
101 | }; |
101 | |
102 | |
102 | struct reflist { |
103 | struct reflist { |
103 | struct refinfo **refs; |
104 | struct refinfo **refs; |
104 | int alloc; |
105 | int alloc; |
105 | int count; |
106 | int count; |
106 | }; |
107 | }; |
107 | |
108 | |
108 | struct cgit_query { |
109 | struct cgit_query { |
109 | int has_symref; |
110 | int has_symref; |
110 | int has_sha1; |
111 | int has_sha1; |
111 | char *raw; |
112 | char *raw; |
112 | char *repo; |
113 | char *repo; |
113 | char *page; |
114 | char *page; |
114 | char *search; |
115 | char *search; |
115 | char *grep; |
116 | char *grep; |
116 | char *head; |
117 | char *head; |
117 | char *sha1; |
118 | char *sha1; |
118 | char *sha2; |
119 | char *sha2; |
119 | char *path; |
120 | char *path; |
120 | char *name; |
121 | char *name; |
121 | char *mimetype; |
122 | char *mimetype; |
122 | char *url; |
123 | char *url; |
| |
124 | char *period; |
123 | int ofs; |
125 | int ofs; |
124 | int nohead; |
126 | int nohead; |
125 | char *sort; |
127 | char *sort; |
126 | int showmsg; |
128 | int showmsg; |
127 | }; |
129 | }; |
128 | |
130 | |
129 | struct cgit_config { |
131 | struct cgit_config { |
130 | char *agefile; |
132 | char *agefile; |
131 | char *cache_root; |
133 | char *cache_root; |
132 | char *clone_prefix; |
134 | char *clone_prefix; |
133 | char *css; |
135 | char *css; |
134 | char *favicon; |
136 | char *favicon; |
135 | char *footer; |
137 | char *footer; |
136 | char *index_header; |
138 | char *index_header; |
137 | char *index_info; |
139 | char *index_info; |
138 | char *logo; |
140 | char *logo; |
139 | char *logo_link; |
141 | char *logo_link; |
140 | char *module_link; |
142 | char *module_link; |
141 | char *repo_group; |
143 | char *repo_group; |
142 | char *robots; |
144 | char *robots; |
143 | char *root_title; |
145 | char *root_title; |
144 | char *root_desc; |
146 | char *root_desc; |
145 | char *root_readme; |
147 | char *root_readme; |
146 | char *script_name; |
148 | char *script_name; |
147 | char *virtual_root; |
149 | char *virtual_root; |
148 | int cache_size; |
150 | int cache_size; |
149 | int cache_dynamic_ttl; |
151 | int cache_dynamic_ttl; |
150 | int cache_max_create_time; |
152 | int cache_max_create_time; |
151 | int cache_repo_ttl; |
153 | int cache_repo_ttl; |
152 | int cache_root_ttl; |
154 | int cache_root_ttl; |
153 | int cache_static_ttl; |
155 | int cache_static_ttl; |
154 | int enable_index_links; |
156 | int enable_index_links; |
155 | int enable_log_filecount; |
157 | int enable_log_filecount; |
156 | int enable_log_linecount; |
158 | int enable_log_linecount; |
157 | int local_time; |
159 | int local_time; |
158 | int max_repo_count; |
160 | int max_repo_count; |
159 | int max_commit_count; |
161 | int max_commit_count; |
160 | int max_lock_attempts; |
162 | int max_lock_attempts; |
161 | int max_msg_len; |
163 | int max_msg_len; |
162 | int max_repodesc_len; |
164 | int max_repodesc_len; |
| |
165 | int max_stats; |
163 | int nocache; |
166 | int nocache; |
164 | int renamelimit; |
167 | int renamelimit; |
165 | int snapshots; |
168 | int snapshots; |
166 | int summary_branches; |
169 | int summary_branches; |
167 | int summary_log; |
170 | int summary_log; |
168 | int summary_tags; |
171 | int summary_tags; |
169 | }; |
172 | }; |
170 | |
173 | |
171 | struct cgit_page { |
174 | struct cgit_page { |
172 | time_t modified; |
175 | time_t modified; |
173 | time_t expires; |
176 | time_t expires; |
174 | size_t size; |
177 | size_t size; |
175 | char *mimetype; |
178 | char *mimetype; |
176 | char *charset; |
179 | char *charset; |
177 | char *filename; |
180 | char *filename; |
178 | char *title; |
181 | char *title; |
179 | }; |
182 | }; |
180 | |
183 | |
181 | struct cgit_context { |
184 | struct cgit_context { |
182 | struct cgit_query qry; |
185 | struct cgit_query qry; |
183 | struct cgit_config cfg; |
186 | struct cgit_config cfg; |
184 | struct cgit_repo *repo; |
187 | struct cgit_repo *repo; |
185 | struct cgit_page page; |
188 | struct cgit_page page; |
186 | }; |
189 | }; |
|