view mercurial/bdiff.h @ 33507:e9672de52a23

debugignore: eliminate inconsistencies with `hg status` (issue5222) Using a matcher for this command allows processing the named file(s) as relative to cwd. It also leverages the icasefs normalization logic the same way the status command does. (However, a false indicator is given for a nonexistent file in some cases, e.g. passing 'foo.REJ' when that file doesn't exist, and the rule is '*.rej'. Maybe the regex itself needs to be case insensitive on these platforms, at least for the debug command.) Finally, the file printed is relative to cwd and uses platform specific slashes, so a few (glob)s were needed in seemingly unrelated tests.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 15 Jul 2017 15:23:29 -0400
parents 9631ff5ebbeb
children 72985b390d7c
line wrap: on
line source

#ifndef _HG_BDIFF_H_
#define _HG_BDIFF_H_

struct bdiff_line {
	int hash, n, e;
	ssize_t len;
	const char *l;
};

struct bdiff_hunk;
struct bdiff_hunk {
	int a1, a2, b1, b2;
	struct bdiff_hunk *next;
};

int bdiff_splitlines(const char *a, ssize_t len, struct bdiff_line **lr);
int bdiff_diff(struct bdiff_line *a, int an, struct bdiff_line *b, int bn,
	struct bdiff_hunk *base);
void bdiff_freehunks(struct bdiff_hunk *l);

#endif