summaryrefslogtreecommitdiffabout
path: root/cgit.h
Unidiff
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/cgit.h b/cgit.h
index 66c40b9..4576efb 100644
--- a/cgit.h
+++ b/cgit.h
@@ -110,36 +110,57 @@ struct taginfo {
110 110
111struct refinfo { 111struct 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
120struct reflist { 120struct 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
126struct 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
142struct cgit_context {
143 struct cgit_query qry;
144};
145
126extern const char *cgit_version; 146extern const char *cgit_version;
127 147
128extern struct repolist cgit_repolist; 148extern struct repolist cgit_repolist;
129extern struct repoinfo *cgit_repo; 149extern struct repoinfo *cgit_repo;
150extern struct cgit_context ctx;
130extern int cgit_cmd; 151extern int cgit_cmd;
131 152
132extern char *cgit_root_title; 153extern char *cgit_root_title;
133extern char *cgit_css; 154extern char *cgit_css;
134extern char *cgit_logo; 155extern char *cgit_logo;
135extern char *cgit_index_header; 156extern char *cgit_index_header;
136extern char *cgit_index_info; 157extern char *cgit_index_info;
137extern char *cgit_logo_link; 158extern char *cgit_logo_link;
138extern char *cgit_module_link; 159extern char *cgit_module_link;
139extern char *cgit_agefile; 160extern char *cgit_agefile;
140extern char *cgit_virtual_root; 161extern char *cgit_virtual_root;
141extern char *cgit_script_name; 162extern char *cgit_script_name;
142extern char *cgit_cache_root; 163extern char *cgit_cache_root;
143extern char *cgit_repo_group; 164extern char *cgit_repo_group;
144extern char *cgit_robots; 165extern char *cgit_robots;
145extern char *cgit_clone_prefix; 166extern char *cgit_clone_prefix;
@@ -150,46 +171,32 @@ extern int cgit_enable_index_links;
150extern int cgit_enable_log_filecount; 171extern int cgit_enable_log_filecount;
151extern int cgit_enable_log_linecount; 172extern int cgit_enable_log_linecount;
152extern int cgit_max_lock_attempts; 173extern int cgit_max_lock_attempts;
153extern int cgit_cache_root_ttl; 174extern int cgit_cache_root_ttl;
154extern int cgit_cache_repo_ttl; 175extern int cgit_cache_repo_ttl;
155extern int cgit_cache_dynamic_ttl; 176extern int cgit_cache_dynamic_ttl;
156extern int cgit_cache_static_ttl; 177extern int cgit_cache_static_ttl;
157extern int cgit_cache_max_create_time; 178extern int cgit_cache_max_create_time;
158extern int cgit_summary_log; 179extern int cgit_summary_log;
159extern int cgit_summary_tags; 180extern int cgit_summary_tags;
160extern int cgit_summary_branches; 181extern int cgit_summary_branches;
161 182
162extern int cgit_max_msg_len; 183extern int cgit_max_msg_len;
163extern int cgit_max_repodesc_len; 184extern int cgit_max_repodesc_len;
164extern int cgit_max_commit_count; 185extern int cgit_max_commit_count;
165 186
166extern int cgit_query_has_symref;
167extern int cgit_query_has_sha1;
168
169extern char *cgit_querystring;
170extern char *cgit_query_repo;
171extern char *cgit_query_page;
172extern char *cgit_query_search;
173extern char *cgit_query_grep;
174extern char *cgit_query_head;
175extern char *cgit_query_sha1;
176extern char *cgit_query_sha2;
177extern char *cgit_query_path;
178extern char *cgit_query_name;
179extern int cgit_query_ofs;
180 187
181extern int htmlfd; 188extern int htmlfd;
182 189
183extern int cgit_get_cmd_index(const char *cmd); 190extern int cgit_get_cmd_index(const char *cmd);
184extern struct repoinfo *cgit_get_repoinfo(const char *url); 191extern struct repoinfo *cgit_get_repoinfo(const char *url);
185extern void cgit_global_config_cb(const char *name, const char *value); 192extern void cgit_global_config_cb(const char *name, const char *value);
186extern void cgit_repo_config_cb(const char *name, const char *value); 193extern void cgit_repo_config_cb(const char *name, const char *value);
187extern void cgit_querystring_cb(const char *name, const char *value); 194extern void cgit_querystring_cb(const char *name, const char *value);
188 195
189extern int chk_zero(int result, char *msg); 196extern int chk_zero(int result, char *msg);
190extern int chk_positive(int result, char *msg); 197extern int chk_positive(int result, char *msg);
191extern int chk_non_negative(int result, char *msg); 198extern int chk_non_negative(int result, char *msg);
192 199
193extern int hextoint(char c); 200extern int hextoint(char c);
194extern char *trim_end(const char *str, char c); 201extern char *trim_end(const char *str, char c);
195extern char *strlpart(char *txt, int maxlen); 202extern char *strlpart(char *txt, int maxlen);