|
diff --git a/shared.c b/shared.c index e4595fa..dd711a8 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -34,16 +34,17 @@ int cgit_query_has_sha1 = 0; |
34 | |
34 | |
35 | char *cgit_querystring = NULL; |
35 | char *cgit_querystring = NULL; |
36 | char *cgit_query_repo = NULL; |
36 | char *cgit_query_repo = NULL; |
37 | char *cgit_query_page = NULL; |
37 | char *cgit_query_page = NULL; |
38 | char *cgit_query_head = NULL; |
38 | char *cgit_query_head = NULL; |
39 | char *cgit_query_search = NULL; |
39 | char *cgit_query_search = NULL; |
40 | char *cgit_query_sha1 = NULL; |
40 | char *cgit_query_sha1 = NULL; |
41 | char *cgit_query_sha2 = NULL; |
41 | char *cgit_query_sha2 = NULL; |
| |
42 | char *cgit_query_path = NULL; |
42 | int cgit_query_ofs = 0; |
43 | int cgit_query_ofs = 0; |
43 | |
44 | |
44 | int htmlfd = 0; |
45 | int htmlfd = 0; |
45 | |
46 | |
46 | void cgit_global_config_cb(const char *name, const char *value) |
47 | void cgit_global_config_cb(const char *name, const char *value) |
47 | { |
48 | { |
48 | if (!strcmp(name, "root")) |
49 | if (!strcmp(name, "root")) |
49 | cgit_root = xstrdup(value); |
50 | cgit_root = xstrdup(value); |
@@ -95,16 +96,18 @@ void cgit_querystring_cb(const char *name, const char *value) |
95 | } else if (!strcmp(name, "id")) { |
96 | } else if (!strcmp(name, "id")) { |
96 | cgit_query_sha1 = xstrdup(value); |
97 | cgit_query_sha1 = xstrdup(value); |
97 | cgit_query_has_sha1 = 1; |
98 | cgit_query_has_sha1 = 1; |
98 | } else if (!strcmp(name, "id2")) { |
99 | } else if (!strcmp(name, "id2")) { |
99 | cgit_query_sha2 = xstrdup(value); |
100 | cgit_query_sha2 = xstrdup(value); |
100 | cgit_query_has_sha1 = 1; |
101 | cgit_query_has_sha1 = 1; |
101 | } else if (!strcmp(name, "ofs")) { |
102 | } else if (!strcmp(name, "ofs")) { |
102 | cgit_query_ofs = atoi(value); |
103 | cgit_query_ofs = atoi(value); |
| |
104 | } else if (!strcmp(name, "path")) { |
| |
105 | cgit_query_path = xstrdup(value); |
103 | } |
106 | } |
104 | } |
107 | } |
105 | |
108 | |
106 | void *cgit_free_commitinfo(struct commitinfo *info) |
109 | void *cgit_free_commitinfo(struct commitinfo *info) |
107 | { |
110 | { |
108 | free(info->author); |
111 | free(info->author); |
109 | free(info->author_email); |
112 | free(info->author_email); |
110 | free(info->committer); |
113 | free(info->committer); |
|