diff options
Diffstat (limited to 'subversion/include/private/svn_diff_private.h')
-rw-r--r-- | subversion/include/private/svn_diff_private.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/subversion/include/private/svn_diff_private.h b/subversion/include/private/svn_diff_private.h index 48b4d5266200..bf7f490d37e9 100644 --- a/subversion/include/private/svn_diff_private.h +++ b/subversion/include/private/svn_diff_private.h @@ -113,6 +113,40 @@ svn_diff__display_prop_diffs(svn_stream_t *outstream, void *cancel_baton, apr_pool_t *scratch_pool); +/** Create a hunk object that adds a single line without newline. Return the + * new object in @a *hunk. + * + * @a line is the added text, without a trailing newline. + * + * The hunk will be associated with @a patch. + */ +svn_error_t * +svn_diff_hunk__create_adds_single_line(svn_diff_hunk_t **hunk, + const char *line, + const svn_patch_t *patch, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** Create a hunk object that deletes a single line without newline. Return + * the new object in @a *hunk. + * + * @a line is the deleted text, without a trailing newline. + * + * The hunk will be associated with @a patch. + */ +svn_error_t * +svn_diff_hunk__create_deletes_single_line(svn_diff_hunk_t **hunk, + const char *line, + const svn_patch_t *patch, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** Fetches the penalty fuzz of the diff hunk. The patch file parser applies + * an additional penalty on some cases of bad patch files. These cases may + * include errors as headers that aren't consistent with bodies, etc. + */ +svn_linenum_t +svn_diff_hunk__get_fuzz_penalty(const svn_diff_hunk_t *hunk); #ifdef __cplusplus } |