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

Re: svn commit: r17645 - in trunk/subversion: libsvn_diff

From: <kfogel_at_collab.net>
Date: 2005-12-06 22:32:02 CET

kfogel@collab.net writes:
> "Peter N. Lundblad" <peter@famlundblad.se> writes:
> > > I realize it's heuristic anyway, but: if we find a CR in the very last
> > > byte we're allowed to look at, then it's "equally" likely that the
> > > next byte is LF as not... In other words, is there a compelling reason
> > > to prefer "\r" over "\r\n" in the unknown case? Wouldn't it be more
> > > consistent to return NULL? In other words:
> >
> > This function is used when the whole file (!) is in memory. Since I'm not
> > saying that this works for a chunk of a file, I'd say this is to be
> > assumed.
> But in that case, then NULL really is a more appropriate answer, no?

Never mind: you're right, CR makes sense. If it's the last char of
the file, then it's probably the eol marker! A comment to this effect
might be good, since it's not apparent (from the helper function's
signature) that it's usually operating on the whole file, though.


www.collab.net  <>  CollabNet  |  Distributed Development On Demand
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 7 00:05:52 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.