2 fe621944 2020-11-10 stsp * Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
4 fe621944 2020-11-10 stsp * Permission to use, copy, modify, and distribute this software for any
5 fe621944 2020-11-10 stsp * purpose with or without fee is hereby granted, provided that the above
6 fe621944 2020-11-10 stsp * copyright notice and this permission notice appear in all copies.
8 fe621944 2020-11-10 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 fe621944 2020-11-10 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 fe621944 2020-11-10 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 fe621944 2020-11-10 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 fe621944 2020-11-10 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 fe621944 2020-11-10 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 fe621944 2020-11-10 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 fe621944 2020-11-10 stsp #include "arraylist.h"
18 fe621944 2020-11-10 stsp #include "diff_main.h"
19 fe621944 2020-11-10 stsp #include "diff_output.h"
21 fe621944 2020-11-10 stsp enum got_diff_output_format {
22 fe621944 2020-11-10 stsp GOT_DIFF_OUTPUT_UNIDIFF,
23 a42e5f4f 2022-09-02 thomas GOT_DIFF_OUTPUT_PLAIN,
26 fe621944 2020-11-10 stsp struct got_diffreg_result {
27 fe621944 2020-11-10 stsp struct diff_result *result;
29 fe621944 2020-11-10 stsp size_t size1;
31 fe621944 2020-11-10 stsp size_t size2;
32 fe621944 2020-11-10 stsp struct diff_data left;
33 fe621944 2020-11-10 stsp struct diff_data right;
36 01a44956 2019-03-27 stsp #define GOT_DIFF_CONFLICT_MARKER_BEGIN "<<<<<<<"
37 d136cfcb 2019-10-12 stsp #define GOT_DIFF_CONFLICT_MARKER_ORIG "|||||||"
38 01a44956 2019-03-27 stsp #define GOT_DIFF_CONFLICT_MARKER_SEP "======="
39 01a44956 2019-03-27 stsp #define GOT_DIFF_CONFLICT_MARKER_END ">>>>>>>"
41 cca5682e 2020-11-18 stsp const struct got_error *got_diff_get_config(struct diff_config **,
42 cca5682e 2020-11-18 stsp enum got_diff_algorithm, diff_atomize_func_t, void *);
43 72254787 2020-11-18 stsp const struct got_error *got_diff_prepare_file(FILE *, char **, size_t *,
44 b6b86fd1 2022-08-30 thomas struct diff_data *, const struct diff_config *, int, int);
45 64453f7e 2020-11-21 stsp const struct got_error *got_diffreg(struct got_diffreg_result **, FILE *,
46 64453f7e 2020-11-21 stsp FILE *, enum got_diff_algorithm, int, int);
47 82c78e96 2022-08-06 thomas const struct got_error *got_diffreg_output(struct got_diff_line **, size_t *,
48 1cb46f00 2020-11-21 stsp struct got_diffreg_result *, int, int, const char *, const char *,
49 fe621944 2020-11-10 stsp enum got_diff_output_format, int, FILE *);
50 fe621944 2020-11-10 stsp const struct got_error *got_diffreg_result_free(struct got_diffreg_result *);
51 fe621944 2020-11-10 stsp const struct got_error *got_diffreg_result_free_left(
52 fe621944 2020-11-10 stsp struct got_diffreg_result *);
53 fe621944 2020-11-10 stsp const struct got_error *got_diffreg_result_free_right(
54 fe621944 2020-11-10 stsp struct got_diffreg_result *);
55 dd2e2f52 2022-07-01 thomas const struct got_error *got_diffreg_close(char *, size_t, char *, size_t);
57 db590691 2021-06-02 stsp const struct got_error *got_merge_diff3(int *, int, FILE *, FILE *, FILE *,
58 fdf3c2d3 2021-06-17 stsp const char *, const char *, const char *, enum got_diff_algorithm);
60 fe621944 2020-11-10 stsp const struct got_error *got_diff_files(struct got_diffreg_result **, FILE *,
61 25ec7006 2022-07-01 thomas int, const char *, FILE *, int, const char *, int, int, int, FILE *,
62 25ec7006 2022-07-01 thomas enum got_diff_algorithm);