aboutsummaryrefslogblamecommitdiffstats
path: root/libpatch_check_file.c
blob: 4f0adca432565aee4e3b8e54839eb79b219300c9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                         
/* See LICENSE file for copyright and license details. */
#include "common.h"


int
libpatch_check_file(struct libpatch_file *file, enum libpatch_style style, int multifile)
{
	int req = libpatch_style_requires_text(style, multifile);
	if (req > 0) {
		if (req & LIBPATCH_STYLE_REQUIRES_LF_TERMINATION)
			if (file->lf_terminated)
				req ^= LIBPATCH_STYLE_REQUIRES_LF_TERMINATION;
	}
	return req;
}