Skip to content

Commit

Permalink
xdiff: minor changes to match libxdiff-0.21
Browse files Browse the repository at this point in the history
This reformats the change 621c53c
introduced to match what upstream author implemented in libxdiff-0.21
without changing any logic (hopefully ;-).  This is to help keep
us in sync with the upstream.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Jun 20, 2006
1 parent 0da4677 commit d281786
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
11 changes: 4 additions & 7 deletions xdiff/xutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,18 @@ long xdl_bogosqrt(long n) {

int xdl_emit_diffrec(char const *rec, long size, char const *pre, long psize,
xdemitcb_t *ecb) {
int i = 2;
mmbuffer_t mb[3];
int i;

mb[0].ptr = (char *) pre;
mb[0].size = psize;
mb[1].ptr = (char *) rec;
mb[1].size = size;
i = 2;

if (!size || rec[size-1] != '\n') {
mb[2].ptr = "\n\\ No newline at end of file\n";
if (size > 0 && rec[size - 1] != '\n') {
mb[2].ptr = (char *) "\n\\ No newline at end of file\n";
mb[2].size = strlen(mb[2].ptr);
i = 3;
i++;
}

if (ecb->outf(ecb->priv, mb, i) < 0) {

return -1;
Expand Down
1 change: 1 addition & 0 deletions xdiff/xutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define XUTILS_H



long xdl_bogosqrt(long n);
int xdl_emit_diffrec(char const *rec, long size, char const *pre, long psize,
xdemitcb_t *ecb);
Expand Down

0 comments on commit d281786

Please sign in to comment.