summaryrefslogtreecommitdiffabout
path: root/cgit.c
Unidiff
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 2039ab1..4f414c3 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
20void config_cb(const char *name, const char *value) 28void config_cb(const char *name, const char *value)
@@ -103,2 +111,4 @@ void config_cb(const char *name, const char *value)
103 ctx.cfg.local_time = atoi(value); 111 ctx.cfg.local_time = atoi(value);
112 else if (!prefixcmp(name, "mimetype."))
113 add_mimetype(name + 9, value);
104 else if (!strcmp(name, "repo.group")) 114 else if (!strcmp(name, "repo.group"))
@@ -215,2 +225,3 @@ static void prepare_context(struct cgit_context *ctx)
215 ctx->page.etag = NULL; 225 ctx->page.etag = NULL;
226 memset(&ctx->cfg.mimetypes, 0, sizeof(struct string_list));
216} 227}