Data Structures | Macros | Typedefs | Functions
xdiff.h File Reference
#include "../nvim/memory.h"

Go to the source code of this file.

Data Structures

struct  s_mmfile
 
struct  s_mmbuffer
 
struct  s_xpparam
 
struct  s_xdemitcb
 
struct  s_xdemitconf
 
struct  s_bdiffparam
 
struct  s_xmparam
 

Macros

#define XDF_NEED_MINIMAL   (1 << 0)
 
#define XDF_IGNORE_WHITESPACE   (1 << 1)
 
#define XDF_IGNORE_WHITESPACE_CHANGE   (1 << 2)
 
#define XDF_IGNORE_WHITESPACE_AT_EOL   (1 << 3)
 
#define XDF_IGNORE_CR_AT_EOL   (1 << 4)
 
#define XDF_WHITESPACE_FLAGS
 
#define XDF_IGNORE_BLANK_LINES   (1 << 7)
 
#define XDF_PATIENCE_DIFF   (1 << 14)
 
#define XDF_HISTOGRAM_DIFF   (1 << 15)
 
#define XDF_DIFF_ALGORITHM_MASK   (XDF_PATIENCE_DIFF | XDF_HISTOGRAM_DIFF)
 
#define XDF_DIFF_ALG(x)   ((x) & XDF_DIFF_ALGORITHM_MASK)
 
#define XDF_INDENT_HEURISTIC   (1 << 23)
 
#define XDL_EMIT_FUNCNAMES   (1 << 0)
 
#define XDL_EMIT_NO_HUNK_HDR   (1 << 1)
 
#define XDL_EMIT_FUNCCONTEXT   (1 << 2)
 
#define XDL_MERGE_MINIMAL   0
 
#define XDL_MERGE_EAGER   1
 
#define XDL_MERGE_ZEALOUS   2
 
#define XDL_MERGE_ZEALOUS_ALNUM   3
 
#define XDL_MERGE_FAVOR_OURS   1
 
#define XDL_MERGE_FAVOR_THEIRS   2
 
#define XDL_MERGE_FAVOR_UNION   3
 
#define XDL_MERGE_DIFF3   1
 
#define xdl_malloc(x)   xmalloc((x))
 
#define xdl_free(ptr)   xfree(ptr)
 
#define xdl_realloc(ptr, x)   xrealloc((ptr),(x))
 
#define DEFAULT_CONFLICT_MARKER_SIZE   7
 

Typedefs

typedef struct s_mmfile mmfile_t
 
typedef struct s_mmbuffer mmbuffer_t
 
typedef struct s_xpparam xpparam_t
 
typedef struct s_xdemitcb xdemitcb_t
 
typedef long(* find_func_t) (const char *line, long line_len, char *buffer, long buffer_size, void *priv)
 
typedef int(* xdl_emit_hunk_consume_func_t) (long start_a, long count_a, long start_b, long count_b, void *cb_data)
 
typedef struct s_xdemitconf xdemitconf_t
 
typedef struct s_bdiffparam bdiffparam_t
 
typedef struct s_xmparam xmparam_t
 

Functions

voidxdl_mmfile_first (mmfile_t *mmf, long *size)
 
long xdl_mmfile_size (mmfile_t *mmf)
 
int xdl_diff (mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, xdemitconf_t const *xecfg, xdemitcb_t *ecb)
 
int xdl_merge (mmfile_t *orig, mmfile_t *mf1, mmfile_t *mf2, xmparam_t const *xmp, mmbuffer_t *result)
 

Macro Definition Documentation

◆ DEFAULT_CONFLICT_MARKER_SIZE

#define DEFAULT_CONFLICT_MARKER_SIZE   7

◆ XDF_DIFF_ALG

#define XDF_DIFF_ALG (   x)    ((x) & XDF_DIFF_ALGORITHM_MASK)

◆ XDF_DIFF_ALGORITHM_MASK

#define XDF_DIFF_ALGORITHM_MASK   (XDF_PATIENCE_DIFF | XDF_HISTOGRAM_DIFF)

◆ XDF_HISTOGRAM_DIFF

#define XDF_HISTOGRAM_DIFF   (1 << 15)

◆ XDF_IGNORE_BLANK_LINES

#define XDF_IGNORE_BLANK_LINES   (1 << 7)

◆ XDF_IGNORE_CR_AT_EOL

