declare got_merge_diff3()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/lib/diff3.c b/lib/diff3.c
index 3132fbc..d0a238e 100644
--- a/lib/diff3.c
+++ b/lib/diff3.c
@@ -89,10 +89,6 @@
#define nitems(_a) (sizeof(_a) / sizeof((_a)[0]))
#endif
-/* flags shared between merge(1) and rcsmerge(1) */
-#define MERGE_EFLAG (1<<16)
-#define MERGE_OFLAG (1<<17)
-
/* diff3 - 3-way differential file comparison */
/* diff3 [-ex3EX] d13 d23 f1 f2 f3 [m1 m3]
@@ -265,7 +261,7 @@ done:
* For merge(1).
*/
const struct got_error *
-merge_diff3(int outfd, char *p1, char *p2, char *p3, int flags)
+got_merge_diff3(int outfd, const char *p1, const char *p2, const char *p3)
{
const struct got_error *err = NULL;
char *dp13, *dp23, *path1, *path2, *path3;
@@ -286,9 +282,6 @@ merge_diff3(int outfd, char *p1, char *p2, char *p3, int flags)
dp13 = dp23 = path1 = path2 = path3 = NULL;
data = patch = NULL;
- if ((flags & MERGE_EFLAG) && !(flags & MERGE_OFLAG))
- d3s->oflag = 0;
-
if ((b1 = buf_load(p1)) == NULL)
goto out;
if ((b2 = buf_load(p2)) == NULL)
diff --git a/lib/got_lib_diff.h b/lib/got_lib_diff.h
index edd8672..cb4b545 100644
--- a/lib/got_lib_diff.h
+++ b/lib/got_lib_diff.h
@@ -139,3 +139,6 @@ const struct got_error *got_diffreg(int *, FILE *,
const struct got_error *got_diff_blob_lines_changed(struct got_diff_changes **,
struct got_blob_object *, struct got_blob_object *);
void got_diff_free_changes(struct got_diff_changes *);
+
+const struct got_error *got_merge_diff3(int, const char *, const char *,
+ const char *);