diff options
Diffstat (limited to 'shared.c')
-rw-r--r-- | shared.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -28,6 +28,7 @@ char *cgit_query_repo = NULL; | |||
28 | char *cgit_query_page = NULL; | 28 | char *cgit_query_page = NULL; |
29 | char *cgit_query_head = NULL; | 29 | char *cgit_query_head = NULL; |
30 | char *cgit_query_sha1 = NULL; | 30 | char *cgit_query_sha1 = NULL; |
31 | int cgit_query_ofs = 0; | ||
31 | 32 | ||
32 | int htmlfd = 0; | 33 | int htmlfd = 0; |
33 | 34 | ||
@@ -59,16 +60,18 @@ void cgit_repo_config_cb(const char *name, const char *value) | |||
59 | 60 | ||
60 | void cgit_querystring_cb(const char *name, const char *value) | 61 | void 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 | ||