version 1.3, 2004/12/02 17:45:44 |
version 1.4, 2004/12/02 19:23:44 |
|
|
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); |
} |
} |
|
|