Diff for /XML/testDAV.c between versions 1.4 and 1.5

version 1.4, 1999/12/21 17:53:00 version 1.5, 2000/02/14 11:44:22
Line 212  int propfindQuery(const char *URL, char Line 212  int propfindQuery(const char *URL, char
 }  }
   
 void parsePropfindProp(xmlNodePtr cur, nodeinfoPtr node) {  void parsePropfindProp(xmlNodePtr cur, nodeinfoPtr node) {
     cur = cur->childs;      cur = cur->children;
   
     /*      /*
      * prop ANY       * prop ANY
Line 230  void parsePropfindProp(xmlNodePtr cur, n Line 230  void parsePropfindProp(xmlNodePtr cur, n
 }  }
   
 void parsePropfindPropstat(xmlNodePtr cur, nodeinfoPtr node) {  void parsePropfindPropstat(xmlNodePtr cur, nodeinfoPtr node) {
     cur = cur->childs;      cur = cur->children;
   
     /*      /*
      * propstat (prop, status, responsedescription?)       * propstat (prop, status, responsedescription?)
Line 257  nodeinfoPtr parsePropfindResponse(xmlNod Line 257  nodeinfoPtr parsePropfindResponse(xmlNod
     nodeinfoPtr ret, last, res = NULL;      nodeinfoPtr ret, last, res = NULL;
   
     ret = last = NULL;      ret = last = NULL;
     cur = cur->childs;      cur = cur->children;
   
     /*      /*
      * response (href, ((href*, status)|(propstat+)), responsedescription?       * response (href, ((href*, status)|(propstat+)), responsedescription?
Line 285  nodeinfoPtr parsePropfindAnswer(xmlNodeP Line 285  nodeinfoPtr parsePropfindAnswer(xmlNodeP
   
     if (!strcmp((char *) cur->name, "multistatus")) {      if (!strcmp((char *) cur->name, "multistatus")) {
         ret = last = NULL;          ret = last = NULL;
         cur = cur->childs;          cur = cur->children;
         while (cur != NULL) {          while (cur != NULL) {
             if (!strcmp((char *) cur->name, "response")) {              if (!strcmp((char *) cur->name, "response")) {
                 res = parsePropfindResponse(cur);                  res = parsePropfindResponse(cur);
Line 344  nodeinfoPtr propfind(char *file) { Line 344  nodeinfoPtr propfind(char *file) {
     if (debug)      if (debug)
         fprintf(stdout, "%s\n", xmlResult);          fprintf(stdout, "%s\n", xmlResult);
   
     ret = parsePropfindAnswer(doc->root);      ret = parsePropfindAnswer(doc->children);
     xmlFreeDoc(doc);      xmlFreeDoc(doc);
     xmlFree(xmlResult);      xmlFree(xmlResult);
     return(ret);      return(ret);
 }  }
   
 int cd(char *newpath) {  int cd(char *newpath) {
     nodeinfoPtr ret;  
       
     if (newpath == NULL) {      if (newpath == NULL) {
         strcpy(current_path, "/");          strcpy(current_path, "/");
         strcpy(current_file, "");          strcpy(current_file, "");
Line 364  int ls(char *newpath) { Line 362  int ls(char *newpath) {
   
 int main(int argc, char** argv) {  int main(int argc, char** argv) {
     nodeinfoPtr ret;      nodeinfoPtr ret;
     char line[1024], *cur;  
     int i;      int i;
   
     for (i = 1; i < argc ; i++) {      for (i = 1; i < argc ; i++) {

Removed from v.1.4  
changed lines
  Added in v.1.5


Webmaster