diff options
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -53,32 +53,6 @@ char *cgit_query_sha1 = NULL; | |||
53 | 53 | ||
54 | struct cacheitem cacheitem; | 54 | struct cacheitem cacheitem; |
55 | 55 | ||
56 | int cgit_parse_query(char *txt, configfn fn) | ||
57 | { | ||
58 | char *t, *value = NULL, c; | ||
59 | |||
60 | if (!txt) | ||
61 | return 0; | ||
62 | |||
63 | t = txt = xstrdup(txt); | ||
64 | |||
65 | while((c=*t) != '\0') { | ||
66 | if (c=='=') { | ||
67 | *t = '\0'; | ||
68 | value = t+1; | ||
69 | } else if (c=='&') { | ||
70 | *t = '\0'; | ||
71 | (*fn)(txt, value); | ||
72 | txt = t+1; | ||
73 | value = NULL; | ||
74 | } | ||
75 | t++; | ||
76 | } | ||
77 | if (t!=txt) | ||
78 | (*fn)(txt, value); | ||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | void cgit_global_config_cb(const char *name, const char *value) | 56 | void cgit_global_config_cb(const char *name, const char *value) |
83 | { | 57 | { |
84 | if (!strcmp(name, "root")) | 58 | if (!strcmp(name, "root")) |