aboutsummaryrefslogtreecommitdiff
path: root/cgit.h
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.h')
-rw-r--r--cgit.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/cgit.h b/cgit.h
index df42312..5d81fe8 100644
--- a/cgit.h
+++ b/cgit.h
@@ -75,6 +75,12 @@ struct cgit_exec_filter {
int pid;
};
+struct cgit_section {
+ unsigned int collapse : 1;
+ char *name;
+ struct cgit_section *next;
+};
+
struct cgit_repo {
char *url;
char *name;
@@ -85,7 +91,7 @@ struct cgit_repo {
char *defbranch;
char *module_link;
struct string_list readme;
- char *section;
+ struct cgit_section *section;
char *clone_url;
char *logo;
char *logo_link;
@@ -208,7 +214,7 @@ struct cgit_config {
char *root_desc;
char *root_readme;
char *script_name;
- char *section;
+ struct cgit_section *section;
char *repository_sort;
char *virtual_root; /* Always ends with '/'. */
char *strict_export;
@@ -305,6 +311,7 @@ struct cgit_context {
struct cgit_config cfg;
struct cgit_repo *repo;
struct cgit_page page;
+ struct cgit_section *sections;
};
typedef int (*write_archive_fn_t)(const char *, const char *);
@@ -322,6 +329,8 @@ extern struct cgit_repolist cgit_repolist;
extern struct cgit_context ctx;
extern const struct cgit_snapshot_format cgit_snapshot_formats[];
+extern struct cgit_section* get_or_create_section(const char *section);
+
extern char *cgit_default_repo_desc;
extern struct cgit_repo *cgit_add_repo(const char *url);
extern struct cgit_repo *cgit_get_repoinfo(const char *url);