]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.h
ui-snapshot: set unused cgit_filter fields to zero
[ps-cgit] / cgit.h
diff --git a/cgit.h b/cgit.h
index fc3fc6fb29b36cd65db6fa2231ea3caa8f248229..a72c503d84c35dec4ff9709a4b81f4da854a6c2f 100644 (file)
--- a/cgit.h
+++ b/cgit.h
@@ -62,7 +62,6 @@ struct cgit_filter {
        int old_stdout;
        int pipe_fh[2];
        int pid;
-       int exitstatus;
 };
 
 struct cgit_repo {
@@ -73,7 +72,7 @@ struct cgit_repo {
        char *owner;
        char *defbranch;
        char *module_link;
-       char *readme;
+       struct string_list readme;
        char *section;
        char *clone_url;
        char *logo;
@@ -85,6 +84,7 @@ struct cgit_repo {
        int enable_remote_branches;
        int enable_subject_links;
        int max_stats;
+       int branch_sort;
        int commit_sort;
        time_t mtime;
        struct cgit_filter *about_filter;
@@ -182,7 +182,7 @@ struct cgit_config {
        char *mimetype_file;
        char *module_link;
        char *project_list;
-       char *readme;
+       struct string_list readme;
        char *robots;
        char *root_title;
        char *root_desc;
@@ -199,6 +199,7 @@ struct cgit_config {
        int cache_root_ttl;
        int cache_scanrc_ttl;
        int cache_static_ttl;
+       int cache_about_ttl;
        int case_sensitive_sort;
        int embedded;
        int enable_filter_overrides;
@@ -234,6 +235,7 @@ struct cgit_config {
        int summary_log;
        int summary_tags;
        int ssdiff;
+       int branch_sort;
        int commit_sort;
        struct string_list mimetypes;
        struct cgit_filter *about_filter;
@@ -245,13 +247,13 @@ struct cgit_page {
        time_t modified;
        time_t expires;
        size_t size;
-       char *mimetype;
-       char *charset;
-       char *filename;
-       char *etag;
-       char *title;
+       const char *mimetype;
+       const char *charset;
+       const char *filename;
+       const char *etag;
+       const char *title;
        int status;
-       char *statusmsg;
+       const char *statusmsg;
 };
 
 struct cgit_environment {
@@ -304,6 +306,8 @@ extern char *ensure_end(const char *str, char c);
 extern char *strlpart(char *txt, int maxlen);
 extern char *strrpart(char *txt, int maxlen);
 
+extern void strbuf_ensure_end(struct strbuf *sb, char c);
+
 extern void cgit_add_ref(struct reflist *list, struct refinfo *ref);
 extern void cgit_free_reflist_inner(struct reflist *list);
 extern int cgit_refs_cb(const char *refname, const unsigned char *sha1,
@@ -327,6 +331,9 @@ extern void cgit_diff_commit(struct commit *commit, filepair_fn fn,
 __attribute__((format (printf,1,2)))
 extern char *fmt(const char *format,...);
 
+__attribute__((format (printf,1,2)))
+extern char *fmtalloc(const char *format,...);
+
 extern struct commitinfo *cgit_parse_commit(struct commit *commit);
 extern struct taginfo *cgit_parse_tag(struct tag *tag);
 extern void cgit_parse_url(const char *url);
@@ -337,6 +344,7 @@ extern int cgit_parse_snapshots_mask(const char *str);
 
 extern int cgit_open_filter(struct cgit_filter *filter);
 extern int cgit_close_filter(struct cgit_filter *filter);
+extern struct cgit_filter *cgit_new_filter(const char *cmd, filter_type filtertype);
 
 extern void cgit_prepare_repo_env(struct cgit_repo * repo);