summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2006-12-16 00:14:01 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2006-12-16 00:14:01 (UTC)
commita1a79998f22fe8279be51fc1d31bfcf14031c109 (patch) (unidiff)
treeaea96b67fe0030373ed6338fbc9ef3abca918949
parent6c14f5e457e17da9205588c273d7cb9f92a23b9f (diff)
downloadcgit-a1a79998f22fe8279be51fc1d31bfcf14031c109.zip
cgit-a1a79998f22fe8279be51fc1d31bfcf14031c109.tar.gz
cgit-a1a79998f22fe8279be51fc1d31bfcf14031c109.tar.bz2
Add head comment to shared.c
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--shared.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared.c b/shared.c
index 6b5cfc2..5f2a5ce 100644
--- a/shared.c
+++ b/shared.c
@@ -1,48 +1,56 @@
1/* shared.c: global vars + some callback functions
2 *
3 * Copyright (C) 2006 Lars Hjemli
4 *
5 * Licensed under GNU General Public License v2
6 * (see COPYING for full license text)
7 */
8
1#include "cgit.h" 9#include "cgit.h"
2 10
3char *cgit_root = "/usr/src/git"; 11char *cgit_root = "/usr/src/git";
4char *cgit_root_title = "Git repository browser"; 12char *cgit_root_title = "Git repository browser";
5char *cgit_css = "/cgit.css"; 13char *cgit_css = "/cgit.css";
6char *cgit_logo = "/git-logo.png"; 14char *cgit_logo = "/git-logo.png";
7char *cgit_logo_link = "http://www.kernel.org/pub/software/scm/git/docs/"; 15char *cgit_logo_link = "http://www.kernel.org/pub/software/scm/git/docs/";
8char *cgit_virtual_root = NULL; 16char *cgit_virtual_root = NULL;
9 17
10char *cgit_cache_root = "/var/cache/cgit"; 18char *cgit_cache_root = "/var/cache/cgit";
11 19
12int cgit_max_lock_attempts = 5; 20int cgit_max_lock_attempts = 5;
13int cgit_cache_root_ttl = 5; 21int cgit_cache_root_ttl = 5;
14int cgit_cache_repo_ttl = 5; 22int cgit_cache_repo_ttl = 5;
15int cgit_cache_dynamic_ttl = 5; 23int cgit_cache_dynamic_ttl = 5;
16int cgit_cache_static_ttl = -1; 24int cgit_cache_static_ttl = -1;
17int cgit_cache_max_create_time = 5; 25int cgit_cache_max_create_time = 5;
18 26
19char *cgit_repo_name = NULL; 27char *cgit_repo_name = NULL;
20char *cgit_repo_desc = NULL; 28char *cgit_repo_desc = NULL;
21char *cgit_repo_owner = NULL; 29char *cgit_repo_owner = NULL;
22 30
23int cgit_query_has_symref = 0; 31int cgit_query_has_symref = 0;
24int cgit_query_has_sha1 = 0; 32int cgit_query_has_sha1 = 0;
25 33
26char *cgit_querystring = NULL; 34char *cgit_querystring = NULL;
27char *cgit_query_repo = NULL; 35char *cgit_query_repo = NULL;
28char *cgit_query_page = NULL; 36char *cgit_query_page = NULL;
29char *cgit_query_head = NULL; 37char *cgit_query_head = NULL;
30char *cgit_query_sha1 = NULL; 38char *cgit_query_sha1 = NULL;
31int cgit_query_ofs = 0; 39int cgit_query_ofs = 0;
32 40
33int htmlfd = 0; 41int htmlfd = 0;
34 42
35void cgit_global_config_cb(const char *name, const char *value) 43void cgit_global_config_cb(const char *name, const char *value)
36{ 44{
37 if (!strcmp(name, "root")) 45 if (!strcmp(name, "root"))
38 cgit_root = xstrdup(value); 46 cgit_root = xstrdup(value);
39 else if (!strcmp(name, "root-title")) 47 else if (!strcmp(name, "root-title"))
40 cgit_root_title = xstrdup(value); 48 cgit_root_title = xstrdup(value);
41 else if (!strcmp(name, "css")) 49 else if (!strcmp(name, "css"))
42 cgit_css = xstrdup(value); 50 cgit_css = xstrdup(value);
43 else if (!strcmp(name, "logo")) 51 else if (!strcmp(name, "logo"))
44 cgit_logo = xstrdup(value); 52 cgit_logo = xstrdup(value);
45 else if (!strcmp(name, "logo-link")) 53 else if (!strcmp(name, "logo-link"))
46 cgit_logo_link = xstrdup(value); 54 cgit_logo_link = xstrdup(value);
47 else if (!strcmp(name, "virtual-root")) 55 else if (!strcmp(name, "virtual-root"))
48 cgit_virtual_root = xstrdup(value); 56 cgit_virtual_root = xstrdup(value);