Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
combine-diff: rename 'new' variables
author
Brandon Williams
<bmwill@google.com>
Wed, 14 Feb 2018 18:59:36 +0000
(10:59 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 22 Feb 2018 18:08:05 +0000
(10:08 -0800)
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
combine-diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b537e0b
)
diff --git
a/combine-diff.c
b/combine-diff.c
index bc08c4c5b1f68e731efce9adf2a4032eb5246f99..14db48966d0f4265d930c048b05ed470b1de866f 100644
(file)
--- a/
combine-diff.c
+++ b/
combine-diff.c
@@
-162,7
+162,7
@@
enum coalesce_direction { MATCH, BASE, NEW };
/* Coalesce new lines into base by finding LCS */
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
/* Coalesce new lines into base by finding LCS */
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
- struct lline *new, int lennew,
+ struct lline *new
line
, int lennew,
unsigned long parent, long flags)
{
int **lcs;
unsigned long parent, long flags)
{
int **lcs;
@@
-170,12
+170,12
@@
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
struct lline *baseend, *newend = NULL;
int i, j, origbaselen = *lenbase;
struct lline *baseend, *newend = NULL;
int i, j, origbaselen = *lenbase;
- if (new == NULL)
+ if (new
line
== NULL)
return base;
if (base == NULL) {
*lenbase = lennew;
return base;
if (base == NULL) {
*lenbase = lennew;
- return new;
+ return new
line
;
}
/*
}
/*
@@
-200,7
+200,7
@@
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
directions[0][j] = NEW;
for (i = 1, baseend = base; i < origbaselen + 1; i++) {
directions[0][j] = NEW;
for (i = 1, baseend = base; i < origbaselen + 1; i++) {
- for (j = 1, newend = new; j < lennew + 1; j++) {
+ for (j = 1, newend = new
line
; j < lennew + 1; j++) {
if (match_string_spaces(baseend->line, baseend->len,
newend->line, newend->len, flags)) {
lcs[i][j] = lcs[i - 1][j - 1] + 1;
if (match_string_spaces(baseend->line, baseend->len,
newend->line, newend->len, flags)) {
lcs[i][j] = lcs[i - 1][j - 1] + 1;
@@
-241,7
+241,7
@@
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
if (lline->prev)
lline->prev->next = lline->next;
else
if (lline->prev)
lline->prev->next = lline->next;
else
- new = lline->next;
+ new
line
= lline->next;
if (lline->next)
lline->next->prev = lline->prev;
if (lline->next)
lline->next->prev = lline->prev;
@@
-270,7
+270,7
@@
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
}
}
}
}
- newend = new;
+ newend = new
line
;
while (newend) {
struct lline *lline = newend;
newend = newend->next;
while (newend) {
struct lline *lline = newend;
newend = newend->next;