itom
Loading...
Searching...
No Matches
diff.h
1
#pragma once
2
3
//diff - compute a shortest edit script (SES) given two sequences
4
5
#include <qbytearray.h>
6
#include <qlist.h>
7
#include <qvector.h>
8
9
typedef
enum
{
10
DIFF_MATCH = 1,
11
DIFF_DELETE,
12
DIFF_INSERT
13
} DiffOp;
14
15
typedef
struct
{
16
short
op;
17
int
off;
/* off into s1 if MATCH or DELETE but s2 if INSERT */
18
int
len;
19
}
DiffEdit
;
20
21
int
DiffArray(
22
const
void
*a,
int
aoff,
int
n,
23
const
void
*b,
int
boff,
int
m,
24
void
*context,
int
dmax,
25
struct
varray
*ses,
int
*sn,
26
struct
varray
*buf);
27
28
int
GetStringSimilarity(
const
char
*a,
const
char
*b);
29
30
bool
GetLineMapping(
const
QByteArray &oldText,
const
QByteArray &newText, QVector<int> &mapping);
DiffEdit
Definition
diff.h:15
varray
Definition
varray.h:4
itom
Qitom
textdiff
diff.h
Generated on Tue Nov 12 2024 10:43:14 for itom by
1.12.0