#define XDF_IGNORE_CR_AT_EOL   (1 << 4)

◆ XDF_IGNORE_WHITESPACE

#define XDF_IGNORE_WHITESPACE   (1 << 1)

◆ XDF_IGNORE_WHITESPACE_AT_EOL

#define XDF_IGNORE_WHITESPACE_AT_EOL   (1 << 3)

◆ XDF_IGNORE_WHITESPACE_CHANGE

#define XDF_IGNORE_WHITESPACE_CHANGE   (1 << 2)

◆ XDF_INDENT_HEURISTIC

#define XDF_INDENT_HEURISTIC   (1 << 23)

◆ XDF_NEED_MINIMAL

#define XDF_NEED_MINIMAL   (1 << 0)

◆ XDF_PATIENCE_DIFF

#define XDF_PATIENCE_DIFF   (1 << 14)

◆ XDF_WHITESPACE_FLAGS

#define XDF_WHITESPACE_FLAGS
Value:
XDF_IGNORE_WHITESPACE_CHANGE | \
XDF_IGNORE_WHITESPACE_AT_EOL | \
XDF_IGNORE_CR_AT_EOL)

◆ XDL_EMIT_FUNCCONTEXT

#define XDL_EMIT_FUNCCONTEXT   (1 << 2)

◆ XDL_EMIT_FUNCNAMES

#define XDL_EMIT_FUNCNAMES   (1 << 0)

◆ XDL_EMIT_NO_HUNK_HDR

#define XDL_EMIT_NO_HUNK_HDR   (1 << 1)

◆ xdl_free

#define xdl_free (   ptr)    xfree(ptr)

◆ xdl_malloc

#define xdl_malloc (   x)    xmalloc((x))

◆ XDL_MERGE_DIFF3

#define XDL_MERGE_DIFF3   1

◆ XDL_MERGE_EAGER

#define XDL_MERGE_EAGER   1

◆ XDL_MERGE_FAVOR_OURS

#define XDL_MERGE_FAVOR_OURS   1

◆ XDL_MERGE_FAVOR_THEIRS

#define XDL_MERGE_FAVOR_THEIRS   2

◆ XDL_MERGE_FAVOR_UNION

#define XDL_MERGE_FAVOR_UNION   3

◆ XDL_MERGE_MINIMAL

#define XDL_MERGE_MINIMAL   0

◆ XDL_MERGE_ZEALOUS

#define XDL_MERGE_ZEALOUS   2

◆ XDL_MERGE_ZEALOUS_ALNUM

#define XDL_MERGE_ZEALOUS_ALNUM   3

◆ xdl_realloc

#define xdl_realloc (   ptr,
 
)    xrealloc((ptr),(x))

Typedef Documentation

◆ bdiffparam_t

typedef struct s_bdiffparam bdiffparam_t

◆ find_func_t

typedef long(* find_func_t) (const char *line, long line_len, char *buffer, long buffer_size, void *priv)

◆ mmbuffer_t

typedef struct s_mmbuffer mmbuffer_t

◆ mmfile_t

typedef struct s_mmfile mmfile_t

◆ xdemitcb_t

typedef struct s_xdemitcb xdemitcb_t

◆ xdemitconf_t

typedef struct s_xdemitconf xdemitconf_t

◆ xdl_emit_hunk_consume_func_t

typedef int(* xdl_emit_hunk_consume_func_t) (long start_a, long count_a, long start_b, long count_b, void *cb_data)

◆ xmparam_t

typedef struct s_xmparam xmparam_t

◆ xpparam_t

typedef struct s_xpparam xpparam_t

Function Documentation

◆ xdl_diff()

int xdl_diff ( mmfile_t mf1,
mmfile_t mf2,
xpparam_t const *  xpp,
xdemitconf_t const *  xecfg,
xdemitcb_t ecb 
)

◆ xdl_merge()

int xdl_merge ( mmfile_t orig,
mmfile_t mf1,
mmfile_t mf2,
xmparam_t const *  xmp,
mmbuffer_t result 
)

◆ xdl_mmfile_first()

void* xdl_mmfile_first ( mmfile_t mmf,
long *  size 
)

◆ xdl_mmfile_size()

long xdl_mmfile_size ( mmfile_t mmf)
XDF_IGNORE_WHITESPACE
#define XDF_IGNORE_WHITESPACE
Definition: xdiff.h:33