dav/config.c

changeset 798
d7f5067a27ce
parent 796
81e0f67386a6
child 806
673a803d2203
equal deleted inserted replaced
797:edbb20b1438d 798:d7f5067a27ce
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;

mercurial