Blame


1 3b0f3d61 2020-01-22 neels /* Diff output generators and invocation shims. */
2 3b0f3d61 2020-01-22 neels /*
3 3b0f3d61 2020-01-22 neels * Copyright (c) 2020 Neels Hofmeyr <neels@hofmeyr.de>
4 3b0f3d61 2020-01-22 neels *
5 3b0f3d61 2020-01-22 neels * Permission to use, copy, modify, and distribute this software for any
6 3b0f3d61 2020-01-22 neels * purpose with or without fee is hereby granted, provided that the above
7 3b0f3d61 2020-01-22 neels * copyright notice and this permission notice appear in all copies.
8 3b0f3d61 2020-01-22 neels *
9 3b0f3d61 2020-01-22 neels * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 3b0f3d61 2020-01-22 neels * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 3b0f3d61 2020-01-22 neels * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 3b0f3d61 2020-01-22 neels * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 3b0f3d61 2020-01-22 neels * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 3b0f3d61 2020-01-22 neels * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 3b0f3d61 2020-01-22 neels * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 3b0f3d61 2020-01-22 neels */
17 3b0f3d61 2020-01-22 neels
18 3b0f3d61 2020-01-22 neels struct diff_input_info {
19 3b0f3d61 2020-01-22 neels const char *left_path;
20 3b0f3d61 2020-01-22 neels const char *right_path;
21 3b0f3d61 2020-01-22 neels };
22 3b0f3d61 2020-01-22 neels
23 3e6cba3a 2020-08-13 stsp int diff_output_plain(FILE *dest, const struct diff_input_info *info,
24 3b0f3d61 2020-01-22 neels const struct diff_result *result);
25 3e6cba3a 2020-08-13 stsp int diff_output_unidiff(FILE *dest, const struct diff_input_info *info,
26 0d27172a 2020-05-06 neels const struct diff_result *result,
27 0d27172a 2020-05-06 neels unsigned int context_lines);
28 3e6cba3a 2020-08-13 stsp int diff_output_info(FILE *dest, const struct diff_input_info *info);
29 0d27172a 2020-05-06 neels void diff_output_lines(FILE *dest, const char *prefix,
30 0d27172a 2020-05-06 neels struct diff_atom *start_atom, unsigned int count);