summaryrefslogtreecommitdiffabout
path: root/cgit.c
authorLars Hjemli <hjemli@gmail.com>2008-03-27 08:22:13 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-03-27 08:22:13 (UTC)
commitee4056bd2c902a12dea67874368863fe60ea5a5f (patch) (unidiff)
treed54da54ace7b8999cf8785d877a0a9cad5262a0c /cgit.c
parentdc3282f0baa14949439593729a45fbe143e3622c (diff)
downloadcgit-ee4056bd2c902a12dea67874368863fe60ea5a5f.zip
cgit-ee4056bd2c902a12dea67874368863fe60ea5a5f.tar.gz
cgit-ee4056bd2c902a12dea67874368863fe60ea5a5f.tar.bz2
Add cache.h
The functions found in cache.c are only used by cgit.c, so there's no point in rebuilding all object files when the cache interface is changed. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index f749b6b..73b1f02 100644
--- a/cgit.c
+++ b/cgit.c
@@ -1,33 +1,34 @@
1/* cgit.c: cgi for the git scm 1/* cgit.c: cgi for the git scm
2 * 2 *
3 * Copyright (C) 2006 Lars Hjemli 3 * Copyright (C) 2006 Lars Hjemli
4 * 4 *
5 * Licensed under GNU General Public License v2 5 * Licensed under GNU General Public License v2
6 * (see COPYING for full license text) 6 * (see COPYING for full license text)
7 */ 7 */
8 8
9#include "cgit.h" 9#include "cgit.h"
10#include "cache.h"
10#include "cmd.h" 11#include "cmd.h"
11#include "ui-shared.h" 12#include "ui-shared.h"
12 13
13const char *cgit_version = CGIT_VERSION; 14const char *cgit_version = CGIT_VERSION;
14 15
15void config_cb(const char *name, const char *value) 16void config_cb(const char *name, const char *value)
16{ 17{
17 if (!strcmp(name, "root-title")) 18 if (!strcmp(name, "root-title"))
18 ctx.cfg.root_title = xstrdup(value); 19 ctx.cfg.root_title = xstrdup(value);
19 else if (!strcmp(name, "css")) 20 else if (!strcmp(name, "css"))
20 ctx.cfg.css = xstrdup(value); 21 ctx.cfg.css = xstrdup(value);
21 else if (!strcmp(name, "logo")) 22 else if (!strcmp(name, "logo"))
22 ctx.cfg.logo = xstrdup(value); 23 ctx.cfg.logo = xstrdup(value);
23 else if (!strcmp(name, "index-header")) 24 else if (!strcmp(name, "index-header"))
24 ctx.cfg.index_header = xstrdup(value); 25 ctx.cfg.index_header = xstrdup(value);
25 else if (!strcmp(name, "index-info")) 26 else if (!strcmp(name, "index-info"))
26 ctx.cfg.index_info = xstrdup(value); 27 ctx.cfg.index_info = xstrdup(value);
27 else if (!strcmp(name, "logo-link")) 28 else if (!strcmp(name, "logo-link"))
28 ctx.cfg.logo_link = xstrdup(value); 29 ctx.cfg.logo_link = xstrdup(value);
29 else if (!strcmp(name, "module-link")) 30 else if (!strcmp(name, "module-link"))
30 ctx.cfg.module_link = xstrdup(value); 31 ctx.cfg.module_link = xstrdup(value);
31 else if (!strcmp(name, "virtual-root")) { 32 else if (!strcmp(name, "virtual-root")) {
32 ctx.cfg.virtual_root = trim_end(value, '/'); 33 ctx.cfg.virtual_root = trim_end(value, '/');
33 if (!ctx.cfg.virtual_root && (!strcmp(value, "/"))) 34 if (!ctx.cfg.virtual_root && (!strcmp(value, "/")))