author | Lars Hjemli <hjemli@gmail.com> | 2009-12-08 18:32:48 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-12-08 18:32:48 (UTC) |
commit | f4f6210b4f9c214dc247567bbd06b1135c9ecd06 (patch) (unidiff) | |
tree | 432b3dc327e05220c6ac0aff9ca81cf38a47524c /cgit.h | |
parent | 57bb4fdb8419d7c250d4c6146910df3263943951 (diff) | |
parent | 735e15e38a484bf0daa98776fa7cde270a271cda (diff) | |
download | cgit-f4f6210b4f9c214dc247567bbd06b1135c9ecd06.zip cgit-f4f6210b4f9c214dc247567bbd06b1135c9ecd06.tar.gz cgit-f4f6210b4f9c214dc247567bbd06b1135c9ecd06.tar.bz2 |
Merge branch 'ro/ssdiff'
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -82,180 +82,182 @@ struct cgit_repo { | |||
82 | typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name, | 82 | typedef void (*repo_config_fn)(struct cgit_repo *repo, const char *name, |
83 | const char *value); | 83 | const char *value); |
84 | 84 | ||
85 | struct cgit_repolist { | 85 | struct cgit_repolist { |
86 | int length; | 86 | int length; |
87 | int count; | 87 | int count; |
88 | struct cgit_repo *repos; | 88 | struct cgit_repo *repos; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | struct commitinfo { | 91 | struct commitinfo { |
92 | struct commit *commit; | 92 | struct commit *commit; |
93 | char *author; | 93 | char *author; |
94 | char *author_email; | 94 | char *author_email; |
95 | unsigned long author_date; | 95 | unsigned long author_date; |
96 | char *committer; | 96 | char *committer; |
97 | char *committer_email; | 97 | char *committer_email; |
98 | unsigned long committer_date; | 98 | unsigned long committer_date; |
99 | char *subject; | 99 | char *subject; |
100 | char *msg; | 100 | char *msg; |
101 | char *msg_encoding; | 101 | char *msg_encoding; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | struct taginfo { | 104 | struct taginfo { |
105 | char *tagger; | 105 | char *tagger; |
106 | char *tagger_email; | 106 | char *tagger_email; |
107 | unsigned long tagger_date; | 107 | unsigned long tagger_date; |
108 | char *msg; | 108 | char *msg; |
109 | }; | 109 | }; |
110 | 110 | ||
111 | struct refinfo { | 111 | struct refinfo { |
112 | const char *refname; | 112 | const char *refname; |
113 | struct object *object; | 113 | struct object *object; |
114 | union { | 114 | union { |
115 | struct taginfo *tag; | 115 | struct taginfo *tag; |
116 | struct commitinfo *commit; | 116 | struct commitinfo *commit; |
117 | }; | 117 | }; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | struct reflist { | 120 | struct reflist { |
121 | struct refinfo **refs; | 121 | struct refinfo **refs; |
122 | int alloc; | 122 | int alloc; |
123 | int count; | 123 | int count; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | struct cgit_query { | 126 | struct cgit_query { |
127 | int has_symref; | 127 | int has_symref; |
128 | int has_sha1; | 128 | int has_sha1; |
129 | char *raw; | 129 | char *raw; |
130 | char *repo; | 130 | char *repo; |
131 | char *page; | 131 | char *page; |
132 | char *search; | 132 | char *search; |
133 | char *grep; | 133 | char *grep; |
134 | char *head; | 134 | char *head; |
135 | char *sha1; | 135 | char *sha1; |
136 | char *sha2; | 136 | char *sha2; |
137 | char *path; | 137 | char *path; |
138 | char *name; | 138 | char *name; |
139 | char *mimetype; | 139 | char *mimetype; |
140 | char *url; | 140 | char *url; |
141 | char *period; | 141 | char *period; |
142 | int ofs; | 142 | int ofs; |
143 | int nohead; | 143 | int nohead; |
144 | char *sort; | 144 | char *sort; |
145 | int showmsg; | 145 | int showmsg; |
146 | int ssdiff; | ||
146 | }; | 147 | }; |
147 | 148 | ||
148 | struct cgit_config { | 149 | struct cgit_config { |
149 | char *agefile; | 150 | char *agefile; |
150 | char *cache_root; | 151 | char *cache_root; |
151 | char *clone_prefix; | 152 | char *clone_prefix; |
152 | char *css; | 153 | char *css; |
153 | char *favicon; | 154 | char *favicon; |
154 | char *footer; | 155 | char *footer; |
155 | char *head_include; | 156 | char *head_include; |
156 | char *header; | 157 | char *header; |
157 | char *index_header; | 158 | char *index_header; |
158 | char *index_info; | 159 | char *index_info; |
159 | char *logo; | 160 | char *logo; |
160 | char *logo_link; | 161 | char *logo_link; |
161 | char *module_link; | 162 | char *module_link; |
162 | char *robots; | 163 | char *robots; |
163 | char *root_title; | 164 | char *root_title; |
164 | char *root_desc; | 165 | char *root_desc; |
165 | char *root_readme; | 166 | char *root_readme; |
166 | char *script_name; | 167 | char *script_name; |
167 | char *section; | 168 | char *section; |
168 | char *virtual_root; | 169 | char *virtual_root; |
169 | int cache_size; | 170 | int cache_size; |
170 | int cache_dynamic_ttl; | 171 | int cache_dynamic_ttl; |
171 | int cache_max_create_time; | 172 | int cache_max_create_time; |
172 | int cache_repo_ttl; | 173 | int cache_repo_ttl; |
173 | int cache_root_ttl; | 174 | int cache_root_ttl; |
174 | int cache_scanrc_ttl; | 175 | int cache_scanrc_ttl; |
175 | int cache_static_ttl; | 176 | int cache_static_ttl; |
176 | int embedded; | 177 | int embedded; |
177 | int enable_filter_overrides; | 178 | int enable_filter_overrides; |
178 | int enable_index_links; | 179 | int enable_index_links; |
179 | int enable_log_filecount; | 180 | int enable_log_filecount; |
180 | int enable_log_linecount; | 181 | int enable_log_linecount; |
181 | int enable_tree_linenumbers; | 182 | int enable_tree_linenumbers; |
182 | int local_time; | 183 | int local_time; |
183 | int max_repo_count; | 184 | int max_repo_count; |
184 | int max_commit_count; | 185 | int max_commit_count; |
185 | int max_lock_attempts; | 186 | int max_lock_attempts; |
186 | int max_msg_len; | 187 | int max_msg_len; |
187 | int max_repodesc_len; | 188 | int max_repodesc_len; |
188 | int max_blob_size; | 189 | int max_blob_size; |
189 | int max_stats; | 190 | int max_stats; |
190 | int nocache; | 191 | int nocache; |
191 | int noplainemail; | 192 | int noplainemail; |
192 | int noheader; | 193 | int noheader; |
193 | int renamelimit; | 194 | int renamelimit; |
194 | int snapshots; | 195 | int snapshots; |
195 | int summary_branches; | 196 | int summary_branches; |
196 | int summary_log; | 197 | int summary_log; |
197 | int summary_tags; | 198 | int summary_tags; |
199 | int ssdiff; | ||
198 | struct string_list mimetypes; | 200 | struct string_list mimetypes; |
199 | struct cgit_filter *about_filter; | 201 | struct cgit_filter *about_filter; |
200 | struct cgit_filter *commit_filter; | 202 | struct cgit_filter *commit_filter; |
201 | struct cgit_filter *source_filter; | 203 | struct cgit_filter *source_filter; |
202 | }; | 204 | }; |
203 | 205 | ||
204 | struct cgit_page { | 206 | struct cgit_page { |
205 | time_t modified; | 207 | time_t modified; |
206 | time_t expires; | 208 | time_t expires; |
207 | size_t size; | 209 | size_t size; |
208 | char *mimetype; | 210 | char *mimetype; |
209 | char *charset; | 211 | char *charset; |
210 | char *filename; | 212 | char *filename; |
211 | char *etag; | 213 | char *etag; |
212 | char *title; | 214 | char *title; |
213 | int status; | 215 | int status; |
214 | char *statusmsg; | 216 | char *statusmsg; |
215 | }; | 217 | }; |
216 | 218 | ||
217 | struct cgit_environment { | 219 | struct cgit_environment { |
218 | char *cgit_config; | 220 | char *cgit_config; |
219 | char *http_host; | 221 | char *http_host; |
220 | char *https; | 222 | char *https; |
221 | char *no_http; | 223 | char *no_http; |
222 | char *path_info; | 224 | char *path_info; |
223 | char *query_string; | 225 | char *query_string; |
224 | char *request_method; | 226 | char *request_method; |
225 | char *script_name; | 227 | char *script_name; |
226 | char *server_name; | 228 | char *server_name; |
227 | char *server_port; | 229 | char *server_port; |
228 | }; | 230 | }; |
229 | 231 | ||
230 | struct cgit_context { | 232 | struct cgit_context { |
231 | struct cgit_environment env; | 233 | struct cgit_environment env; |
232 | struct cgit_query qry; | 234 | struct cgit_query qry; |
233 | struct cgit_config cfg; | 235 | struct cgit_config cfg; |
234 | struct cgit_repo *repo; | 236 | struct cgit_repo *repo; |
235 | struct cgit_page page; | 237 | struct cgit_page page; |
236 | }; | 238 | }; |
237 | 239 | ||
238 | struct cgit_snapshot_format { | 240 | struct cgit_snapshot_format { |
239 | const char *suffix; | 241 | const char *suffix; |
240 | const char *mimetype; | 242 | const char *mimetype; |
241 | write_archive_fn_t write_func; | 243 | write_archive_fn_t write_func; |
242 | int bit; | 244 | int bit; |
243 | }; | 245 | }; |
244 | 246 | ||
245 | extern const char *cgit_version; | 247 | extern const char *cgit_version; |
246 | 248 | ||
247 | extern struct cgit_repolist cgit_repolist; | 249 | extern struct cgit_repolist cgit_repolist; |
248 | extern struct cgit_context ctx; | 250 | extern struct cgit_context ctx; |
249 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; | 251 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
250 | 252 | ||
251 | extern struct cgit_repo *cgit_add_repo(const char *url); | 253 | extern struct cgit_repo *cgit_add_repo(const char *url); |
252 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); | 254 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
253 | extern void cgit_repo_config_cb(const char *name, const char *value); | 255 | extern void cgit_repo_config_cb(const char *name, const char *value); |
254 | 256 | ||
255 | extern int chk_zero(int result, char *msg); | 257 | extern int chk_zero(int result, char *msg); |
256 | extern int chk_positive(int result, char *msg); | 258 | extern int chk_positive(int result, char *msg); |
257 | extern int chk_non_negative(int result, char *msg); | 259 | extern int chk_non_negative(int result, char *msg); |
258 | 260 | ||
259 | extern char *trim_end(const char *str, char c); | 261 | extern char *trim_end(const char *str, char c); |
260 | extern char *strlpart(char *txt, int maxlen); | 262 | extern char *strlpart(char *txt, int maxlen); |
261 | extern char *strrpart(char *txt, int maxlen); | 263 | extern char *strrpart(char *txt, int maxlen); |