version 1.25, 2005/12/22 13:19:12 |
version 1.26, 2005/12/30 02:03:28 |
|
|
* cvs_logmsg_send() |
* cvs_logmsg_send() |
* |
* |
*/ |
*/ |
int |
void |
cvs_logmsg_send(struct cvsroot *root, const char *msg) |
cvs_logmsg_send(struct cvsroot *root, const char *msg) |
{ |
{ |
const char *mp; |
const char *mp; |
char *np, buf[256]; |
char *np, buf[256]; |
|
|
if (cvs_sendarg(root, "-m", 0) < 0) |
cvs_sendarg(root, "-m", 0); |
fatal("cvs_logmsg_send: cvs_sendarg failed"); |
|
|
|
for (mp = msg; mp != NULL; mp = strchr(mp, '\n')) { |
for (mp = msg; mp != NULL; mp = strchr(mp, '\n')) { |
if (*mp == '\n') |
if (*mp == '\n') |
|
|
np = strchr(buf, '\n'); |
np = strchr(buf, '\n'); |
if (np != NULL) |
if (np != NULL) |
*np = '\0'; |
*np = '\0'; |
if (cvs_sendarg(root, buf, (mp == msg) ? 0 : 1) < 0) |
cvs_sendarg(root, buf, (mp == msg) ? 0 : 1); |
fatal("cvs_logmsg_send: cvs_sendarg failed"); |
|
} |
} |
|
|
return (0); |
|
} |
} |