move to cmake

This commit is contained in:
2024-06-03 09:59:35 -05:00
parent d1c056e734
commit 087f132a32
41 changed files with 558 additions and 367 deletions

View File

@@ -1,23 +1,16 @@
#include "common.hpp"
#include <dtl/dtl.hpp>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using dtl::Diff3;
int main(int argc, char *argv[]) {
if (isFewArgs(argc, 4)) {
cerr << "Too few arguments." << endl;
std::cerr << "Too few arguments." << std::endl;
return -1;
}
typedef char elem;
typedef string sequence;
typedef std::string sequence;
sequence A(argv[1]);
sequence B(argv[2]);
@@ -26,10 +19,10 @@ int main(int argc, char *argv[]) {
Diff3<elem, sequence> diff3(A, B, C);
diff3.compose();
if (!diff3.merge()) {
cerr << "conflict." << endl;
std::cerr << "conflict." << std::endl;
return 0;
}
cout << "result:" << diff3.getMergedSequence() << endl;
std::cout << "result:" << diff3.getMergedSequence() << std::endl;
return 0;
}