1 3b0f3d61 2020-01-22 neels /* Diff output generators and invocation shims. */
3 3b0f3d61 2020-01-22 neels * Copyright (c) 2020 Neels Hofmeyr <neels@hofmeyr.de>
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.
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.
18 3b0f3d61 2020-01-22 neels #pragma once
20 3b0f3d61 2020-01-22 neels #include <stdio.h>
21 3b0f3d61 2020-01-22 neels #include <diff/diff_main.h>
23 3b0f3d61 2020-01-22 neels struct diff_input_info {
24 3b0f3d61 2020-01-22 neels const char *left_path;
25 3b0f3d61 2020-01-22 neels const char *right_path;
28 3b0f3d61 2020-01-22 neels enum diff_rc diff_output_plain(FILE *dest, const struct diff_input_info *info,
29 3b0f3d61 2020-01-22 neels const struct diff_result *result);
30 3b0f3d61 2020-01-22 neels enum diff_rc diff_output_unidiff(FILE *dest, const struct diff_input_info *info,
31 3b0f3d61 2020-01-22 neels const struct diff_result *result, unsigned int context_lines);
32 3b0f3d61 2020-01-22 neels enum diff_rc diff_output_info(FILE *dest, const struct diff_input_info *info);
33 3b0f3d61 2020-01-22 neels void diff_output_lines(FILE *dest, const char *prefix, struct diff_atom *start_atom, unsigned int count);