aboutsummaryrefslogtreecommitdiffstats
path: root/shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared.c')
-rw-r--r--shared.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/shared.c b/shared.c
index c58a2ff..6b5cfc2 100644
--- a/shared.c
+++ b/shared.c
@@ -28,6 +28,7 @@ char *cgit_query_repo = NULL;
28char *cgit_query_page = NULL; 28char *cgit_query_page = NULL;
29char *cgit_query_head = NULL; 29char *cgit_query_head = NULL;
30char *cgit_query_sha1 = NULL; 30char *cgit_query_sha1 = NULL;
31int cgit_query_ofs = 0;
31 32
32int htmlfd = 0; 33int htmlfd = 0;
33 34
@@ -59,16 +60,18 @@ void cgit_repo_config_cb(const char *name, const char *value)
59 60
60void cgit_querystring_cb(const char *name, const char *value) 61void cgit_querystring_cb(const char *name, const char *value)
61{ 62{
62 if (!strcmp(name,"r")) 63 if (!strcmp(name,"r")) {
63 cgit_query_repo = xstrdup(value); 64 cgit_query_repo = xstrdup(value);
64 else if (!strcmp(name, "p")) 65 } else if (!strcmp(name, "p")) {
65 cgit_query_page = xstrdup(value); 66 cgit_query_page = xstrdup(value);
66 else if (!strcmp(name, "h")) { 67 } else if (!strcmp(name, "h")) {
67 cgit_query_head = xstrdup(value); 68 cgit_query_head = xstrdup(value);
68 cgit_query_has_symref = 1; 69 cgit_query_has_symref = 1;
69 } else if (!strcmp(name, "id")) { 70 } else if (!strcmp(name, "id")) {
70 cgit_query_sha1 = xstrdup(value); 71 cgit_query_sha1 = xstrdup(value);
71 cgit_query_has_sha1 = 1; 72 cgit_query_has_sha1 = 1;
73 } else if (!strcmp(name, "ofs")) {
74 cgit_query_ofs = atoi(value);
72 } 75 }
73} 76}
74 77