commit - 8fbe07c208c126ce38d8d97079ef34df4a41cbc6
commit + 83290b45b037bedb9c814d4afaf111edb4ab7754
blob - 9f0da90a467ec828ff8f59f96b9d6559812554dc
blob + fc01cc37b202d4d82745b7a8b29bb35f2fc71a04
--- lib/diffreg.c
+++ lib/diffreg.c
static void sort(struct line *, int);
static void print_header(FILE *, struct got_diff_state *, struct got_diff_args *, const char *, const char *);
static int asciifile(FILE *);
-static int fetch(FILE *, struct got_diff_state *, struct got_diff_args *, long *, int, int, FILE *, int, int);
+static void fetch(FILE *, struct got_diff_state *, struct got_diff_args *, long *, int, int, FILE *, int, int);
static int newcand(struct got_diff_state *, int, int, int, int *);
static int search(struct got_diff_state *, int *, int, int);
static int skipline(FILE *);
const char *file1, FILE *f1, const char *file2, FILE *f2,
int a, int b, int c, int d, int *pflags)
{
- int i;
-
if (a > b && c > d)
return (0);
if (a <= b && c <= d)
diff_output(outfile, "---\n");
}
- i = fetch(outfile, ds, args, ds->ixnew, c, d, f2,
+ fetch(outfile, ds, args, ds->ixnew, c, d, f2,
args->diff_format == D_NORMAL ? '>' : '\0', *pflags);
return (0);
}
-static int
+static void
fetch(FILE *outfile, struct got_diff_state *ds, struct got_diff_args *args,
long *f, int a, int b, FILE *lb, int ch, int flags)
{
int i, j, c, col, nc;
if (a > b)
- return (0);
+ return;
for (i = a; i <= b; i++) {
fseek(lb, f[i - 1], SEEK_SET);
nc = f[i] - f[i - 1];
if ((c = getc(lb)) == EOF) {
diff_output(outfile, "\n\\ No newline at end of "
"file\n");
- return (0);
+ return;
}
if (c == '\t' && (flags & D_EXPANDTABS)) {
do {
}
}
}
- return (0);
}
/*