[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 1915 - trunk/subversion/include trunk/subversion/libsvn_subr trunk/subversion/libsvn_repos

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-05-10 04:11:09 CEST

Greg Stein <gstein@lyra.org> writes:

> On Thu, May 09, 2002 at 12:39:10PM -0500, sussman@tigris.org wrote:
> >...
> > +++ trunk/subversion/libsvn_subr/io.c Thu May 9 12:39:09 2002
> >...
> > while (1)
> > {
> > numbytes = 1;
> > SVN_ERR (svn_stream_read (stream, &c, &numbytes));
> > + if (numbytes != 1)
> > + {
> > + /* a 'short' read means the stream has run out. */
> > + *stringbuf = NULL;
> > + return SVN_NO_ERROR;
>
> This means that a file without a trailing newline will throw out the last
> line of data. You're returning NULL rather than the data up to EOF.

This is svn_stream_readline. If the stream doesn't end with a line,
my feeling is that there's no final line to return. The stream has
effectively "run out of lines".

Our dumpfile stream is line-based anyway (except for the
length-prefixed content blobs). So this works pretty well.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 10 04:14:36 2002

This is an archived mail posted to the Subversion Dev mailing list.