226 |
226 |
227 fclose(file); |
227 fclose(file); |
228 return k; |
228 return k; |
229 } |
229 } |
230 |
230 |
231 int list_repositories(void) { |
|
232 if(!davconfig) { |
|
233 return 1; |
|
234 } |
|
235 for(DavCfgRepository *repo=davconfig->repositories;repo;repo=repo->next) { |
|
236 printf("%.*s\n", (int)repo->name.value.length, repo->name.value.ptr); |
|
237 } |
|
238 return 0; |
|
239 } |
|
240 |
|
241 static char* get_attr_content(xmlNode *node) { |
231 static char* get_attr_content(xmlNode *node) { |
242 // TODO: remove code duplication (util_xml_get_text) |
232 // TODO: remove code duplication (util_xml_get_text) |
243 while(node) { |
233 while(node) { |
244 if(node->type == XML_TEXT_NODE) { |
234 if(node->type == XML_TEXT_NODE) { |
245 return (char*)node->content; |
235 return (char*)node->content; |