aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
authorGravatar Lars Hjemli <hjemli@gmail.com>2006-12-12 00:11:40 (JST)
committerGravatar Lars Hjemli <hjemli@gmail.com>2006-12-12 00:11:40 (JST)
commit51ada4fda2b47710351e6e4da8a95807d6d9f729 (patch)
tree48b543fd16b666db7024038506ffc4eadb0ca966 /cgit.c
parent318d106300102c19d114a4ea89265b0a4060d9cb (diff)
downloadcgit-51ada4fda2b47710351e6e4da8a95807d6d9f729.zip
cgit-51ada4fda2b47710351e6e4da8a95807d6d9f729.tar.gz
Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.c
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/cgit.c b/cgit.c
index dc91125..5567859 100644
--- a/cgit.c
+++ b/cgit.c
@@ -53,32 +53,6 @@ char *cgit_query_sha1 = NULL;
53 53
54struct cacheitem cacheitem; 54struct cacheitem cacheitem;
55 55
56int 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
82void cgit_global_config_cb(const char *name, const char *value) 56void cgit_global_config_cb(const char *name, const char *value)
83{ 57{
84 if (!strcmp(name, "root")) 58 if (!strcmp(name, "root"))