summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/dtl/ChangeLog12
-rw-r--r--vendor/dtl/README.md4
-rw-r--r--vendor/dtl/dtl/Diff.hpp21
-rw-r--r--vendor/dtl/dtl/variables.hpp3
m---------vendor/fmt0
5 files changed, 27 insertions, 13 deletions
diff --git a/vendor/dtl/ChangeLog b/vendor/dtl/ChangeLog
index e2f22dbe..3bf2e859 100644
--- a/vendor/dtl/ChangeLog
+++ b/vendor/dtl/ChangeLog
@@ -1,3 +1,15 @@
+2024-07-11 Tatsuhiko Kubo <cubicdaiya@gmail.com>
+
+ * bugfix: fix compilation error in C++14 (#18). Thanks to @ZaychukAleksey
+
+ * 1.21 released
+
+2022-04-11 Tatsuhiko Kubo <cubicdaiya@gmail.com>
+
+ * bugfix: fixed invalid offset in unified format difference when difference is too large.
+
+ * 1.20 released
+
2015-05-03 Tatsuhiko Kubo <cubicdaiya@gmail.com>
* added some minor changes.
diff --git a/vendor/dtl/README.md b/vendor/dtl/README.md
index 6af7bf30..4a8ee208 100644
--- a/vendor/dtl/README.md
+++ b/vendor/dtl/README.md
@@ -1,7 +1,5 @@
# dtl
-[![Build Status](https://travis-ci.org/cubicdaiya/dtl.png?branch=master)](https://travis-ci.org/cubicdaiya/dtl)
-
`dtl` is the diff template library written in C++. The name of template is derived C++'s Template.
# Table of contents
@@ -253,7 +251,7 @@ dtl::Diff<elem, sequence> d(A, B);
d.compose();
d.composeUnifiedHunks()
string s1(A);
-string s2 = d.UniPatch(s1);
+string s2 = d.uniPatch(s1);
```
When the above code is run, s2 becomes "abd".
diff --git a/vendor/dtl/dtl/Diff.hpp b/vendor/dtl/dtl/Diff.hpp
index cff05fef..57067f9f 100644
--- a/vendor/dtl/dtl/Diff.hpp
+++ b/vendor/dtl/dtl/Diff.hpp
@@ -67,6 +67,8 @@ namespace dtl {
bool editDistanceOnly;
uniHunkVec uniHunks;
comparator cmp;
+ long long ox;
+ long long oy;
public :
Diff () {}
@@ -162,7 +164,7 @@ namespace dtl {
return trivial;
}
- void enableTrivial () const {
+ void enableTrivial () {
this->trivial = true;
}
@@ -260,7 +262,8 @@ namespace dtl {
if (isHuge()) {
pathCordinates.reserve(MAX_CORDINATES_SIZE);
}
-
+ ox = 0;
+ oy = 0;
long long p = -1;
fp = new long long[M + N + 3];
fill(&fp[0], &fp[M + N + 3], -1);
@@ -595,18 +598,18 @@ namespace dtl {
while(px_idx < v[i].x || py_idx < v[i].y) {
if (v[i].y - v[i].x > py_idx - px_idx) {
if (!wasSwapped()) {
- ses.addSequence(*y, 0, y_idx, SES_ADD);
+ ses.addSequence(*y, 0, y_idx + oy, SES_ADD);
} else {
- ses.addSequence(*y, y_idx, 0, SES_DELETE);
+ ses.addSequence(*y, y_idx + oy, 0, SES_DELETE);
}
++y;
++y_idx;
++py_idx;
} else if (v[i].y - v[i].x < py_idx - px_idx) {
if (!wasSwapped()) {
- ses.addSequence(*x, x_idx, 0, SES_DELETE);
+ ses.addSequence(*x, x_idx + ox, 0, SES_DELETE);
} else {
- ses.addSequence(*x, 0, x_idx, SES_ADD);
+ ses.addSequence(*x, 0, x_idx + ox, SES_ADD);
}
++x;
++x_idx;
@@ -614,10 +617,10 @@ namespace dtl {
} else {
if (!wasSwapped()) {
lcs.addSequence(*x);
- ses.addSequence(*x, x_idx, y_idx, SES_COMMON);
+ ses.addSequence(*x, x_idx + ox, y_idx + oy, SES_COMMON);
} else {
lcs.addSequence(*y);
- ses.addSequence(*y, y_idx, x_idx, SES_COMMON);
+ ses.addSequence(*y, y_idx + oy, x_idx + ox, SES_COMMON);
}
++x;
++y;
@@ -658,6 +661,8 @@ namespace dtl {
fp = new long long[M + N + 3];
fill(&fp[0], &fp[M + N + 3], -1);
fill(path.begin(), path.end(), -1);
+ ox = x_idx - 1;
+ oy = y_idx - 1;
return false;
}
return true;
diff --git a/vendor/dtl/dtl/variables.hpp b/vendor/dtl/dtl/variables.hpp
index 5991eff6..73cab244 100644
--- a/vendor/dtl/dtl/variables.hpp
+++ b/vendor/dtl/dtl/variables.hpp
@@ -44,7 +44,6 @@
#include <algorithm>
#include <iostream>
-
#ifdef BINARYNINJACORE_LIBRARY
#include "binaryninjacore_global.h"
#endif
@@ -75,7 +74,7 @@ namespace dtl {
/**
* version string
*/
- const string version = "1.19";
+ const string version = "1.21";
/**
* type of edit for SES
diff --git a/vendor/fmt b/vendor/fmt
-Subproject f5e54359df4c26b6230fc61d38aa29458139308
+Subproject 0c9fce2ffefecfdce794e1859584e25877b7b59