Show More
@@ -226,6 +226,7 b' static void recurse(struct line *a, stru' | |||||
226 | { |
|
226 | { | |
227 | int i, j, k; |
|
227 | int i, j, k; | |
228 |
|
228 | |||
|
229 | while (1) { | |||
229 | /* find the longest match in this chunk */ |
|
230 | /* find the longest match in this chunk */ | |
230 | k = longest_match(a, b, pos, a1, a2, b1, b2, &i, &j); |
|
231 | k = longest_match(a, b, pos, a1, a2, b1, b2, &i, &j); | |
231 | if (!k) |
|
232 | if (!k) | |
@@ -238,7 +239,10 b' static void recurse(struct line *a, stru' | |||||
238 | l->head->b1 = j; |
|
239 | l->head->b1 = j; | |
239 | l->head->b2 = j + k; |
|
240 | l->head->b2 = j + k; | |
240 | l->head++; |
|
241 | l->head++; | |
241 | recurse(a, b, pos, i + k, a2, j + k, b2, l); |
|
242 | /* tail-recursion didn't happen, so doing equivalent iteration */ | |
|
243 | a1 = i + k; | |||
|
244 | b1 = j + k; | |||
|
245 | } | |||
242 | } |
|
246 | } | |
243 |
|
247 | |||
244 | static struct hunklist diff(struct line *a, int an, struct line *b, int bn) |
|
248 | static struct hunklist diff(struct line *a, int an, struct line *b, int bn) |
General Comments 0
You need to be logged in to leave comments.
Login now