summaryrefslogtreecommitdiffabout
path: root/cgit.c
Unidiff
Diffstat (limited to 'cgit.c') (more/less context) (show whitespace changes)
-rw-r--r--cgit.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index b3a98c1..dbec196 100644
--- a/cgit.c
+++ b/cgit.c
@@ -19,2 +19,10 @@ const char *cgit_version = CGIT_VERSION;
19 19
20void add_mimetype(const char *name, const char *value)
21{
22 struct string_list_item *item;
23
24 item = string_list_insert(xstrdup(name), &ctx.cfg.mimetypes);
25 item->util = xstrdup(value);
26}
27
20struct cgit_filter *new_filter(const char *cmd, int extra_args) 28struct cgit_filter *new_filter(const char *cmd, int extra_args)
@@ -68,2 +76,4 @@ void config_cb(const char *name, const char *value)
68 ctx.cfg.nocache = atoi(value); 76 ctx.cfg.nocache = atoi(value);
77 else if (!strcmp(name, "noplainemail"))
78 ctx.cfg.noplainemail = atoi(value);
69 else if (!strcmp(name, "noheader")) 79 else if (!strcmp(name, "noheader"))
@@ -122,2 +132,4 @@ void config_cb(const char *name, const char *value)
122 ctx.cfg.local_time = atoi(value); 132 ctx.cfg.local_time = atoi(value);
133 else if (!prefixcmp(name, "mimetype."))
134 add_mimetype(name + 9, value);
123 else if (!strcmp(name, "repo.group")) 135 else if (!strcmp(name, "repo.group"))
@@ -238,2 +250,3 @@ static void prepare_context(struct cgit_context *ctx)
238 ctx->page.etag = NULL; 250 ctx->page.etag = NULL;
251 memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list));
239} 252}