Skip some mergeinfo-related tests in merge_authz, switch, and update
[svn.git] / subversion / libsvn_delta / delta.h
blob268ac20a6837d46195885928d880d81682e1206b
1 /*
2 * delta.h: private delta library things
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 * ====================================================================
19 /* ==================================================================== */
22 #include <apr_pools.h>
23 #include <apr_hash.h>
25 #include "svn_delta.h"
27 #ifndef SVN_LIBSVN_DELTA_H
28 #define SVN_LIBSVN_DELTA_H
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
36 /* Private interface for text deltas. */
38 /* The standard size of one svndiff window. */
40 #define SVN_DELTA_WINDOW_SIZE 102400
43 /* Context/baton for building an operation sequence. */
45 typedef struct svn_txdelta__ops_baton_t {
46 int num_ops; /* current number of ops */
47 int src_ops; /* current number of source copy ops */
48 int ops_size; /* number of ops allocated */
49 svn_txdelta_op_t *ops; /* the operations */
51 svn_stringbuf_t *new_data; /* any new data used by the operations */
52 } svn_txdelta__ops_baton_t;
55 /* Insert a delta op into the delta window being built via BUILD_BATON. If
56 OPCODE is svn_delta_new, bytes from NEW_DATA are copied into the window
57 data and OFFSET is ignored. Otherwise NEW_DATA is ignored. All
58 allocations are performed in POOL. */
59 void svn_txdelta__insert_op(svn_txdelta__ops_baton_t *build_baton,
60 enum svn_delta_action opcode,
61 apr_size_t offset,
62 apr_size_t length,
63 const char *new_data,
64 apr_pool_t *pool);
67 /* Allocate a delta window from POOL. */
68 svn_txdelta_window_t *
69 svn_txdelta__make_window(const svn_txdelta__ops_baton_t *build_baton,
70 apr_pool_t *pool);
72 /* Create vdelta window data. Allocate temporary data from POOL. */
73 void svn_txdelta__vdelta(svn_txdelta__ops_baton_t *build_baton,
74 const char *start,
75 apr_size_t source_len,
76 apr_size_t target_len,
77 apr_pool_t *pool);
80 /* Create xdelta window data. Allocate temporary data from POOL. */
81 void svn_txdelta__xdelta(svn_txdelta__ops_baton_t *build_baton,
82 const char *start,
83 apr_size_t source_len,
84 apr_size_t target_len,
85 apr_pool_t *pool);
88 #ifdef __cplusplus
90 #endif /* __cplusplus */
92 #endif /* SVN_LIBSVN_DELTA_H */