2
* diff.h : private header file
4
* ====================================================================
5
* Copyright (c) 2000-2004 CollabNet. All rights reserved.
7
* This software is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at http://subversion.tigris.org/license-1.html.
10
* If newer versions of this license are posted there, you may use a
11
* newer version instead, at your option.
13
* This software consists of voluntary contributions made by many
14
* individuals. For exact contribution history, see the revision
15
* history and logs, available at http://subversion.tigris.org/.
16
* ====================================================================
23
#include <apr_pools.h>
24
#include <apr_general.h>
27
#include "svn_types.h"
30
typedef struct svn_diff__node_t svn_diff__node_t;
31
typedef struct svn_diff__tree_t svn_diff__tree_t;
32
typedef struct svn_diff__position_t svn_diff__position_t;
33
typedef struct svn_diff__lcs_t svn_diff__lcs_t;
35
typedef enum svn_diff__type_e
37
svn_diff__type_common,
38
svn_diff__type_diff_modified,
39
svn_diff__type_diff_latest,
40
svn_diff__type_diff_common,
41
svn_diff__type_conflict
46
svn_diff__type_e type;
47
apr_off_t original_start;
48
apr_off_t original_length;
49
apr_off_t modified_start;
50
apr_off_t modified_length;
51
apr_off_t latest_start;
52
apr_off_t latest_length;
53
svn_diff_t *resolved_diff;
56
struct svn_diff__position_t
58
svn_diff__position_t *next;
59
svn_diff__node_t *node;
63
struct svn_diff__lcs_t
65
svn_diff__lcs_t *next;
66
svn_diff__position_t *position[2];
73
svn_diff__lcs(svn_diff__position_t *position_list1, /* pointer to tail (ring) */
74
svn_diff__position_t *position_list2, /* pointer to tail (ring) */
80
* Support functions to build a tree of token positions
84
svn_diff__tree_create(svn_diff__tree_t **tree, apr_pool_t *pool);
88
* Get all tokens from a datasource. Return the
89
* last item in the (circular) list.
92
svn_diff__get_tokens(svn_diff__position_t **position_list,
93
svn_diff__tree_t *tree,
95
const svn_diff_fns_t *vtable,
96
svn_diff_datasource_e datasource,
100
/* Morph a svn_lcs_t into a svn_diff_t. */
102
svn_diff__diff(svn_diff__lcs_t *lcs,
103
apr_off_t original_start, apr_off_t modified_start,
104
svn_boolean_t want_common,
108
svn_diff__resolve_conflict(svn_diff_t *hunk,
109
svn_diff__position_t **position_list1,
110
svn_diff__position_t **position_list2,
115
* Return an adler32 checksum based on CHECKSUM, updated with
119
svn_diff__adler32(apr_uint32_t checksum, const char *data, apr_size_t len);