diff options
author | Lars Hjemli <hjemli@gmail.com> | 2006-12-12 00:11:40 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2006-12-12 00:11:40 (JST) |
commit | 51ada4fda2b47710351e6e4da8a95807d6d9f729 (patch) | |
tree | 48b543fd16b666db7024038506ffc4eadb0ca966 /cgit.c | |
parent | 318d106300102c19d114a4ea89265b0a4060d9cb (diff) | |
download | cgit-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.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")) |