|
diff --git a/cgit.h b/cgit.h index 66c40b9..4576efb 100644 --- a/ cgit.h+++ b/ cgit.h |
|
@@ -102,102 +102,109 @@ struct commitinfo { |
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 | int tagger_date; |
107 | int 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 { |
| |
127 | int has_symref; |
| |
128 | int has_sha1; |
| |
129 | char *raw; |
| |
130 | char *repo; |
| |
131 | char *page; |
| |
132 | char *search; |
| |
133 | char *grep; |
| |
134 | char *head; |
| |
135 | char *sha1; |
| |
136 | char *sha2; |
| |
137 | char *path; |
| |
138 | char *name; |
| |
139 | int ofs; |
| |
140 | }; |
| |
141 | |
| |
142 | struct cgit_context { |
| |
143 | struct cgit_query qry; |
| |
144 | }; |
| |
145 | |
126 | extern const char *cgit_version; |
146 | extern const char *cgit_version; |
127 | |
147 | |
128 | extern struct repolist cgit_repolist; |
148 | extern struct repolist cgit_repolist; |
129 | extern struct repoinfo *cgit_repo; |
149 | extern struct repoinfo *cgit_repo; |
| |
150 | extern struct cgit_context ctx; |
130 | extern int cgit_cmd; |
151 | extern int cgit_cmd; |
131 | |
152 | |
132 | extern char *cgit_root_title; |
153 | extern char *cgit_root_title; |
133 | extern char *cgit_css; |
154 | extern char *cgit_css; |
134 | extern char *cgit_logo; |
155 | extern char *cgit_logo; |
135 | extern char *cgit_index_header; |
156 | extern char *cgit_index_header; |
136 | extern char *cgit_index_info; |
157 | extern char *cgit_index_info; |
137 | extern char *cgit_logo_link; |
158 | extern char *cgit_logo_link; |
138 | extern char *cgit_module_link; |
159 | extern char *cgit_module_link; |
139 | extern char *cgit_agefile; |
160 | extern char *cgit_agefile; |
140 | extern char *cgit_virtual_root; |
161 | extern char *cgit_virtual_root; |
141 | extern char *cgit_script_name; |
162 | extern char *cgit_script_name; |
142 | extern char *cgit_cache_root; |
163 | extern char *cgit_cache_root; |
143 | extern char *cgit_repo_group; |
164 | extern char *cgit_repo_group; |
144 | extern char *cgit_robots; |
165 | extern char *cgit_robots; |
145 | extern char *cgit_clone_prefix; |
166 | extern char *cgit_clone_prefix; |
146 | |
167 | |
147 | extern int cgit_nocache; |
168 | extern int cgit_nocache; |
148 | extern int cgit_snapshots; |
169 | extern int cgit_snapshots; |
149 | extern int cgit_enable_index_links; |
170 | extern int cgit_enable_index_links; |
150 | extern int cgit_enable_log_filecount; |
171 | extern int cgit_enable_log_filecount; |
151 | extern int cgit_enable_log_linecount; |
172 | extern int cgit_enable_log_linecount; |
152 | extern int cgit_max_lock_attempts; |
173 | extern int cgit_max_lock_attempts; |
153 | extern int cgit_cache_root_ttl; |
174 | extern int cgit_cache_root_ttl; |
154 | extern int cgit_cache_repo_ttl; |
175 | extern int cgit_cache_repo_ttl; |
155 | extern int cgit_cache_dynamic_ttl; |
176 | extern int cgit_cache_dynamic_ttl; |
156 | extern int cgit_cache_static_ttl; |
177 | extern int cgit_cache_static_ttl; |
157 | extern int cgit_cache_max_create_time; |
178 | extern int cgit_cache_max_create_time; |
158 | extern int cgit_summary_log; |
179 | extern int cgit_summary_log; |
159 | extern int cgit_summary_tags; |
180 | extern int cgit_summary_tags; |
160 | extern int cgit_summary_branches; |
181 | extern int cgit_summary_branches; |
161 | |
182 | |
162 | extern int cgit_max_msg_len; |
183 | extern int cgit_max_msg_len; |
163 | extern int cgit_max_repodesc_len; |
184 | extern int cgit_max_repodesc_len; |
164 | extern int cgit_max_commit_count; |
185 | extern int cgit_max_commit_count; |
165 | |
186 | |
166 | extern int cgit_query_has_symref; |
| |
167 | extern int cgit_query_has_sha1; |
| |
168 | |
| |
169 | extern char *cgit_querystring; |
| |
170 | extern char *cgit_query_repo; |
| |
171 | extern char *cgit_query_page; |
| |
172 | extern char *cgit_query_search; |
| |
173 | extern char *cgit_query_grep; |
| |
174 | extern char *cgit_query_head; |
| |
175 | extern char *cgit_query_sha1; |
| |
176 | extern char *cgit_query_sha2; |
| |
177 | extern char *cgit_query_path; |
| |
178 | extern char *cgit_query_name; |
| |
179 | extern int cgit_query_ofs; |
| |
180 | |
187 | |
181 | extern int htmlfd; |
188 | extern int htmlfd; |
182 | |
189 | |
183 | extern int cgit_get_cmd_index(const char *cmd); |
190 | extern int cgit_get_cmd_index(const char *cmd); |
184 | extern struct repoinfo *cgit_get_repoinfo(const char *url); |
191 | extern struct repoinfo *cgit_get_repoinfo(const char *url); |
185 | extern void cgit_global_config_cb(const char *name, const char *value); |
192 | extern void cgit_global_config_cb(const char *name, const char *value); |
186 | extern void cgit_repo_config_cb(const char *name, const char *value); |
193 | extern void cgit_repo_config_cb(const char *name, const char *value); |
187 | extern void cgit_querystring_cb(const char *name, const char *value); |
194 | extern void cgit_querystring_cb(const char *name, const char *value); |
188 | |
195 | |
189 | extern int chk_zero(int result, char *msg); |
196 | extern int chk_zero(int result, char *msg); |
190 | extern int chk_positive(int result, char *msg); |
197 | extern int chk_positive(int result, char *msg); |
191 | extern int chk_non_negative(int result, char *msg); |
198 | extern int chk_non_negative(int result, char *msg); |
192 | |
199 | |
193 | extern int hextoint(char c); |
200 | extern int hextoint(char c); |
194 | extern char *trim_end(const char *str, char c); |
201 | extern char *trim_end(const char *str, char c); |
195 | extern char *strlpart(char *txt, int maxlen); |
202 | extern char *strlpart(char *txt, int maxlen); |
196 | extern char *strrpart(char *txt, int maxlen); |
203 | extern char *strrpart(char *txt, int maxlen); |
197 | |
204 | |
198 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |
205 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |
199 | extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, |
206 | extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, |
200 | int flags, void *cb_data); |
207 | int flags, void *cb_data); |
201 | |
208 | |
202 | extern void *cgit_free_commitinfo(struct commitinfo *info); |
209 | extern void *cgit_free_commitinfo(struct commitinfo *info); |
203 | |
210 | |
|