[BACK]Return to resp.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Diff for /src/usr.bin/cvs/Attic/resp.c between version 1.13 and 1.14

version 1.13, 2004/12/07 17:10:56 version 1.14, 2004/12/08 19:28:10
Line 72 
Line 72 
 static int  cvs_resp_modxpand  (struct cvsroot *, int, char *);  static int  cvs_resp_modxpand  (struct cvsroot *, int, char *);
 static int  cvs_resp_rcsdiff   (struct cvsroot *, int, char *);  static int  cvs_resp_rcsdiff   (struct cvsroot *, int, char *);
 static int  cvs_resp_template  (struct cvsroot *, int, char *);  static int  cvs_resp_template  (struct cvsroot *, int, char *);
   static int  cvs_resp_copyfile  (struct cvsroot *, int, char *);
   
   
 struct cvs_resphdlr {  struct cvs_resphdlr {
Line 84 
Line 85 
         { cvs_resp_newentry },          { cvs_resp_newentry },
         { cvs_resp_newentry },          { cvs_resp_newentry },
         { cvs_resp_cksum    },          { cvs_resp_cksum    },
         { NULL              },          { cvs_resp_copyfile },
         { cvs_resp_updated  },          { cvs_resp_updated  },
         { cvs_resp_updated  },          { cvs_resp_updated  },
         { cvs_resp_updated  },  /* 10 */          { cvs_resp_updated  },  /* 10 */
Line 474 
Line 475 
         cvs_fcksum = strdup(line);          cvs_fcksum = strdup(line);
         if (cvs_fcksum == NULL) {          if (cvs_fcksum == NULL) {
                 cvs_log(LP_ERRNO, "failed to copy checksum string");                  cvs_log(LP_ERRNO, "failed to copy checksum string");
                   return (-1);
           }
   
           return (0);
   }
   
   
   /*
    * cvs_resp_copyfile()
    *
    * Handler for the `Copy-file' response, which is used to copy the contents
    * of a file to another file for which the name is provided.  The CVS protocol
    * documentation states that this response is only used prior to a `Merged'
    * response to create a backup of the file.
    */
   static int
   cvs_resp_copyfile(struct cvsroot *root, int type, char *line)
   {
           char newname[MAXNAMLEN];
   
           /* read the new file name given by the server */
           if (cvs_getln(root, newname, sizeof(newname)) < 0)
                   return (-1);
   
           if (rename(line, newname) == -1) {
                   cvs_log(LP_ERRNO, "failed to rename %s to %s", line, newname);
                 return (-1);                  return (-1);
         }          }
   

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14