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

Diff for /src/usr.bin/cvs/logmsg.c between version 1.3 and 1.4

version 1.3, 2004/12/02 17:45:44 version 1.4, 2004/12/02 19:23:44
Line 287 
Line 287 
 cvs_logmsg_send(struct cvsroot *root, const char *msg)  cvs_logmsg_send(struct cvsroot *root, const char *msg)
 {  {
         const char *mp, *np;          const char *mp, *np;
           char buf[256];
   
         for (np = msg;; np = strchr(np, '\n')) {          if (cvs_sendarg(root, "-m", 0) < 0)
                 if (np == NULL)                  return (-1);
                         break;  
   
                 if (cvs_sendarg(root, np, (np == msg) ? 0 : 1) < 0)          for (np = msg; np != NULL; np = strchr(np, '\n')) {
                   if (*np == '\n')
                           np++;
   
                   /* XXX ghetto */
                   strlcpy(buf, np, sizeof(buf));
                   mp = strchr(buf, '\n');
                   if (mp != NULL)
                           *mp = '\0';
                   if (cvs_sendarg(root, buf, (np == msg) ? 0 : 1) < 0)
                         return (-1);                          return (-1);
         }          }
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4