You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Sander Striker <st...@apache.org> on 2002/04/25 10:26:40 UTC
Mismatch docs/code. WAS: RE: svn commit: rev 1774 - trunk/subversion/include trunk/subversion/libsvn_delta
Hi,
> + /* Two-way and three-way diffs both call the first two output functions: */
> +
> + /* If doing a two-way diff, then an *identical* data range was found
> + between the "original" and "modified" datasources. Specifically,
> + the match is from ORIGINAL_START to ORIGINAL_END in the original
> + data, and from MODIFIED_START to MODIFIED_END in the modified
> + data.
> +
> + If doing a three-way diff, then all three datasources have
> + matching data ranges. The range LATEST_START to LATEST_END in
> + the "latest" datasource is identical to the range ORIGINAL_START
> + to ORIGINAL_END in the original data, and is also identical to
> + the range MODIFIED_START to MODIFIED_END in the modified
> + data. */
> + void (*output_common) (void *output_baton,
> + apr_off_t original_start,
> + apr_off_t original_end,
> + apr_off_t modified_start,
> + apr_off_t modified_end,
> + apr_off_t latest_start,
> + apr_off_t latest_end);
Because I missed a rename in the code before committing we now have
_end in the .h file and _length in the .c file. I'm going to let them
match up again, but would like some feedback to what is preferred.
Do we want ranges to be represented by:
START - END e.g. 0 - 3 translates to [0, 1, 2]
or:
START, LENGTH e.g. 3, 3 means [3, 4, 5]
Thoughts?
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Mismatch docs/code. WAS: RE: svn commit: rev 1774 - trunk/subversion/include trunk/subversion/libsvn_delta
Posted by "Kirby C. Bohling" <kb...@birddog.com>.
Sander Striker wrote:
>
> Because I missed a rename in the code before committing we now have
> _end in the .h file and _length in the .c file. I'm going to let them
> match up again, but would like some feedback to what is preferred.
>
> Do we want ranges to be represented by:
>
> START - END e.g. 0 - 3 translates to [0, 1, 2]
>
> or:
>
> START, LENGTH e.g. 3, 3 means [3, 4, 5]
>
>
> Thoughts?
>
> Sander
I have always thought START - END is much more natural and easy.
However, it appears every library in exsistance seems to disagree with
me. Every time I have ever seen a "substring" like operation they all
use "start, length" never "start - end" (now that I say that 10 people
will reply with counter examples).
I have yet to see a common C or C++ library that represents it the START
- END way. Of course using this argument we never will. In the end it
ends up making them work like memcpy(), (the third param is a number of
bytes, not the place to stop). which makes it easier to remember.
That's my 2 cents.
Kirby
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org