]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.h
ui-plain: add enable-html-serving flag
[ps-cgit] / cgit.h
diff --git a/cgit.h b/cgit.h
index 31205622d49784bfca1beb8ba12d2f9c0431c6ed..de5c94a1862692f19f35a66f38f4c24e80dad247 100644 (file)
--- a/cgit.h
+++ b/cgit.h
@@ -3,6 +3,8 @@
 
 
 #include <git-compat-util.h>
+#include <stdbool.h>
+
 #include <cache.h>
 #include <grep.h>
 #include <object.h>
@@ -23,6 +25,9 @@
 #include <notes.h>
 #include <graph.h>
 
+/* Add isgraph(x) to Git's sane ctype support (see git-compat-util.h) */
+#undef isgraph
+#define isgraph(x) (isprint((x)) && !isspace((x)))
 
 /*
  * Dateformats used on misc. pages
@@ -96,6 +101,7 @@ struct cgit_repo {
        int enable_log_linecount;
        int enable_remote_branches;
        int enable_subject_links;
+       int enable_html_serving;
        int max_stats;
        int branch_sort;
        int commit_sort;
@@ -168,7 +174,6 @@ struct cgit_query {
        char *sha2;
        char *path;
        char *name;
-       char *mimetype;
        char *url;
        char *period;
        int   ofs;
@@ -231,6 +236,7 @@ struct cgit_config {
        int enable_log_linecount;
        int enable_remote_branches;
        int enable_subject_links;
+       int enable_html_serving;
        int enable_tree_linenumbers;
        int enable_git_config;
        int local_time;
@@ -386,4 +392,6 @@ extern int readfile(const char *path, char **buf, size_t *size);
 
 extern char *expand_macros(const char *txt);
 
+extern char *get_mimetype_for_filename(const char *filename);
+
 #endif /* CGIT_H */