aboutsummaryrefslogtreecommitdiff
path: root/editors/patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/patch.c')
-rw-r--r--editors/patch.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/editors/patch.c b/editors/patch.c
index b12c662f4..693af5b7d 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -82,6 +82,9 @@ void TOY_llist_free(void *list, void (*freeit)(void *data))
82 if (list==pop) break; 82 if (list==pop) break;
83 } 83 }
84} 84}
85//Override bbox's names
86#define llist_pop TOY_llist_pop
87#define llist_free TOY_llist_free
85 88
86// Add an entry to the end off a doubly linked list 89// Add an entry to the end off a doubly linked list
87static 90static
@@ -292,7 +295,7 @@ static void fail_hunk(void)
292 // this file and advance to next file. 295 // this file and advance to next file.
293 296
294 TT.state = 2; 297 TT.state = 2;
295 TOY_llist_free(TT.current_hunk, do_line); 298 llist_free(TT.current_hunk, do_line);
296 TT.current_hunk = NULL; 299 TT.current_hunk = NULL;
297 delete_tempfile(TT.filein, TT.fileout, &TT.tempname); 300 delete_tempfile(TT.filein, TT.fileout, &TT.tempname);
298 TT.state = 0; 301 TT.state = 0;
@@ -378,7 +381,7 @@ static int apply_one_hunk(void)
378 fdprintf(2, "NOT: %s\n", plist->data); 381 fdprintf(2, "NOT: %s\n", plist->data);
379 382
380 TT.state = 3; 383 TT.state = 3;
381 check = TOY_llist_pop(&buf); 384 check = llist_pop(&buf);
382 check->prev->next = buf; 385 check->prev->next = buf;
383 buf->prev = check->prev; 386 buf->prev = check->prev;
384 do_line(check); 387 do_line(check);
@@ -405,13 +408,13 @@ static int apply_one_hunk(void)
405out: 408out:
406 // We have a match. Emit changed data. 409 // We have a match. Emit changed data.
407 TT.state = "-+"[reverse]; 410 TT.state = "-+"[reverse];
408 TOY_llist_free(TT.current_hunk, do_line); 411 llist_free(TT.current_hunk, do_line);
409 TT.current_hunk = NULL; 412 TT.current_hunk = NULL;
410 TT.state = 1; 413 TT.state = 1;
411done: 414done:
412 if (buf) { 415 if (buf) {
413 buf->prev->next = NULL; 416 buf->prev->next = NULL;
414 TOY_llist_free(buf, do_line); 417 llist_free(buf, do_line);
415 } 418 }
416 419
417 return TT.state; 420 return TT.state;