=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/Attic/proto.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- src/usr.bin/cvs/Attic/proto.c 2005/05/24 06:42:38 1.54 +++ src/usr.bin/cvs/Attic/proto.c 2005/05/26 22:27:11 1.55 @@ -1,4 +1,4 @@ -/* $OpenBSD: proto.c,v 1.54 2005/05/24 06:42:38 joris Exp $ */ +/* $OpenBSD: proto.c,v 1.55 2005/05/26 22:27:11 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -660,7 +660,6 @@ return (fbuf); } - /* * cvs_sendreq() * @@ -767,6 +766,8 @@ * * Get a line from the remote end and store it in . The terminating * newline character is stripped from the result. + * Returns the length in bytes of the line (not including the NUL byte), or + * -1 on failure. */ int cvs_getln(struct cvsroot *root, char *lbuf, size_t len) @@ -796,7 +797,7 @@ if ((rlen > 0) && (lbuf[rlen - 1] == '\n')) lbuf[--rlen] = '\0'; - return (0); + return (rlen); } @@ -898,11 +899,11 @@ if (cvs_server_inlog != NULL) { fputs(line, cvs_server_inlog); if (nl) - fputc('\n', cvs_server_inlog); + putc('\n', cvs_server_inlog); } fputs(line, out); if (nl) - fputc('\n', out); + putc('\n', out); return (0); }