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
9typedef enum {
10 DIFF_MATCH = 1,
11 DIFF_DELETE,
12 DIFF_INSERT
13} DiffOp;
14
15typedef struct {
16 short op;
17 int off; /* off into s1 if MATCH or DELETE but s2 if INSERT */
18 int len;
19} DiffEdit;
20
21int 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
28int GetStringSimilarity(const char *a,const char *b);
29
30bool GetLineMapping(const QByteArray &oldText, const QByteArray &newText, QVector<int> &mapping);
Definition diff.h:15
Definition varray.h:4